Query guide
Shape responses for the interface you need to test.
Combine pagination, sorting, exact filters, partial matches, search, and artificial delay.
Pagination and sorting
Control collection results
These parameters work on all top-level list endpoints. Posts search also supports them.
| Parameter | Type | Required | Description |
|---|---|---|---|
_page or page | integer | Optional | Page number. Defaults to 1. |
_limit or limit | integer | Optional | Items per page. Defaults to 10 and is capped at 100. |
_sort | string | Optional | Field to sort by. Defaults to id. |
_order | asc | desc | Optional | Sort direction. Defaults to asc. |
_delay | integer | Optional | Artificial response delay in milliseconds. |
curl 'https://api.apimocker.com/posts?_page=2&_limit=5&_sort=title&_order=asc'Filtering
Match exact values
Add a field and value to the query string. Numeric IDs and boolean values are converted to their correct types before filtering.
curl 'https://api.apimocker.com/todos?completed=false&userId=1'curl 'https://api.apimocker.com/posts?userId=1'Partial matches
Use _like for text
Add _like to a string field for a case-insensitive substring match. You can combine it with pagination and sorting.
curl 'https://api.apimocker.com/posts?title_like=web&_limit=5'Search
Search multiple fields at once
Use the resource search endpoint with a required q parameter.
| Endpoint | Type | Required | Description |
|---|---|---|---|
/users/search | name, username, email | 10 max | Returns query, total, and results. |
/posts/search | title, body | Paginated | Supports page, limit, sort, order, and delay. |
/todos/search | title, description | 10 max | Returns query, total, and results. |
/comments/search | name, email, body | 10 max | Returns query, total, and results. |
curl 'https://api.apimocker.com/users/search?q=john'Loading states
Delay a response on purpose
Add _delay to GET list, search, or single-resource requests. The value is in milliseconds and is useful for skeletons, spinners, and route transitions.
curl 'https://api.apimocker.com/todos?_delay=2000'