# Apartments.com Search

Searches US rentals. Pass geo_mid and geo_type from the locations endpoint, or a free-text location that is resolved first. property_type is a bitmask: apartments, houses, condos, comma separated. Townhomes are not a criteria.type value upstream; filter them client side on listingType 16 from property-placards. amenities filters by upstream amenity code. bbox narrows the results: the upstream search route accepts a bounding box and then ignores it, so bbox is applied locally to the coordinates every listing already returns, and total reports the count inside the box. The upstream search route has no pagination, so one call returns a total count plus at most 500 listings and the response names that cap.

- **Documentation:** [https://scrappa.co/docs/apartments-com-api/apartments_com_search](https://scrappa.co/docs/apartments-com-api/apartments_com_search)
- **API group:** Apartments.com API
- **Endpoint:** `GET https://scrappa.co/api/apartments-com/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 |
| --- | --- | --- | --- |
| `location` | string | No | Free-text place name, resolved to a geography before searching. Typeahead entity types are translated into the search vocabulary, so a neighborhood resolves to geo_type 5. If the text matches only entity types the search route cannot take, such as a property, street, or airport, the request fails with 422 unmappable_location rather than returning an empty result. |
| `geo_mid` | string | No | Geography id from the locations endpoint. |
| `geo_type` | integer | No | 1 street address, 2 zip, 3 city, 5 neighborhood. |
| `property_type` | string | No | apartments, houses, condos, comma separated. Townhomes are not filterable upstream; filter listingType 16 from property-placards. |
| `min_rent` | integer | No | Lowest monthly rent. |
| `max_rent` | integer | No | Highest monthly rent. |
| `min_beds` | integer | No | Lowest bedroom count. |
| `max_beds` | integer | No | Highest bedroom count. |
| `pet_friendly` | boolean | No | Only listings that accept pets. |
| `amenities[]` | array | No | Upstream amenity codes, for example gym or parking. |
| `bbox` | string | No | west,south,east,north. Applied locally to returned coordinates, because upstream ignores it; total then counts only listings inside the box. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/apartments-com/search?location=Chicago%2C+IL&property_type=apartments&max_rent=2200"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total": 13058,
        "returned": 2,
        "listings": [
            {
                "listing_key": "dsd9v8j",
                "price": "$1,741+",
                "latitude": 41.88,
                "longitude": -87.63
            }
        ]
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing, guide, or sitemap was not found. This response is not billable. |
| 422 | Validation Error | A required public parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. This response is not billable. |

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