# SeLoger Property Search

Search apartments, houses and other property types for sale or rent on SeLoger, France's largest property portal. A SeLoger place id such as "AD08FR31096" for Paris is externally sourced: read it from the `locations=` query parameter of any seloger.com search URL. Location Autocomplete returns departments, city groups and postal codes for building a location picker, not place ids. Omit `place_id` to search the whole of France. Billing is per upstream read. A national search costs 1 credit. A search with `place_id` also reads the matching listing cards, at 1 credit per card read: a page of 50 twelve-character ids is one read, and a page that does not fit one read costs one credit per further read. A failed request costs nothing.

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

## 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 |
| --- | --- | --- | --- |
| `place_id` | string | No | SeLoger place id, e.g. "AD08FR31096" for Paris, obtainable from the `locations=` query parameter of any seloger.com search URL. Omit for a national search. |
| `distribution` | string | No | buy or rent |
| `estate_types[]` | array | No | Property types: Apartment, House, Office, Trading, Parking, Building, Plot, Miscellaneous, Storage_Production, Gastronomy_Hotel, Agriculture_Forestry, Project, Senior |
| `new_build` | boolean | No | Restrict to new-build (neuf) listings. Requires distribution=buy; SeLoger has no new-build partition for rent. |
| `price_min` | integer | No | Minimum price in EUR |
| `price_max` | integer | No | Maximum price in EUR |
| `rooms_min` | number | No | Minimum number of rooms |
| `rooms_max` | number | No | Maximum number of rooms |
| `size_min` | integer | No | Minimum floor area in m² |
| `year_built_min` | integer | No | Earliest construction year |
| `available_from_max` | string | No | Latest availability date, YYYY-MM-DD. Requires place_id; the national search route cannot express it. |
| `keywords` | string | No | Free-text search term |
| `order` | string | No | Sort order, e.g. Default, PriceAsc, PriceDesc, DateDesc. Requires place_id; a national search refuses a non-default order. |
| `page` | integer | No | Page number (default: 1) |
| `per_page` | integer | No | Results per page (default: 30, max: 50). A national search returns the grid page size instead and reports `total_pages` as null, because the upstream grid fixes its own page size. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/seloger/search?place_id=AD08FR31096&distribution=buy&estate_types%5B0%5D=Apartment&price_max=500000"
```

## Example response

```json
{
    "success": true,
    "results": [],
    "total_results": 0,
    "page": 1,
    "per_page": 30,
    "total_pages": 0
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 400 | Invalid Request | The request is well formed but cannot be expressed as a SeLoger query. `INVALID_PLACE_ID` means the `place_id` you supplied is not a SeLoger place id (`AD08FR…`); omit it to query the whole of France instead. `INVALID_DISTRIBUTION`, `INVALID_ESTATE_TYPES` and `INVALID_ENERGY_CERTIFICATE_CLASS` name the offending parameter. `INVALID_UPSTREAM_REQUEST` means a combination SeLoger cannot answer honestly, such as `new_build` without `distribution=buy`; the message names it. These failures are not billed. |
| 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)
