{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Address Geocoder — Global Address Geocoding",
    "description": "High-speed offline bulk forward & reverse geocoder for 13 countries (AU, BR, CA, FR, DE, IT, MX, NL, NZ, PL, RS, ES, US) powered by GridPin, with direct Apify dataset enrichment (SeLoger, Zillow, Immobiliare) and optional Nominatim fallback. From $0.50/1k.",
    "version": "0.1",
    "x-build-id": "tJrArB4QjRzMpvz8X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~bulk-address-geocoder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-bulk-address-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/memo23~bulk-address-geocoder/runs": {
      "post": {
        "operationId": "runs-sync-memo23-bulk-address-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/memo23~bulk-address-geocoder/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-bulk-address-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": {
          "geocoderMode": {
            "title": "Geocoder Mode",
            "enum": [
              "Forward Geocode — Address to Lat/Lng ($0.50 per 1k)",
              "Reverse Geocode — Lat/Lng to Address ($0.50 per 1k)",
              "Normalize + Forward Geocode ($0.75 per 1k)"
            ],
            "type": "string",
            "description": "Choose forward geocoding (address → lat/lng), reverse geocoding (lat/lng → address), or address normalization + forward geocoding.",
            "default": "Forward Geocode — Address to Lat/Lng ($0.50 per 1k)"
          },
          "addresses": {
            "title": "Addresses (Forward / Normalize modes)",
            "type": "array",
            "description": "Addresses to forward geocode — one string per line (e.g. `1600 Amphitheatre Parkway, Mountain View, CA 94043, US`), or objects `{ \"address\": \"...\", \"countryCode\": \"FR\", \"id\": \"row-1\" }` via API.",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "title": "Coordinates (Reverse mode)",
            "type": "array",
            "description": "Coordinate objects to reverse geocode: `[{ \"lat\": 48.8566, \"lng\": 2.3522, \"countryCode\": \"FR\", \"id\": \"paris-1\" }]`.",
            "default": []
          },
          "datasetId": {
            "title": "Apify Dataset ID (optional direct enrichment)",
            "type": "string",
            "description": "Optional Apify Dataset ID from another scraper (e.g. SeLoger, Zillow, Immobiliare, Idealista). Reads items from that dataset, geocodes each row, and merges the geocoded fields into your output."
          },
          "addressField": {
            "title": "Address Field Name (for Dataset enrichment)",
            "type": "string",
            "description": "Field name (or dot-path like `location.address`) in the input dataset holding the address string. Defaults to `address` (also auto-falls back to combining street/city/postalCode if missing).",
            "default": "address"
          },
          "defaultCountry": {
            "title": "Default Country (ISO-2)",
            "type": "string",
            "description": "Two-letter ISO 3166-1 alpha-2 country code used when an address or coordinate has no explicit country (helps bias Photon results and activates the fast French BAN lane for FR). Leave blank to auto-detect from address text."
          },
          "openGeocoder": {
            "title": "Open-Data Geocoder Engine",
            "enum": [
              "auto",
              "photon",
              "nominatim"
            ],
            "type": "string",
            "description": "Zero-key open geocoder used whenever private GridPin R2 snapshots are not attached. `auto` uses Etalab BAN for FR + Photon (OSM ODbL) globally; `nominatim` skips Photon.",
            "default": "auto"
          },
          "fallbackToNominatim": {
            "title": "Fallback to OpenStreetMap Nominatim (1 req/sec)",
            "type": "boolean",
            "description": "When enabled (default), retries unmatched or rate-limited rows through OpenStreetMap Nominatim (strictly paced <= 1 req/sec with ODbL attribution).",
            "default": true
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of addresses or coordinates to geocode in this run. Free Apify plan is capped at 100 items per run.",
            "default": 10000
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}