geocode

Geocode single address

Changed on
get/geocode

Request

  • Base URL
    https://api.geocod.io/v2
  • URL
    https://api.geocod.io/v2/geocode
  • Auth
    API key in query parameter api_key

Query parameters

qstring

The query (i.e. address) to geocode

streetstring

Street address component (alternative to q)

street2string

Secondary address line (e.g. Apt 204)

citystring

City component (alternative to q)

countystring

County component (alternative to q)

state_provincestring

State or province component (alternative to q). The legacy name state is also accepted

postal_codestring

Postal/ZIP code component (alternative to q)

countrystring

Country code (default: US)

limitinteger

Maximum number of results to return

format'simple'

Output format

fieldsstring[]

Comma-separated list of data append fields. See the enum for valid values.

destinations[]string[]

Array of destination locations for distance calculation

distance_mode'driving' | 'straightline'

Distance calculation mode

distance_units'miles' | 'km'

Unit of measurement for distance values

distance_max_resultsinteger

Maximum number of destinations to return per result

distance_max_distancenumber

Maximum distance filter (in specified units)

distance_max_durationinteger

Maximum duration filter in seconds

distance_min_distancenumber

Minimum distance filter (in specified units)

distance_min_durationinteger

Minimum duration filter in seconds

distance_order_by'distance' | 'duration'

Field to sort destinations by

distance_sort_order'asc' | 'desc'

Sort order for destinations

Response

Successful response

_warningsstring[]

Non-fatal advisories about the request — an unrecognized parameter or field name, a superseded API version, or an append that was skipped. Present only when at least one warning was raised.

Changes

    • info

      added the enum value au-census to the property items/ of the query request parameter fields

    • info

      added the enum value au-census2021 to the property items/ of the query request parameter fields

    • info

      added the enum value au-demographics to the property items/ of the query request parameter fields

    • info

      added the enum value au-federal-electorate to the property items/ of the query request parameter fields

    • info

      added the enum value au-federal-electorate-next to the property items/ of the query request parameter fields

    • info

      added the enum value au-housing to the property items/ of the query request parameter fields

    • info

      added the enum value au-income to the property items/ of the query request parameter fields

    • info

      added the enum value au-state-electorate to the property items/ of the query request parameter fields

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the enum value gazetteer to the property items/ of the query request parameter fields

    • info

      added the optional property /// to the response with the status