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

# Geocoding Typeahead

> Type-ahead suggestions for towns, cities, states, and postcodes across 17 countries. Returns coordinates when users select a location from results.

The Global Geocoding API currently supports an initial set of 18 countries, with more scheduled for inclusion in the near future.
See the 'List of available countries' section below for details of which territories are available.

<Accordion title="List of available countries">
  | ISO Code | Country Name      |
  | :------- | :---------------- |
  | AU       | Australia         |
  | BE       | Belgium           |
  | CZ       | Czech Republic    |
  | DE       | Germany           |
  | ES       | Spain             |
  | FR       | France            |
  | GB       | United Kingdom    |
  | HU       | Hungary           |
  | IE       | Ireland           |
  | IT       | Italy             |
  | JP       | Japan             |
  | KR       | Republic of Korea |
  | NL       | Netherlands       |
  | NZ       | New Zealand       |
  | PL       | Poland            |
  | PT       | Portugal          |
  | RO       | Romania           |
  | SL       | Slovenia          |
  | SK       | Slovakia          |
  | US       | United States     |
</Accordion>

Text searches using the "Input" field are always free. This method will consume credit per "addressID" search and co-ordinates returned.

### Use of geocodes/addresses

Use of the output of the Global Geocoding API is temporary, and only for use as part of a Store Finder. It is not permitted to index or store results for other purposes,
such as use in a checkout process. For further information please see the [Loqate Terms and Conditions](https://www.gbgplc.com/en/legal-and-regulatory/products/loqate-storefinder/legal-notices-loqate-storefinder/).


## OpenAPI

````yaml geocoding_typeahead post /LocationServices/Geocoding/GlobalTypeAhead/v1.10/json6.ws
openapi: 3.0.0
info:
  title: LocationServices_Geocoding_GlobalTypeAhead
  description: ''
  version: '1.1'
servers:
  - url: https://api.addressy.com
security:
  - ApiKeyQuery: []
paths:
  /LocationServices/Geocoding/GlobalTypeAhead/v1.10/json6.ws:
    post:
      tags:
        - LocationServices_Geocoding_GlobalTypeAhead
      summary: LocationServices_Geocoding_GlobalTypeAhead
      operationId: LocationServices_Geocoding_GlobalTypeAhead
      requestBody:
        x-name: body
        content:
          application/json:
            schema:
              title: TypeAheadGeocodingRequest
              allOf:
                - $ref: '#/components/schemas/RequestItemKeyRequired'
                - type: object
                  additionalProperties: false
                  required:
                    - Input
                    - Countries
                  properties:
                    Input:
                      type: string
                      description: >-
                        The search text to find. This can be a Town, City,
                        State, Postcode or ZIP Code. Requests made using this as
                        an input will be free.
                    Countries:
                      type: string
                      description: >-
                        A comma separated list of ISO2 or ISO3 country codes
                        (e.g. GB or GBR). This will limit the search to those
                        countries.
                    Limit:
                      type: integer
                      description: >-
                        The maximum number of results that will be returned. If
                        not set this will default to 7. The maximum possible
                        value is 100.
                      format: int32
                      default: 7
                      nullable: true
                    Types:
                      type: string
                      description: >-
                        The types that you want to be returned in the response.
                        Valid types are Locality | Postcode |
                        AdministrativeArea. This can be set to include multiple
                        types (comma separated). For example, passing "Postcode"
                        will only return Postcode results; passing "Locality,
                        Postcode" will return both Locality and Postcode.
                    Origin:
                      type: string
                      description: >-
                        A starting location for the search. This can be the name
                        or ISO 2 or 3 character code of a country, WGS84
                        coordinates (comma separated) or IP address to search
                        from.
                    addressID:
                      type: string
                      description: >-
                        The unique identifier for a location, as provided in a
                        previous Input search. For example:
                        "VE_CiVlgwok_QT1BPT4_QT1FP0U-PT5Dwok_QD0". Requests made
                        with this parameter will return co-ordinates and be
                        charged.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: ListOfExternalTypeaheadResponseItem
                type: array
                items:
                  $ref: '#/components/schemas/ExternalTypeaheadResponseItem'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                title: ErrorResponseSelfContained
                type: object
                additionalProperties: false
                properties:
                  Number:
                    type: integer
                    format: int32
                  Description:
                    type: string
                  Cause:
                    type: string
                  Resolution:
                    type: string
              examples:
                Request not allowed from this IP:
                  summary: Request not allowed from this IP
                  value:
                    Number: 4
                    Description: Request not allowed from this IP
                    Cause: The request was disallowed from the IP address.
                    Resolution: >-
                      Check the security settings on the key first. If they look
                      fine, please contact support as it may be from an IP
                      address on our blacklist.
                Request not allowed from this URL:
                  summary: Request not allowed from this URL
                  value:
                    Number: 5
                    Description: Request not allowed from this URL
                    Cause: The request was disallowed from the URL.
                    Resolution: >-
                      Check the security settings on the key first. If they look
                      fine, please contact support as it may be from a URL on
                      our blacklist.
                Web service not available on this key:
                  summary: Web service not available on this key
                  value:
                    Number: 6
                    Description: Web service not available on this key
                    Cause: The requested web service is disallowed on this key.
                    Resolution: >-
                      Check the security settings on the key first. You can
                      limit a key to certain web services.
                Missing or invalid parameters:
                  summary: Missing or invalid parameters
                  value:
                    Number: 18
                    Description: Missing or invalid parameters
                    Cause: >-
                      A required parameter was not supplied of the value of a
                      parameter cannnot be converted into the right type.
                    Resolution: >-
                      Check the parameters passed and their values against the
                      specification for this service.
                Invalid JSON object:
                  summary: Invalid JSON object
                  value:
                    Number: 19
                    Description: Invalid JSON object
                    Cause: The JSON object sent in your request is invalid.
                    Resolution: >-
                      Please ensure your JSON object is syntactically correct
                      and try again.
                Endpoint not available:
                  summary: Endpoint not available
                  value:
                    Number: 20
                    Description: Endpoint not available
                    Cause: >-
                      The web service you are calling is not available on this
                      endpoint
                    Resolution: >-
                      Refer to our documentation pages to ensure you are calling
                      a valid endpoint for the web service you are requesting.
                Sandbox Mode is not available on this endpoint:
                  summary: Sandbox Mode is not available on this endpoint
                  value:
                    Number: 21
                    Description: Sandbox Mode is not available on this endpoint
                    Cause: >-
                      The License key used has Sandbox Mode enabled, but the
                      testing functionality is not available on this endpoint.
                    Resolution: Disable the Sandbox Mode on the License key.
                HTTPS requests only:
                  summary: HTTPS requests only
                  value:
                    Number: 22
                    Description: HTTPS requests only
                    Cause: As of 3rd September 2018 all new accounts must use HTTPS.
                    Resolution: >-
                      Ensure you consume all of our APIs over HTTPS and not
                      HTTP.
                Unexpected Error:
                  summary: Unexpected Error
                  value:
                    Number: 1000
                    Description: Unexpected Error
                    Cause: >-
                      The cause of the error is unknown but details have been
                      passed to our support staff who will investigate.
                    Resolution: >-
                      These problems are typically short lived and are often
                      resolved by trying again in a few minutes..
                Unsupported HttpMethod:
                  summary: Unsupported HttpMethod
                  value:
                    Number: 1001
                    Description: Unsupported HttpMethod
                    Cause: The HttpMethod has been set incorrectly
                    Resolution: You should only use GET or POST
                Bad Request Data:
                  summary: Bad Request Data
                  value:
                    Number: 1002
                    Description: Bad Request Data
                    Cause: Missing parameters in the request
                    Resolution: The Input parameter and Countries parameter are required
                Invalid Country Code:
                  summary: Invalid Country Code
                  value:
                    Number: 1003
                    Description: Invalid Country Code
                    Cause: Invalid Country Code
                    Resolution: The Country code parameter should be Iso2 or Iso3
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                title: ErrorResponseSelfContained
                type: object
                additionalProperties: false
                properties:
                  Number:
                    type: integer
                    format: int32
                  Description:
                    type: string
                  Cause:
                    type: string
                  Resolution:
                    type: string
              examples:
                Unknown key:
                  summary: Unknown key
                  value:
                    Number: 2
                    Description: Unknown key
                    Cause: The key you are using to access the service was not found.
                    Resolution: >-
                      Please check that the key is correct. It should be in the
                      form AA11-AA11-AA11-AA11.
                Agreement Not Signed:
                  summary: Agreement Not Signed
                  value:
                    Number: 23
                    Description: Agreement Not Signed
                    Cause: >-
                      There are agreements associated with service which are not
                      signed.
                    Resolution: Please go to your account and check your agreements.
                Not enough credit for request:
                  summary: Not enough credit for request
                  value:
                    Number: 24
                    Description: Not enough credit for request
                    Cause: >-
                      There is not enough credit on the account to process the
                      request.
                    Resolution: Please topup your account with credit.
                Unexpected error, please contact the help desk for more information:
                  summary: >-
                    Unexpected error, please contact the help desk for more
                    information
                  value:
                    Number: 25
                    Description: >-
                      Unexpected error, please contact the help desk for more
                      information
                    Cause: ''
                    Resolution: ''
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                title: ErrorResponseSelfContained
                type: object
                additionalProperties: false
                properties:
                  Number:
                    type: integer
                    format: int32
                  Description:
                    type: string
                  Cause:
                    type: string
                  Resolution:
                    type: string
              examples:
                Account out of credit:
                  summary: Account out of credit
                  value:
                    Number: 3
                    Description: Account out of credit
                    Cause: >-
                      Your account is either out of credit or has insufficient
                      credit to service this request.
                    Resolution: >-
                      Please check your account balance and top it up if
                      necessary.
                Web service not available on your plan:
                  summary: Web service not available on your plan
                  value:
                    Number: 7
                    Description: Web service not available on your plan
                    Cause: >-
                      The requested web service is not currently available on
                      your payment plan.
                    Resolution: >-
                      Some services are only available in specific regions due
                      to licensing restrictions. Please contact us for more
                      information.
                Key daily limit exceeded:
                  summary: Key daily limit exceeded
                  value:
                    Number: 8
                    Description: Key daily limit exceeded
                    Cause: The daily limit on the key has been exceeded.
                    Resolution: >-
                      Alter the daily limit on the key. Check the usage details
                      first to see if usage is normal.
                Your account has been suspended:
                  summary: Your account has been suspended
                  value:
                    Number: 9
                    Description: Your account has been suspended
                    Cause: >-
                      Your account has been suspended. This can be for a number
                      of reasons including non-payment of an invoice.
                    Resolution: Please contact us in order to resolve this issue.
                Surge protector triggered:
                  summary: Surge protector triggered
                  value:
                    Number: 10
                    Description: Surge protector triggered
                    Cause: >-
                      An unusually large number of requests have been processed
                      for your account so the surge protector has been enabled.
                    Resolution: >-
                      You can disable the surge protector at any time but this
                      is only recommended if you are running through a batch of
                      requests.
                No valid license available:
                  summary: No valid license available
                  value:
                    Number: 11
                    Description: No valid license available
                    Cause: The request requires a valid license but none were found.
                    Resolution: >-
                      Please check your purchase history. You may be using a
                      license that is no longer valid or of an incorrect type.
                Management key required:
                  summary: Management key required
                  value:
                    Number: 12
                    Description: Management key required
                    Cause: >-
                      To use this web service you require a management key.
                      Management can be enabled on any key, but we advise you to
                      use management keys with care.
                    Resolution: >-
                      Sign in to the website and create a new management key or
                      change an existing key.
                Demo limit exceeded:
                  summary: Demo limit exceeded
                  value:
                    Number: 13
                    Description: Demo limit exceeded
                    Cause: >-
                      The daily demonstration limit for this service or account
                      has been exceeded.
                    Resolution: >-
                      The limit will be reset at midnight tonight. If you would
                      like the limit increased, please contact us.
                Free service limit exceeded:
                  summary: Free service limit exceeded
                  value:
                    Number: 14
                    Description: Free service limit exceeded
                    Cause: You have used too many free web services.
                    Resolution: >-
                      Our web services are designed to operate in stages. The
                      first is usually a Find service followed by a Retrieve. If
                      you use too many Finds without the corresponding number of
                      Retrieves you will receive this error. For more
                      information, please contact us.
                Wrong type of key:
                  summary: Wrong type of key
                  value:
                    Number: 15
                    Description: Wrong type of key
                    Cause: >-
                      The type of key you're using isn't supported by this web
                      service.
                    Resolution: >-
                      This usually happens if you're using a user or server
                      license with a web service that only supports
                      transactional keys. Please use another key and try again.
                Key expired:
                  summary: Key expired
                  value:
                    Number: 16
                    Description: Key expired
                    Cause: The key you are trying to use has expired.
                    Resolution: >-
                      Please check that you are using the right key. A new one
                      may have been issued if you recently renewed your key.
                      Contact us if you have any questions.
                Individual User exceeded Lookup Limit:
                  summary: Individual User exceeded Lookup Limit
                  value:
                    Number: 17
                    Description: Individual User exceeded Lookup Limit
                    Cause: >-
                      An Individual User has exceeded their daily lookup limit
                      on the key and that user will be prevented from using your
                      service until tomorrow (GMT)
                    Resolution: >-
                      Check the usage details. If required, increase the Lookup
                      Limit per Individual User or add the specific Individual
                      User's IP to the Limiter Exclusions
        '500':
          description: InternalServerError
          content:
            application/json:
              schema:
                title: ErrorResponseSelfContained
                type: object
                additionalProperties: false
                properties:
                  Number:
                    type: integer
                    format: int32
                  Description:
                    type: string
                  Cause:
                    type: string
                  Resolution:
                    type: string
              examples:
                Unknown error:
                  summary: Unknown error
                  value:
                    Number: -1
                    Description: Unknown error
                    Cause: >-
                      The cause of the error is unknown but details have been
                      passed to our support staff who will investigate.
                    Resolution: >-
                      These problems are typically short lived and are often
                      resolved by trying again in a few minutes.
components:
  schemas:
    RequestItemKeyRequired:
      allOf:
        - $ref: '#/components/schemas/RequestItem'
        - type: object
          additionalProperties: false
          required:
            - Key
          properties:
            Key:
              type: string
              description: >-
                The key you want to use to authenticate with the service (you
                can request we create one for you or create one in your [account
                section](https://account.loqate.com/account#/)).
              default: AA11-AA11-AA11-AA11
    ExternalTypeaheadResponseItem:
      type: object
      additionalProperties: false
      properties:
        Id:
          type: string
          description: >-
            The unique identifier for a returned location. For example:
            "VE_CiVlgwok_QT1BPT4_QT1FP0U - PT5Dwok_QD0". This can be used in a
            subsequent "addressID" search to return co-ordinates for the
            location.
        Text:
          type: string
          description: >-
            The first half of the result that's displayed to the user. For
            example, if the returned location is "Worcester, Worcestershire"
            then Text will display "Worcester".
        Type:
          type: string
          description: >-
            The type of location returned. Possible values include:
            SuperAdministrativeArea |AdministrativeArea | SubAdministrativeArea
            | Locality | DependentLocality | DoubleDependentLocality | Postcode
        Description:
          type: string
          description: >-
            The second half of the location that's displayed to the user,
            featuring the broader geographic area. For example, if the returned
            location is "Worcester, Worcestershire" then Description will
            display "Worcestershire" as this is the larger geographic area.
        Highlight:
          type: string
          description: >-
            A list of number ranges showing which characters in the Text and
            Description fields match the user's search term. This can be used to
            determine which characters should be highlighted in bold in the
            search field, to give the user a visual representation of what's
            being searched. See [here](/api-reference/address-capture/highlight)
            for more details.
        Language:
          type: string
          description: >-
            The ISO code of the display language for a result (for example:
            "ENG" to represent English).
        Location:
          $ref: '#/components/schemas/ExternalLocation'
          description: >-
            An array containing the Latitude and Longitude co-ordinates for the
            given location.
        DependentThoroughfare:
          type: string
          description: Currently will always return blank.
        DependentLocality:
          type: string
          description: >-
            A smaller population centre, dependent on the contents of the
            Locality field (i.e. District). Can only be present if Locality is
            present.
        OrganisationName:
          type: string
          description: Currently will always return blank.
        SuperAdministrativeArea:
          type: string
          description: >-
            The largest administrative district within a country, if applicable
            (most countries only use AdministrativeArea).
        DoubleDependentLocality:
          type: string
          description: A locality within a Dependent locality.
        Thoroughfare:
          type: string
          description: >-
            The name of the street or thoroughfare. Will only display for UK
            postcodes.
        AdministrativeArea:
          type: string
          description: >-
            The most common administrative district within a country (i.e. US
            State or UK County).
        BuildingName:
          type: string
          description: Currently will always return blank.
        SubAdministrativeArea:
          type: string
          description: >-
            In the US this can be used to define a county within a state or a
            sub area of a city.
        Locality:
          type: string
          description: >-
            The most common population centre within a country (i.e. USA City,
            Canadian Municipality).
        Postcode:
          type: string
          description: The full postal code of the address (i.e. Postcode, ZIP Code, etc.).
        Department:
          type: string
          description: Currently will always return blank.
        SubBuilding:
          type: string
          description: Currently will always return blank.
        SubBuildingFloor:
          type: string
          description: Currently will always return blank.
        Number:
          type: string
          description: Currently will always return blank.
        Country:
          type: string
          description: >-
            The full name of the country the location is in, as per the ISO
            3166-1 standard. Intended for display purposes if you want to
            present this to the customer.
        Iso2:
          type: string
          description: The ISO 3166-1 alpha-2 country code for the location.
        Iso3:
          type: string
          description: The ISO 3166-1 alpha-3 country code for the location.
        AdditionalFields:
          $ref: '#/components/schemas/ExternalAdditionalFields'
    RequestItem:
      type: object
      additionalProperties: false
      properties:
        Key:
          type: string
    ExternalLocation:
      type: object
      additionalProperties: false
      properties:
        Latitude:
          type: number
          format: double
        Longitude:
          type: number
          format: double
    ExternalAdditionalFields:
      type: object
      additionalProperties: false
      properties:
        Easting:
          type: integer
          format: int32
        Northing:
          type: integer
          format: int32
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      name: Key
      in: query

````