# Apartments.com Student Housing Locations

The off-campus housing location page for a college, with its title, headings, body text, and the listing keys it links to. Path segments are lower case with spaces hyphenated.

- **Documentation:** [https://scrappa.co/docs/apartments-com-api/apartments_com_student_housing_locations](https://scrappa.co/docs/apartments-com-api/apartments_com_student_housing_locations)
- **API group:** Apartments.com API
- **Endpoint:** `GET https://scrappa.co/api/apartments-com/student-housing-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 |
| --- | --- | --- | --- |
| `state` | string | Yes | State name or code, for example il. |
| `city` | string | Yes | City name. |
| `slug` | string | Yes | College slug exactly as it appears in the Apartments.com off-campus-housing URL (for example alabama-am-university for Alabama A&M University in Normal, AL). The state, city and slug must match an existing page, otherwise 404. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/apartments-com/student-housing-locations?state=al&city=Normal&slug=alabama-am-university"
```

## Example response

```json
{
    "success": true,
    "data": {
        "title": "Apartments For Rent Near Alabama A&M University - Normal, AL",
        "listing_keys": [
            "dsd9v8j"
        ]
    }
}
```

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