# Apartments.com Sitemap Index

Lists the US sitemap index files. Pass one of them as sitemap to expand it into listing keys, which is how inventory beyond the 500-result search cap is covered. About 10 percent of harvested keys no longer resolve on the detail route, and the rate is uneven by family: two of the twelve property families resolve only 3 of 6 and 2 of 6 sampled keys, so validate a family before committing volume to it. A 404 from a harvested key is a normal outcome, not an error.

- **Documentation:** [https://scrappa.co/docs/apartments-com-api/apartments_com_sitemap_index](https://scrappa.co/docs/apartments-com-api/apartments_com_sitemap_index)
- **API group:** Apartments.com API
- **Endpoint:** `GET https://scrappa.co/api/apartments-com/sitemap-index`

## 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 |
| --- | --- | --- | --- |
| `sitemap` | string | No | One sitemap from the index, passed verbatim as the full URL or as the bare file name, for example https://www.apartments.com/sitemap_AllBasicSPMProfiles.xml.gz. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/apartments-com/sitemap-index?sitemap=sitemap_AllBasicSPMProfiles.xml.gz"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total_urls": 45000,
        "listing_key_count": 45000
    }
}
```

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