Query behavior

Mock API Pagination, Filtering and Sorting

Collection endpoints can simulate pagination, broad text search, and allowlisted sorting. Query parameter names and direction values are configurable at project level, while pagination limits can be tuned per endpoint.

Configure pagination

Enable query behavior for the project, then choose default and maximum page sizes for each collection endpoint. Paginated responses include the current page, limit, total record count, total pages, and previous/next state.

HTTP
GET /products?page=2&limit=20

{
  "data": [],
  "meta": { "page": 2, "limit": 20, "total": 64, "totalPages": 4 }
}

Search record values

Search performs case-insensitive partial matching across record values, including nested values. It is intentionally broad and is not a field-specific filter language.

HTTP
GET /products?search=keyboard

Allow safe sorting

Select sortable fields from the endpoint model. Requests can sort only by that allowlist; an invalid field returns HTTP 400 and identifies the allowed fields.

HTTP
GET /products?sort=price&direction=desc

Match an existing frontend contract

Rename page, page-size, search, sort-field, direction, ascending, and descending values at project level. This lets the mock match a planned API without adding translation logic to the frontend.

Related questions

Does search match field names?

No. It matches serialized record values rather than object property names by themselves.

Keep exploring

Last updated September 17, 2026. Product behavior described here is verified against the current Mock API Studio runtime.