> ## 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.

# Search

> Forward geocode: convert a text query (address, place name, landmark) into geographic coordinates. Results are ranked by relevance. Whenever you have any spatial context — the user's visible viewport, last-known location, a prior result — supply `focus.point.lat`+`focus.point.lon` so common place names ('Cambridge', 'Bath', 'Lebanon') resolve to the one the caller means. Add `boundary.country` (comma-separated ISO 3166-1 alpha-3 codes) when the search context is country-bound.



## OpenAPI

````yaml GET /v1/geocoding/search
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/search:
    get:
      tags:
        - Geocoding
      summary: Search for a place or address
      description: >-
        Forward geocode: convert a text query (address, place name, landmark)
        into geographic coordinates. Results are ranked by relevance. Whenever
        you have any spatial context — the user's visible viewport, last-known
        location, a prior result — supply `focus.point.lat`+`focus.point.lon` so
        common place names ('Cambridge', 'Bath', 'Lebanon') resolve to the one
        the caller means. Add `boundary.country` (comma-separated ISO 3166-1
        alpha-3 codes) when the search context is country-bound.
      operationId: geocodingSearch
      parameters:
        - name: text
          in: query
          required: true
          schema:
            type: string
          description: Search text (address, place name, landmark)
        - name: size
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 40
            default: 5
          description: >-
            Maximum number of results. The top match is the strongest hit; ask
            for more only when you need disambiguation candidates
        - 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 — viewport centre, last-known location, a prior result.
            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: Geocoding results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeocodingSearchResponse'
              examples:
                basic:
                  summary: Search for London
                  value:
                    results:
                      - coordinates:
                          lat: 51.5074
                          lng: -0.1278
                        label: London, England, United Kingdom
                        name: London
                        country: United Kingdom
                        country_code: GBR
                        region: England
                        locality: London
                        confidence: 0.95
                        place_type: locality
                    query:
                      text: London
                      size: 10
                with_focus:
                  summary: Bias towards a location
                  value:
                    results:
                      - coordinates:
                          lat: 39.7817
                          lng: -89.6501
                        label: Springfield, Illinois, United States
                        name: Springfield
                        country: United States
                        country_code: USA
                        region: Illinois
                        locality: Springfield
                        confidence: 0.92
                        place_type: locality
                    query:
                      text: Springfield
                      size: 10
                with_country:
                  summary: Restrict to UK
                  value:
                    results:
                      - coordinates:
                          lat: 51.5034
                          lng: -0.1276
                        label: 10 Downing Street, London, England, United Kingdom
                        name: 10 Downing Street
                        country: United Kingdom
                        country_code: GBR
                        region: England
                        locality: London
                        confidence: 0.98
                        place_type: address
                    query:
                      text: 10 Downing Street
                      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:
    GeocodingSearchResponse:
      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

````