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

# Structured Search

> Forward geocode using structured address components instead of free text. More precise than text search when you already have address fields separated (e.g. from a database or form). Provide as many fields as you have. The more you provide, the more accurate the result.



## OpenAPI

````yaml GET /v1/geocoding/structured-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/structured-search:
    get:
      tags:
        - Geocoding
      summary: Search by address components
      description: >-
        Forward geocode using structured address components instead of free
        text. More precise than text search when you already have address fields
        separated (e.g. from a database or form). Provide as many fields as you
        have. The more you provide, the more accurate the result.
      operationId: geocodingStructuredSearch
      parameters:
        - name: address
          in: query
          schema:
            type: string
          description: House number and street (e.g. '10 Downing Street')
        - name: neighbourhood
          in: query
          schema:
            type: string
          description: Neighbourhood or suburb
        - name: locality
          in: query
          schema:
            type: string
          description: City or town
        - name: county
          in: query
          schema:
            type: string
          description: County or district
        - name: region
          in: query
          schema:
            type: string
          description: State, province, or region
        - name: postalcode
          in: query
          schema:
            type: string
          description: Postal or ZIP code
        - name: country
          in: query
          schema:
            type: string
          description: ISO 3166-1 alpha-3 country code (e.g. GBR, USA)
        - 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: 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:
                full_address:
                  summary: Full UK address
                  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: ''
                      size: 10
                city_country:
                  summary: City and country only
                  value:
                    results:
                      - coordinates:
                          lat: 48.8566
                          lng: 2.3522
                        label: Paris, Île-de-France, France
                        name: Paris
                        country: France
                        country_code: FRA
                        region: Île-de-France
                        locality: Paris
                        confidence: 0.95
                        place_type: locality
                    query:
                      text: ''
                      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

````