{
  "openapi": "3.0.1",
  "info": {
    "title": "Nominatim Address Geocoder",
    "description": "Cheapest Nominatim geocoder. Forward, reverse & OSM lookup. Full address parsing, confidence scoring, enrichment. JSON/CSV/Excel. API, MCP, webhook, AI-agent ready.",
    "version": "0.1",
    "x-build-id": "CV66PUIatje24JFUC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesmith~nominatim-geocoder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesmith-nominatim-geocoder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapesmith~nominatim-geocoder/runs": {
      "post": {
        "operationId": "runs-sync-scrapesmith-nominatim-geocoder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapesmith~nominatim-geocoder/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesmith-nominatim-geocoder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Geocoding Mode",
            "enum": [
              "search",
              "reverse",
              "lookup"
            ],
            "type": "string",
            "description": "Choose geocoding direction: 'search' converts addresses to coordinates, 'reverse' converts coordinates to addresses, 'lookup' retrieves details for known OSM IDs.",
            "default": "search"
          },
          "queries": {
            "title": "Addresses / Search Queries",
            "type": "array",
            "description": "One or more addresses or place names to geocode. Used in 'search' mode. Example: '1600 Amphitheatre Parkway, Mountain View, CA'.",
            "items": {
              "type": "string"
            }
          },
          "latitudes": {
            "title": "Latitudes",
            "type": "array",
            "description": "Latitude values for reverse geocoding. Must match the number of longitudes. Example: '37.4221'.",
            "items": {
              "type": "string"
            }
          },
          "longitudes": {
            "title": "Longitudes",
            "type": "array",
            "description": "Longitude values for reverse geocoding. Must match the number of latitudes. Example: '-122.0841'.",
            "items": {
              "type": "string"
            }
          },
          "osmIds": {
            "title": "OSM IDs",
            "type": "array",
            "description": "OpenStreetMap IDs for lookup mode. Format: type letter + ID (e.g. 'R146656' for relation, 'N240109189' for node, 'W104393803' for way).",
            "items": {
              "type": "string"
            }
          },
          "street": {
            "title": "Street (Structured Search)",
            "type": "string",
            "description": "Street name and house number for structured address search. Use instead of free-text queries for higher precision. Example: '1600 Amphitheatre Parkway'."
          },
          "city": {
            "title": "City (Structured Search)",
            "type": "string",
            "description": "City or town name for structured address search. Example: 'Mountain View'."
          },
          "state": {
            "title": "State (Structured Search)",
            "type": "string",
            "description": "State or province for structured address search. Example: 'California'."
          },
          "postalcode": {
            "title": "Postal Code (Structured Search)",
            "type": "string",
            "description": "ZIP or postal code for structured address search. Example: '94043'."
          },
          "country": {
            "title": "Country (Structured Search)",
            "type": "string",
            "description": "Country name for structured address search. Example: 'United States'."
          },
          "countryCode": {
            "title": "Country Code Filter",
            "type": "string",
            "description": "Restrict results to a specific country using ISO 3166-1 alpha-2 code. Example: 'us', 'de', 'gb'. Leave empty for worldwide search."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Preferred language for results using ISO 639-1 code. Examples: 'en' (English), 'de' (German), 'fr' (French), 'es' (Spanish), 'ja' (Japanese).",
            "default": "en"
          },
          "maxAlternatives": {
            "title": "Max Alternatives",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of alternative matches to return per query in search mode (1-50). Higher values return more candidates for ambiguous addresses.",
            "default": 1
          },
          "referenceLat": {
            "title": "Reference Latitude",
            "type": "number",
            "description": "Latitude of a reference point. When set, each result includes a 'distanceKm' field showing how far it is from this point."
          },
          "referenceLon": {
            "title": "Reference Longitude",
            "type": "number",
            "description": "Longitude of a reference point. Used together with Reference Latitude to calculate distances."
          },
          "maxItems": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of results to return. Leave empty for no limit (subject to plan limits)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}