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

# Autocomplete

> Typeahead search: get suggestions as the user types. Optimised for low-latency responses. Supply `focus.point.lat`+`focus.point.lon` whenever you have spatial context — the user's current location, map viewport, last-known anchor — so suggestions reflect where they are. Add `boundary.country` (comma-separated ISO 3166-1 alpha-3 codes) when the search context is country-bound.



## OpenAPI

````yaml GET /v1/geocoding/autocomplete
openapi: 3.1.0
info:
  title: Footstep API
  description: >-
    Terrain-intelligent routing, geocoding, elevation, and spatial analysis.
    Every routing response includes terrain analytics by default. Routing
    endpoints support two response formats: footstep (default, compact) and
    geojson (standard GeoJSON).
  version: 1.0.0
servers:
  - url: https://api.footstep.ai
    description: Production
security:
  - apiKey: []
paths:
  /v1/geocoding/autocomplete:
    get:
      tags:
        - Geocoding
      summary: Autocomplete place search
      description: >-
        Typeahead search: get suggestions as the user types. Optimised for
        low-latency responses. Supply `focus.point.lat`+`focus.point.lon`
        whenever you have spatial context — the user's current location, map
        viewport, last-known anchor — so suggestions reflect where they are. Add
        `boundary.country` (comma-separated ISO 3166-1 alpha-3 codes) when the
        search context is country-bound.
      operationId: geocodingAutocomplete
      parameters:
        - name: text
          in: query
          required: true
          schema:
            type: string
          description: Partial text input for typeahead suggestions
        - name: size
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 40
            default: 10
          description: Maximum number of results
        - name: focus.point.lat
          in: query
          schema:
            type: number
            minimum: -90
            maximum: 90
          description: >-
            Latitude to bias results toward. Supply whenever you have spatial
            context — user's current location, map viewport, last-known anchor.
            Same-name places nearby float above distant namesakes. Pair with
            `focus.point.lon`.
        - name: focus.point.lon
          in: query
          schema:
            type: number
            minimum: -180
            maximum: 180
          description: Longitude to bias results toward. Pair with `focus.point.lat`.
        - name: boundary.country
          in: query
          schema:
            type: string
          description: >-
            Comma-separated ISO 3166-1 alpha-3 country codes to restrict results
            (e.g. 'GBR' or 'GBR,USA'). Set when the search context is
            country-bound.
        - name: place_types
          in: query
          schema:
            type: string
          description: >-
            Comma-separated place types to filter: venue, address, street,
            locality, region, country
      responses:
        '200':
          description: Autocomplete suggestions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeocodingAutocompleteResponse'
              examples:
                basic:
                  summary: Typeahead for 'Buck'
                  value:
                    results:
                      - coordinates:
                          lat: 51.5014
                          lng: -0.1419
                        label: Buckingham Palace, London, England, United Kingdom
                        name: Buckingham Palace
                        country: United Kingdom
                        country_code: GBR
                        region: England
                        locality: London
                        confidence: 0.9
                        place_type: venue
                    query:
                      text: Buck
                      size: 10
                with_focus:
                  summary: Bias towards user location
                  value:
                    results:
                      - coordinates:
                          lat: 40.7484
                          lng: -73.9857
                        label: Empire State Building, New York, United States
                        name: Empire State Building
                        country: United States
                        country_code: USA
                        region: New York
                        locality: New York
                        confidence: 0.88
                        place_type: venue
                    query:
                      text: Empire
                      size: 10
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Geocoding engine unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GeocodingAutocompleteResponse:
      type: object
      required:
        - results
        - query
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/GeocodingResult'
        query:
          type: object
          required:
            - text
            - size
          properties:
            text:
              type: string
            size:
              type: integer
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
    GeocodingResult:
      type: object
      required:
        - coordinates
        - label
        - name
        - confidence
        - place_type
      properties:
        coordinates:
          $ref: '#/components/schemas/GeocodingCoordinate'
        label:
          type: string
          description: Full human-readable label (e.g. 'London, England, United Kingdom')
        name:
          type: string
          description: Short name of the place
        country:
          type: string
          description: Country name
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
        region:
          type: string
          description: Region/state/province
        county:
          type: string
          description: County/district
        locality:
          type: string
          description: City/town
        neighbourhood:
          type: string
          description: Neighbourhood/suburb
        confidence:
          type: number
          minimum: 0
          maximum: 1
          description: Result confidence score (0-1)
        place_type:
          type: string
          description: 'Place type: venue, address, street, locality, region, country'
    GeocodingCoordinate:
      type: object
      required:
        - lat
        - lng
      properties:
        lat:
          type: number
          minimum: -90
          maximum: 90
        lng:
          type: number
          minimum: -180
          maximum: 180
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Footstep API key

````