> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Location Suggestions

> Autocomplete locations (cities, ZIPs, neighborhoods, addresses) for a partial query.

## Query Parameters

<ParamField query="query" type="string" required>
  Partial location to autocomplete — a city, ZIP, address, or neighborhood (e.g. `austi`, `9021`, `travis heights`).
</ParamField>

## Response

<ResponseField name="query" type="string">The query prefix that was autocompleted.</ResponseField>

<ResponseField name="results" type="array">
  Array of suggestion objects.

  <Expandable title="Suggestion object">
    <ResponseField name="display" type="string">Human-readable label, e.g. `Austin, TX` (nullable).</ResponseField>
    <ResponseField name="region_id" type="integer">Zillow region id — pass-through key for a region (nullable).</ResponseField>
    <ResponseField name="region_type" type="string">Suggestion type, e.g. `city`, `zipcode`, `neighborhood`, `county`, `state` (nullable).</ResponseField>
    <ResponseField name="latitude" type="number">Center latitude (nullable).</ResponseField>
    <ResponseField name="longitude" type="number">Center longitude (nullable).</ResponseField>
    <ResponseField name="zpid" type="string">Zillow property id — populated when the suggestion is a specific home (nullable).</ResponseField>
    <ResponseField name="metro_id" type="integer">Metro area id (nullable).</ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
{
  "query": "austi",
  "results": [
    {
      "display": "Austin, TX",
      "region_id": 10221,
      "region_type": "city",
      "latitude": 30.2672,
      "longitude": -97.7431,
      "zpid": null,
      "metro_id": 394355
    }
  ]
}
```

<Note>
  Each autocomplete request costs **2 credits**. Failed requests are not charged.
</Note>


## OpenAPI

````yaml GET /v1/zillow/autocomplete
openapi: 3.1.0
info:
  title: ScrapeBadger Zillow API
  version: 1.0.0
  description: >-
    Dedicated Zillow scraping API for searching for-sale / for-rent / sold
    listings, fetching maximal property detail (resoFacts home facts,
    price/tax/Zestimate history, schools, agent attribution, mortgage rates,
    photos), agent profiles (reviews, past sales, licenses), region/address
    autocomplete, and coverage reference data.
servers:
  - url: https://scrapebadger.com
    description: Production
security:
  - apiKeyAuth: []
paths:
  /v1/zillow/autocomplete:
    get:
      tags:
        - Zillow Reference
      summary: Location Suggestions
      description: >-
        Resolve a partial search term to Zillow regions/addresses (regionId,
        lat/lng).
      operationId: zillowAutocomplete
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
          description: Partial location — city, ZIP, address, or neighborhood.
      responses:
        '200':
          description: Suggestions
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/AutocompleteResult'
components:
  schemas:
    AutocompleteResult:
      description: A region/address suggestion resolved for a search term.
      properties:
        display:
          anyOf:
            - type: string
            - type: 'null'
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
        region_type:
          anyOf:
            - type: string
            - type: 'null'
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
        zpid:
          anyOf:
            - type: string
            - type: 'null'
        metro_id:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````