# SeLoger Location Autocomplete

Autocomplete departments, city groups and postal codes with their native SeLoger identifiers (`ci`, `cp`, `idq`), so you can build a location picker. These are not SeLoger place ids: a searchable place id (`AD08FR…`) has to be obtained separately from the `locations=` query parameter of a seloger.com search URL. It reads a single autocomplete route, so this endpoint costs 1 credit. A failed request costs nothing.

- **Documentation:** [https://scrappa.co/docs/seloger-api/seloger_locations](https://scrappa.co/docs/seloger-api/seloger_locations)
- **API group:** SeLoger API
- **Endpoint:** `GET https://scrappa.co/api/seloger/locations`

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Search term, e.g. "Paris" |
| `limit` | integer | No | Maximum results to return (default: 10) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/seloger/locations?query=Paris"
```

## Example response

```json
{
    "success": true,
    "locations": [],
    "query": "Paris",
    "count": 0
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The query term or the limit failed validation. |
| 404 | Not Found | The requested resource does not exist upstream: the listing is gone, was never live, or is not reachable through the search it would belong to. This is not billed. |
| 503 | Upstream Unavailable | SeLoger did not return a usable response through any available request path, or refused the request this integration sent it. This failure is not billed and is retryable. |
| 503 | Service Disabled | The SeLoger integration is switched off. Reads as a clean 503 so a rollback needs no deploy. |

## 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)
