# RentFaster Autocomplete API Documentation

<p><strong>RentFaster Autocomplete API</strong> suggests cities, communities and addresses for a partial name, in sections. Each item has the id, label, URL, province, coordinates and the number of listings. City items carry the <code>city_id</code> that the search and filters endpoints need. Send <code>popular=true</code> instead of a query to list the most listed cities and communities.</p>

- **Documentation:** [https://scrappa.co/docs/rentfaster-api/rentfaster_autocomplete](https://scrappa.co/docs/rentfaster-api/rentfaster_autocomplete)
- **API group:** RentFaster API
- **Endpoint:** `GET https://scrappa.co/api/rentfaster/autocomplete`

## 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 | No | Partial place name, e.g. calg. Required unless popular is true. |
| `popular` | boolean | No | true to list the most listed cities and communities. |

## Example response

```json
{
    "data": {
        "query": "calg",
        "popular": false,
        "sections": [
            {
                "type": "City",
                "items": [
                    {
                        "id": 1,
                        "url": "https://www.rentfaster.ca/ab/calgary/rentals/",
                        "city": "Calgary",
                        "name": "Calgary, AB",
                        "slug": "/ab/calgary/rentals/",
                        "type": "City",
                        "label": "Calgary, AB",
                        "city_id": 1,
                        "is_fuzzy": false,
                        "latitude": 51.045833,
                        "province": "Alberta",
                        "longitude": -114.0575,
                        "listing_id": null,
                        "community_id": null,
                        "listing_count": 6746,
                        "province_code": "AB",
                        "is_autocorrect_match": false
                    }
                ],
                "title": "Cities"
            },
            {
                "type": "Community",
                "items": [
                    {
                        "id": 17,
                        "url": "https://www.rentfaster.ca/ab/calgary/rentals/beltline/",
                        "city": "Calgary",
                        "name": "Beltline, Calgary",
                        "slug": "/ab/calgary/rentals/beltline/",
                        "type": "Community",
                        "label": "Beltline, Calgary, AB",
                        "city_id": 1,
                        "is_fuzzy": false,
                        "latitude": 51.04177,
                        "province": "Alberta",
                        "longitude": -114.07018,
                        "listing_id": null,
                        "community_id": 17,
                        "listing_count": 254,
                        "province_code": "AB",
                        "is_autocorrect_match": false
                    },
                    {
                        "id": 1687,
                        "url": "https://www.rentfaster.ca/ab/calgary/rentals/seton/",
                        "city": "Calgary",
                        "name": "Seton, Calgary",
                        "slug": "/ab/calgary/rentals/seton/",
                        "type": "Community",
                        "label": "Seton, Calgary, AB",
                        "city_id": 1,
                        "is_fuzzy": false,
                        "latitude": 50.879036,
                        "province": "Alberta",
                        "longitude": -113.952234,
                        "listing_id": null,
                        "community_id": 1687,
                        "listing_count": 183,
                        "province_code": "AB",
                        "is_autocorrect_match": false
                    }
                ],
                "title": "Communities"
            },
            {
                "type": "Address",
                "items": [
                    {
                        "id": 582363,
                        "url": "https://www.rentfaster.ca/properties/bedridge-place-ne-calgary-calgary-582363",
                        "city": "Calgary",
                        "name": "Bedridge Place NE Calgary",
                        "slug": "/properties/bedridge-place-ne-calgary-calgary-582363",
                        "type": "Address",
                        "label": "Bedridge Place NE Calgary, Calgary, AB",
                        "units": 1,
                        "city_id": 1,
                        "summary": "2 Beds | 2 Baths",
                        "is_fuzzy": false,
                        "latitude": 51.126662,
                        "province": null,
                        "verified": true,
                        "longitude": -114.067527,
                        "listing_id": 582363,
                        "community_id": null,
                        "listing_count": null,
                        "property_name": null,
                        "property_type": "Townhouse",
                        "province_code": "AB",
                        "is_autocorrect_match": false
                    },
                    {
                        "id": 135278,
                        "url": "https://www.rentfaster.ca/properties/10-brentwood-common-nw-calgary-ab-canada-calgary-135278",
                        "city": "Calgary",
                        "name": "10 Brentwood common NW, Calgary, AB, Canada",
                        "slug": "/properties/10-brentwood-common-nw-calgary-ab-canada-calgary-135278",
                        "type": "Address",
                        "label": "10 Brentwood common NW, Calgary, AB, Canada, Calgary, AB",
                        "units": 1,
                        "city_id": 1,
                        "summary": "2 Beds | 2 Baths",
                        "is_fuzzy": false,
                        "latitude": 51.086943,
                        "province": null,
                        "verified": true,
                        "longitude": -114.128243,
                        "listing_id": 135278,
                        "community_id": null,
                        "listing_count": null,
                        "property_name": null,
                        "property_type": "Apartment",
                        "province_code": "AB",
                        "is_autocorrect_match": false
                    }
                ],
                "title": "Addresses"
            }
        ],
        "total_items": 6
    },
    "meta": {
        "billable": true,
        "duration_ms": 900,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | RentFaster is temporarily unavailable. This response is not billable and can be retried. |

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