Address and Location AutoComplete

POST /v2/AutoComplete

Search for addresses, cities, neighborhoods, and other location types with autocomplete functionality. Supports various search types including addresses, streets, cities, neighborhoods, counties, APNs, states, and ZIP codes.

Headers

  • x-api-key string Required

    API key for authentication

  • x-user-id string

    Optional user identifier for tracking and analytics

application/json

Body Required

AutoComplete search request

  • search_types string | array[string]

    Search type codes:

    • A: Address
    • S: Street
    • C: City
    • G: Neighborhood
    • N: County
    • P: APN (Assessor's Parcel Number)
    • T: State
    • Z: ZIP Code
    One of:

    Values are A, C, G, N, P, S, T, or Z.

    Values are A, C, G, N, P, S, T, or Z.

  • latitude number

    Latitude to bias the search results

    Minimum value is -90, maximum value is 90.

  • longitude number

    Longitude to bias the search results

    Minimum value is -180, maximum value is 180.

  • precision integer

    Number of precision digits for coordinates

    Minimum value is 1, maximum value is 10. Default value is 3.

Responses

  • 200 application/json

    Successful response with autocomplete suggestions

    Hide response attributes Show response attributes object
    • input object

      Echo of the input parameters

    • data array[object]

      Array of autocomplete suggestions

      Hide data attributes Show data attributes object
      • title string

        Display title for the suggestion

      • searchType string

        Type of the suggestion

        Values are A, C, G, N, P, S, T, or Z.

      • city string

        City name

      • state string

        State abbreviation

      • zip string

        ZIP code

      • county string

        County name

    • totalResults integer

      Total number of suggestions found

    • returnedResults integer

      Number of suggestions returned

    • statusCode integer

      HTTP status code

    • live boolean

      Indicates if data is live

  • 400 application/json

    Bad Request - Invalid input parameters

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
    • details object

      Additional error details

  • 401 application/json

    Unauthorized - Invalid or missing API key

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
POST /v2/AutoComplete
curl \
 --request POST 'https://api.realestateapi.com/v2/AutoComplete' \
 --header "Content-Type: application/json" \
 --header "x-api-key: string" \
 --header "x-user-id: string" \
 --data '{"search":"peachtree"}'
{
  "search": "peachtree"
}
{
  "search": "peachtree",
  "latitude": 33.749,
  "longitude": -84.388
}
{
  "search": "peachtree",
  "latitude": 33.749,
  "longitude": -84.388,
  "search_types": [
    "A",
    "C"
  ]
}
Response examples (200)
{
  "data": [
    {
      "city": "Peachtree City",
      "state": "GA",
      "title": "Peachtree City, GA",
      "searchType": "C"
    },
    {
      "city": "Peachtree Corners",
      "state": "GA",
      "title": "Peachtree Corners, GA",
      "searchType": "C"
    }
  ],
  "live": true,
  "input": {
    "search": "peachtree",
    "latitude": 33.749,
    "longitude": -84.388
  },
  "statusCode": 200,
  "totalResults": 25,
  "returnedResults": 2
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "Invalid input parameters",
  "statusCode": 400,
  "details": {}
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key",
  "statusCode": 401
}
Response examples (500)
{
  "error": "Internal Server Error",
  "message": "An unexpected error occurred",
  "statusCode": 500
}