# InfoJobs Search Facets API Documentation

Get the filter values for an InfoJobs search with the number of matching offers per value: provinces, cities, remote work, categories, education, working days, contract types, segments and countries. Use the returned ids as filters in the search endpoint. A search without matches is a successful response with total_results 0.

- **Documentation:** [https://scrappa.co/docs/infojobs-api/infojobs_facets](https://scrappa.co/docs/infojobs-api/infojobs_facets)
- **API group:** InfoJobs API
- **Endpoint:** `GET https://scrappa.co/api/infojobs/facets`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `keyword` | string | No | Free-text search, up to 100 characters. Example: developer. |
| `provinceIds` | string | No | One province id. Example: 33 is Madrid. |
| `categoryIds` | string | No | One category id. Example: 150 is Informática y telecomunicaciones. |
| `teleworkingIds` | string | No | One id: 1 on site, 2 remote only, 3 hybrid, 4 not specified. |
| `contractTypeIds` | string | No | One contract type id. Example: 1 is permanent. |
| `workdayIds` | string | No | One working day id. Example: 1 is full time. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/infojobs/facets?keyword=developer&provinceIds=33"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total_results": 135,
        "facets": {
            "provinces": [
                {
                    "id": "33",
                    "name": "Madrid",
                    "count": 135
                }
            ],
            "categories": [
                {
                    "id": "150",
                    "name": "Inform\u00e1tica y telecomunicaciones",
                    "count": 120
                }
            ],
            "contract_types": [
                {
                    "id": "1",
                    "name": "Indefinido",
                    "count": 132
                }
            ]
        }
    },
    "meta": {
        "endpoint_family": "facets",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is invalid, or InfoJobs rejected a filter id. This response is not billable. |
| 503 | Invalid Source Response | InfoJobs answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
