# Search jobs (v1)

Returns one page of 30 Bayt jobs with company, city and country, the pay band where the employer shows one, career level, Bayt's summary and posting time; at most 334 pages per search. A query nothing matches returns no results and a `total` of 0.

- Platform: Bayt
- Request: `GET https://api.toolzerhub.com/v1/bayt/search`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/bayt/search/get-bayt-search

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `query` | query | yes | string | A job title, skill or keyword, such as accountant, site engineer or c++ developer. |
| `location` | query | no | string | A country such as UAE, Saudi Arabia, Qatar or Egypt; a city Bayt lists such as Dubai, Riyadh, Doha or Cairo; or City, Country for any other city, such as Salalah, Oman. Omit to search every country. Other values are rejected. Default: . |
| `page` | query | no | integer | One-based page of 30 jobs. Bayt lists at most 334 pages (about 10,000 jobs) for one search. A page past the last one returns empty results with stop_reason set to past_last_page. Default: 1. |
| `sort` | query | no | enum: relevance, date | relevance (the default, as on bayt.com) or date for the newest postings first. Default: relevance. |
| `posted_within_days` | query | no | integer | Keep only jobs posted in the last 1, 7 or 30 days, Bayt's own date filters. Other values are rejected. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/bayt/search?query=<query>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
