lt_float
Returns all stories with a field value lower than the provided value.
This operation can be used for Number fields or Text fields with a float value. Moreover, it can be used for custom fields returning a float value.
Examples Use Cases
Section titled “Examples Use Cases”filter_query[price][lt_float]=119.99
Returns all stories with a price lower than 119.99.
filter_query[price][lt_float]=1199.99
Returns all stories with a price lower than 1199.99. Please note the absence of a thousand separator.
Example Request and Response
Section titled “Example Request and Response”The following example demonstrates how to receive all stories with a price lower than 2.24 using the lt_float operation.
curl "https://api.storyblok.com/v2/cdn/stories\?token=ask9soUkv02QqbZgmZdeDAtt\&filter_query%5Bprice%5D%5Blt_float%5D=2.24\&starts_with=products"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ accessToken: "ask9soUkv02QqbZgmZdeDAtt",});
try { const response = await storyblok.get('cdn/stories', { "filter_query[price][lt_float]": "2.24", "starts_with": "products" }) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
$client->getStories([ "filter_query[price][lt_float]" => "2.24", "starts_with" => "products"])->getBody();HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/stories?token=ask9soUkv02QqbZgmZdeDAtt&filter_query%5Bprice%5D%5Blt_float%5D=2.24&starts_with=products") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/stories?token=ask9soUkv02QqbZgmZdeDAtt&filter_query%5Bprice%5D%5Blt_float%5D=2.24&starts_with=products");var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);import requests
url = "https://api.storyblok.com/v2/cdn/stories"
querystring = {"token":"ask9soUkv02QqbZgmZdeDAtt","filter_query[price][lt_float]":"2.24","starts_with":"products"}
payload = ""headers = {}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(token: 'YOUR_TOKEN')
client.stories({:params => { "filter_query[price][lt_float]" => "2.24", "starts_with" => "products"}})// .package(url: "https://github.com/storyblok/storyblok-swift.git", from: "1.1.0")// Requires a `Block` content model — see https://www.storyblok.com/docs/quickstarts/apple-platforms/content-modelinglet client = StoryblokClient( library: Block.self, accessToken: "ask9soUkv02QqbZgmZdeDAtt", version: .published, region: .eu)
let stories: Page<Story<Block.Product>>? = try await client .stories { @Sendable (query: inout StoriesQuery<Block.Product>) in query.startsWith = "products" query.filter { $0.price.asDecimal < 2.24 } } .last() .values .first { @Sendable _ in true }
print(stories!)// implementation("com.storyblok:content-api-client:0.7.1")// Requires a `Product` component model — see https://www.storyblok.com/docs/quickstarts/android/content-modelingval client = StoryblokClient( accessToken = "ask9soUkv02QqbZgmZdeDAtt", version = Published,)
val stories = client .stories<Product> { startsWith = "products" filter { Product::price lessThan 2.24 } } .flow .asItemSnapshotListFlow() .first()
println(stories){ "stories": [ { "name": "Paper", "created_at": "2018-12-10T17:50:54.023Z", "published_at": "2026-10-08T10:41:38.107Z", "updated_at": "2026-10-08T10:41:38.122Z", "id": 461934, "uuid": "7b372086-0c79-4890-9f01-2e6e41098f87", "content": { "_uid": "5bbcd6f0-494a-42bd-b135-a1f7216c27ce", "link": { "id": "", "url": "", "linktype": "story", "fieldtype": "multilink", "cached_url": "" }, "name": "Paper", "image": "//a.storyblok.com/f/44203/4032x3024/747174042a/paper.jpg", "price": "1.24", "featured": false, "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": "paper", "full_slug": "products/paper", "sort_by_date": null, "position": -20, "tag_list": [], "is_startpage": false, "parent_id": 461931, "meta_data": null, "group_id": "16ccf4be-0c7d-4129-b45a-9e10cf40221c", "first_published_at": "2018-12-10T17:51:04.000Z", "release_id": null, "lang": "default", "path": null, "alternates": [], "default_full_slug": null, "translated_slugs": null } ], "cv": 1792742236, "rels": [], "links": []}Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community