Search + filter API response JSON example
Last updated 2026-05-20
Example JSON
Search response with applied filters echoed back.
{
"query": "phone",
"filters": {
"category": "smartphones",
"minPrice": 100,
"maxPrice": 1500,
"inStock": true
},
"facets": {
"category": [
{
"value": "smartphones",
"count": 12
},
{
"value": "accessories",
"count": 4
}
],
"brand": [
{
"value": "Apple",
"count": 5
},
{
"value": "Samsung",
"count": 4
}
]
},
"items": [
{
"id": 121,
"title": "iPhone 9",
"price": 549,
"category": "smartphones",
"brand": "Apple"
},
{
"id": 122,
"title": "iPhone X",
"price": 899,
"category": "smartphones",
"brand": "Apple"
}
],
"total": 16,
"skip": 0,
"limit": 30
}Request examples
const params = new URLSearchParams({ q: 'phone', limit: '10' });
const res = await fetch('https://jsonexamples.com/products/search?' + params);
const json = await res.json();Try the live endpoint
Click below to call /products/search?q=phone from your browser.
GET
/products/search?q=phone{
"hint": "Click 'Run' to call the live endpoint"
}Common variations
Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
export interface SearchFilter {
"query": string;
"filters": {
"category": string;
"minPrice": number;
"maxPrice": number;
"inStock": boolean;
};
"facets": {
"category": {
"value": string;
"count": number;
}[];
"brand": {
"value": string;
"count": number;
}[];
};
"items": {
"id": number;
"title": string;
"price": number;
"category": string;
"brand": string;
}[];
"total": number;
"skip": number;
"limit": number;
}