← Home
Get Agencies
Get Agencies
This endpoints lists agencies including linked branches.
🔐 Bearer Token: Provide your bearer token in the Authorization header when making requests to protected resources.
Query Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| id | string | Optional | Filter by specific agency ID | 9960 |
| parent_id | string | Optional | Filter agencies by parent agency ID (for branch hierarchies) | 9960 |
| search | string | Optional | Search agencies by name (case-insensitive partial match) | >= 2 characters |
| per_page | string | Optional | Number of items per page | >= 1 characters |
| Accept | string | Optional | application/json |
Response Schema
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| data | array[object] | Optional | The resource representing agencies | |
| name | string | Optional | Name of the agency | |
| description | string | Optional | Agency description | |
| contact | object | Optional | Contact Details for the Agency | |
| created_at | string | Optional | Record creation timestamp | |
| links | object | Optional | The links to pages. | |
| first | string | Optional | The link to first page. | |
| last | string | Optional | The link to last page. | |
| prev | string | Optional | The link to previous page. | |
| next | string | Optional | The link to next page. | |
| meta | object | Optional | Meta about pagination data. | |
| current_page | integer | Optional | The page you are currently on. | |
| from | integer | Optional | The first page of the paginated results. | |
| path | string | Optional | The path of the current page. | |
| to | integer | Optional | The last page of the paginated results. | |
| total | integer | Optional | The total number of results. |
Responses
200✅
403⚠️
401⚠️
Code Examples
curl --location 'https://api.bayut.com/v1/agencies?per_page=25' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": 102917,
"parent_id": 9956,
"name": "Realestate Agency",
"description": "",
"contact": {
"phone": "+971-1-1111111",
"email": "john.doe@mail.com",
"website": null,
"address": "Dubai Marina, UAE"
},
"created_at": "2023-07-05T09:39:03.000000Z"
}
],
"links": {
"first": "https://api.bayut.com/v1/agencies?page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://api.bayut.com/v1/agencies",
"per_page": "25",
"to": 1,
"total": 1
}
}