π§ͺ Basic Features
π§ͺ Advanced Features
Search (search[field])
The searching feature allows clients to perform keyword-based searches across defined fields. Itβs useful for implementing search bars or global search functionalities in applications.
You can use:
termβ match anywhere*term*β match anywhereterm*β match at the beginning*termβ match at the end
Both-Side Wildcard (*term*)
Request
GET /api/users?search[name]=*III*
Query Parameters
| Name | Type | Description |
|---|---|---|
| search[field] | string | Wildcard pattern to search within a field. |
Response
[
{
"id": 5,
"name": "Dr. Cooper Blanda III",
...
},
{
"id": 13,
"name": "Dr. Tad Beer III",
...
},
{
"id": 48,
"name": "Mr. Kim Johnson III",
...
}
]
Postfix Wildcard (term*)
Request
GET /api/users?search[name]=Dr*
Query Parameters
| Name | Type | Description |
|---|---|---|
| search[field] | string | Match values starting with given term. |
Response
[
{
"id": 5,
"name": "Dr. Cooper Blanda III",
...
},
{
"id": 13,
"name": "Dr. Tad Beer III",
...
}
]
Prefix Wildcard (*term)
Request
GET /api/users?search[email]=*org
Query Parameters
| Name | Type | Description |
|---|---|---|
| search[field] | string | Match values ending with given term. |
Response
[
{
"id": 2,
"name": "Jairo Armstrong",
"email": "damian83@example.org",
...
},
{
"id": 4,
"name": "Jacinthe Stamm",
"email": "tmayert@example.org",
...
}
]
You can chain multiple fields using
search[field1,field2,fieldN]=termfor compound searches.