Skip to content

Filtering Stories by Defining a Value Range

In a common shop content structure implementation, a simple price range products filter is often necessary. A single filter_query can be crafted to retrieve products that exceed or fall below a specified price point. In this scenario, the gt_float and lt_float filters are combined to obtain all products within a given price range.

The following example demonstrates how to receive products (stories of that story type) with a price value between 200 and 300.

curl "https://api.storyblok.com/v2/cdn/stories\
?starts_with=products\
&token=ask9soUkv02QqbZgmZdeDAtt\
&filter_query%5Bprice%5D%5Blt_float%5D=300\
&filter_query%5Bprice%5D%5Bgt_float%5D=200"
Response
{
"stories": [
{
"name": "Coat",
"created_at": "2018-12-10T17:50:34.547Z",
"published_at": "2026-11-03T10:00:23.774Z",
"updated_at": "2026-11-03T10:00:23.787Z",
"id": 461933,
"uuid": "0186a027-4f04-4750-b743-8855ad4e71d4",
"content": {
"_uid": "baa8057c-a928-4fda-b322-9499a081a9c9",
"link": {
"id": "",
"url": "",
"linktype": "story",
"fieldtype": "multilink",
"cached_url": ""
},
"name": "Coat",
"image": "//a.storyblok.com/f/44203/5616x3744/8cff02e5d6/coat.jpg",
"price": "279",
"featured": true,
"component": "product",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. In erat mauris, faucibus quis pharetra sit amet, pretium ac libero. Etiam vehicula eleifend bibendum."
},
"slug": "coat",
"full_slug": "products/coat",
"sort_by_date": null,
"position": -10,
"tag_list": [
"red",
"sale"
],
"is_startpage": false,
"parent_id": 461931,
"meta_data": null,
"group_id": "d17c3137-d695-45f0-a418-bce81b148567",
"first_published_at": "2018-12-10T17:50:47.000Z",
"release_id": null,
"lang": "default",
"path": null,
"alternates": [],
"default_full_slug": null,
"translated_slugs": null
}
],
"cv": 1793700142,
"rels": [],
"links": []
}

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.