---
title: like
description: Filter to return stories with a field value matching a specific pattern.
url: https://storyblok.com/docs/api/content-delivery/v2/filter-queries/operation-like
---

# like

Filter stories by checking if a field partially matches the specified value.

## Examples Use Cases

`filter_query[headline][like]=Mars`  
Returns all stories with the word `Mars` in their headline

`filter_query[headline][like]=Mars*`  
Returns all stories where the headline starts with `Mars`

`filter_query[headline][like]=*Mars`  
Returns all stories where the headline ends with `Mars`

`filter_query[headline][like]=*Mars*`  
Returns all stories where the headline contains `Mars`

`filter_query[content][like]=quantum`  
Returns all stories that contain `quantum` in the `content` field

`filter_query[scheduled][like]=*`  
Returns all stories where `scheduled` is defined and its value is blank

> [!NOTE]
> Use the value `*` with `like` when you want to match empty values only where the field exists. For selecting stories where a field does not exist or is empty, consider using the [is operator](/docs/api/content-delivery/v2/filter-queries/operation-is) with the appropriate value.

## Example Request and Response

The following example demonstrates how to receive all stories with `space` in the headline using the `like` operation.

-   cURL
    
    ```shellscript
    curl "https://api.storyblok.com/v2/cdn/stories/\
    ?filter_query%5Bheadline%5D%5Blike%5D=*space*\
    &token=ask9soUkv02QqbZgmZdeDAtt"
    ```
    
-   JS
    
    ```javascript
    // storyblok-js-client@>=7, node@>=18
    import Storyblok from "storyblok-js-client";
    
    const storyblok = new Storyblok({
      accessToken: "krcV6QGxWORpYLUWt12xKQtt",
    });
    
    try {
      const response = await storyblok.get('cdn/stories/', {
        "filter_query[headline][like]": "*space*"
      })
      console.log({ response })
    } catch (error) {
      console.log(error)
    }
    ```
    
-   PHP
    
    ```php
    $client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
    
    $client->getStories([
      "filter_query[headline][like]" => "*space*"
    ])->getBody();
    ```
    
-   Java
    
    ```java
    HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/stories/?filter_query%5Bheadline%5D%5Blike%5D=*space*&token=ask9soUkv02QqbZgmZdeDAtt")
      .asString();
    ```
    
-   C#
    
    ```csharp
    var client = new RestClient("https://api.storyblok.com/v2/cdn/stories/?filter_query%5Bheadline%5D%5Blike%5D=*space*&token=ask9soUkv02QqbZgmZdeDAtt");
    var request = new RestRequest(Method.GET);
    
    IRestResponse response = client.Execute(request);
    ```
    
-   Python
    
    ```python
    import requests
    
    url = "https://api.storyblok.com/v2/cdn/stories/"
    
    querystring = {"filter_query[headline][like]":"*space*","token":"ask9soUkv02QqbZgmZdeDAtt"}
    
    payload = ""
    headers = {}
    
    response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    ```
    
-   Ruby
    
    ```ruby
    require 'storyblok'
    client = Storyblok::Client.new(token: 'YOUR_TOKEN')
    
    client.stories({:params => {
      "filter_query[headline][like]" => "*space*"
    }})
    ```
    
-   Swift
    
    ```swift
    let storyblok = URLSession(storyblok: .cdn(accessToken: "ask9soUkv02QqbZgmZdeDAtt"))
    var request = URLRequest(storyblok: storyblok, path: "stories/")
    request.url!.append(queryItems: [
        URLQueryItem(name: "filter_query[headline][like]", value: "*space*")
    ])
    let (data, _) = try await storyblok.data(for: request)
    print(try JSONSerialization.jsonObject(with: data))
    ```
    
-   Kotlin
    
    ```kotlin
    val client = HttpClient {
        install(Storyblok(CDN)) {
            accessToken = "ask9soUkv02QqbZgmZdeDAtt"
        }
    }
    
    val response = client.get("stories/") {
        url {
            parameters.append("filter_query[headline][like]", "*space*")
        }
    }
    
    println(response.body<JsonElement>())
    ```

Response

```json
{
  "stories": [
    {
      "name": "Demystifying Space-Time: A Journey Through the Fabric of the Universe",
      "created_at": "2024-02-16T14:30:23.265Z",
      "published_at": "2024-03-07T15:13:47.973Z",
      "id": 445002670,
      "uuid": "65da3091-da63-4e13-933d-1c457f1e8001",
      "content": {
        "_uid": "74378dc5-7bd4-402a-9f18-e5826ab33de7",
        "image": {
          "id": 14114862,
          "alt": "",
          "name": "",
          "focus": "",
          "title": "",
          "source": "",
          "filename": "https://a.storyblok.com/f/276232/3500x2000/1b10f4c65c/black-hole.jpg",
          "copyright": "",
          "fieldtype": "asset",
          "meta_data": {},
          "is_private": "",
          "is_external_url": false
        },
        "author": "51eed33d-855f-415c-ac0d-4404e03b89e1",
        "topics": ["physics", "cosmology"],
        "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
        "headline": "Demystifying Space-Time: A Journey Through the Fabric of the Universe",
        "component": "article",
        "scheduled": "2024-02-23 15:00",
        "categories": [
          "f61be9aa-a974-4235-8314-d1238fe2ecce",
          "98ba1610-9163-4c71-bae3-8fe00092b430",
          "b52d1c55-b399-4241-97d7-e3dba566a486"
        ],
        "highlighted": false
      },
      "slug": "demystifying-space-time-journey-through-fabric-universe",
      "full_slug": "articles/demystifying-space-time-journey-through-fabric-universe",
      "sort_by_date": null,
      "position": 0,
      "tag_list": [],
      "is_startpage": false,
      "parent_id": 444991588,
      "meta_data": null,
      "group_id": "7f212389-771d-44e6-ac4c-cf6c3857118b",
      "first_published_at": "2024-02-16T14:30:15.805Z",
      "release_id": null,
      "lang": "default",
      "path": null,
      "alternates": [],
      "default_full_slug": null,
      "translated_slugs": null
    }
  ],
  "cv": 1709827198,
  "rels": [],
  "links": []
}
```

## Pagination

-   [Previous: not-in](/docs/api/content-delivery/v2/filter-queries/operation-not-in)
-   [Next: not\_like](/docs/api/content-delivery/v2/filter-queries/operation-not-like)
