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

# /osm/geocode/reverse

> Reverse geocoding: resolve a latitude/longitude pair to the nearest OpenStreetMap place and address

**Price:** 1 credit

**⚠️ Common errors:** 412: No place found at the given coordinates



## OpenAPI

````yaml /openapi/local-places.json post /api/osm/geocode/reverse
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/osm/geocode/reverse:
    post:
      tags:
        - /osm
      summary: /osm/geocode/reverse
      description: >-
        Reverse geocoding: resolve a latitude/longitude pair to the nearest
        OpenStreetMap place and address


        **Price:** 1 credit


        **⚠️ Common errors:** 412: No place found at the given coordinates
      operationId: __api_osm_geocode_reverse_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OsmGeocodeReversePayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OsmPlace'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OsmGeocodeReversePayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        lat:
          type: number
          maximum: 90
          minimum: -90
        lon:
          type: number
          maximum: 180
          minimum: -180
        zoom:
          anyOf:
            - type: integer
              maximum: 18
              minimum: 0
            - type: 'null'
        layer:
          anyOf:
            - items:
                $ref: '#/components/schemas/OsmLayer'
              type: array
            - type: 'null'
        address_details:
          type: boolean
          default: true
        extra_tags:
          type: boolean
          default: true
        name_details:
          type: boolean
          default: true
        polygon_geojson:
          type: boolean
          default: false
        accept_language:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - lat
        - lon
    OsmPlace:
      properties:
        '@type':
          type: string
          default: OsmPlace
        place_id:
          anyOf:
            - type: integer
            - type: 'null'
        osm_type:
          anyOf:
            - type: string
            - type: 'null'
        osm_id:
          anyOf:
            - type: integer
            - type: 'null'
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
        category:
          anyOf:
            - type: string
            - type: 'null'
        place_type:
          anyOf:
            - type: string
            - type: 'null'
        place_rank:
          anyOf:
            - type: integer
            - type: 'null'
        importance:
          anyOf:
            - type: number
            - type: 'null'
        addresstype:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        display_name:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - $ref: '#/components/schemas/OsmAddress'
            - type: 'null'
        extratags:
          additionalProperties: true
          type: object
          default: {}
        namedetails:
          additionalProperties: true
          type: object
          default: {}
        boundingbox:
          items:
            type: number
          type: array
          default: []
        geojson:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        source_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    OsmLayer:
      type: string
      enum:
        - address
        - poi
        - railway
        - natural
        - manmade
    OsmAddress:
      properties:
        '@type':
          type: string
          default: OsmAddress
        house_number:
          anyOf:
            - type: string
            - type: 'null'
        road:
          anyOf:
            - type: string
            - type: 'null'
        quarter:
          anyOf:
            - type: string
            - type: 'null'
        neighbourhood:
          anyOf:
            - type: string
            - type: 'null'
        suburb:
          anyOf:
            - type: string
            - type: 'null'
        borough:
          anyOf:
            - type: string
            - type: 'null'
        city_district:
          anyOf:
            - type: string
            - type: 'null'
        city:
          anyOf:
            - type: string
            - type: 'null'
        municipality:
          anyOf:
            - type: string
            - type: 'null'
        county:
          anyOf:
            - type: string
            - type: 'null'
        state_district:
          anyOf:
            - type: string
            - type: 'null'
        state:
          anyOf:
            - type: string
            - type: 'null'
        region:
          anyOf:
            - type: string
            - type: 'null'
        postcode:
          anyOf:
            - type: string
            - type: 'null'
        country:
          anyOf:
            - type: string
            - type: 'null'
        country_code:
          anyOf:
            - type: string
            - type: 'null'
        iso3166_2:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````