{
  "openapi": "3.0.1",
  "info": {
    "title": "Batch Geocode — Google / Mapbox / HERE → GeoJSON",
    "description": "Batch forward & reverse geocoding via the official Google Geocoding, Mapbox and HERE APIs (bring your own key). Lat/lng, formatted address, components, accuracy; GeoJSON + Markdown report; optional Distance Matrix. No Maps scraping. 256 MB. Not-found & failed rows free.",
    "version": "0.1",
    "x-build-id": "pL8G5pQP5V11cEqG5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingenious_quip_bxq~batch-geocode/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingenious_quip_bxq-batch-geocode",
        "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/ingenious_quip_bxq~batch-geocode/runs": {
      "post": {
        "operationId": "runs-sync-ingenious_quip_bxq-batch-geocode",
        "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/ingenious_quip_bxq~batch-geocode/run-sync": {
      "post": {
        "operationId": "run-sync-ingenious_quip_bxq-batch-geocode",
        "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": {
          "addresses": {
            "title": "Addresses (forward geocode)",
            "type": "array",
            "description": "One address per line, e.g. '1600 Amphitheatre Pkwy, Mountain View, CA'. Duplicates (case-insensitive) are removed.",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "title": "Coordinates (reverse geocode)",
            "type": "array",
            "description": "Optional. Array of \"lat,lng\" strings or {\"lat\": 52.5163, \"lng\": 13.3777} objects. Out-of-range or malformed values become free invalid_input rows."
          },
          "datasetId": {
            "title": "Dataset ID (address list)",
            "type": "string",
            "description": "Optional. Read addresses from another Actor's dataset. Uses the field set in 'Address field', else address / fullAddress / query / location / formattedAddress; rows with lat+lng (or latitude+longitude) and no address are reverse-geocoded."
          },
          "keyValueStoreId": {
            "title": "Key-value store ID (address list)",
            "type": "string",
            "description": "Optional. Read addresses from a key-value record: JSON array, {\"addresses\": [...], \"coordinates\": [...]}, or plain text with one address per line."
          },
          "keyValueRecordKey": {
            "title": "Key-value record key",
            "type": "string",
            "description": "Record key inside the key-value store (default INPUT_ADDRESSES).",
            "default": "INPUT_ADDRESSES"
          },
          "addressField": {
            "title": "Address field (dataset / JSON objects)",
            "type": "string",
            "description": "Optional. Name of the field holding the address in dataset items or JSON objects."
          },
          "provider": {
            "title": "Provider",
            "enum": [
              "google",
              "mapbox",
              "here"
            ],
            "type": "string",
            "description": "Which official geocoding API to call with your key.",
            "default": "google"
          },
          "apiKey": {
            "title": "Provider API key (required)",
            "type": "string",
            "description": "Google: Maps Platform API key with the Geocoding API enabled (+ billing). Mapbox: access token. HERE: REST API key. Stored encrypted and never logged or written to output. WITHOUT a key nothing is sent and rows are failed + free (missing_key)."
          },
          "language": {
            "title": "Result language",
            "type": "string",
            "description": "Optional language code for results, e.g. en, de, zh-TW (Google `language`, Mapbox `language`, HERE `lang`)."
          },
          "region": {
            "title": "Region bias (Google)",
            "type": "string",
            "description": "Optional ccTLD region bias for Google forward geocoding, e.g. uk, de, tw."
          },
          "mapboxCountry": {
            "title": "Country filter (Mapbox)",
            "type": "string",
            "description": "Optional comma-separated ISO 3166-1 alpha-2 codes for Mapbox, e.g. us,ca."
          },
          "limit": {
            "title": "Results per address",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Best match goes into the row; extra matches are added to `alternatives` (no extra charge).",
            "default": 1
          },
          "enableDistanceMatrix": {
            "title": "Enable Distance Matrix (Google only)",
            "type": "boolean",
            "description": "Also compute origin × destination distance/duration with the Google Distance Matrix API (your key must have that API enabled). Results go to the MATRIX record and REPORT.md; each OK element is a matrix-element event.",
            "default": false
          },
          "origins": {
            "title": "Origins",
            "type": "array",
            "description": "Addresses or 'lat,lng' strings.",
            "items": {
              "type": "string"
            }
          },
          "destinations": {
            "title": "Destinations",
            "type": "array",
            "description": "Addresses or 'lat,lng' strings.",
            "items": {
              "type": "string"
            }
          },
          "travelMode": {
            "title": "Travel mode",
            "enum": [
              "driving",
              "walking",
              "bicycling",
              "transit"
            ],
            "type": "string",
            "description": "Distance Matrix travel mode.",
            "default": "driving"
          },
          "units": {
            "title": "Units",
            "enum": [
              "metric",
              "imperial"
            ],
            "type": "string",
            "description": "Text units for distances (values are always meters / seconds).",
            "default": "metric"
          },
          "maxMatrixElements": {
            "title": "Max matrix elements",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "Cap on origins × destinations (requests are chunked within Google's 25×25 / 100-element limits).",
            "default": 100
          },
          "maxAddresses": {
            "title": "Max addresses",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many inputs (addresses + coordinates). 0 = no limit.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel provider requests.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries for 429 / OVER_QUERY_LIMIT (honours Retry-After), 5xx / UNKNOWN_ERROR and timeouts with exponential backoff. 401/403/REQUEST_DENIED/ZERO_RESULTS are not retried.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per provider request.",
            "default": 30
          },
          "stopOnAuthError": {
            "title": "Stop on rejected key",
            "type": "boolean",
            "description": "After the provider rejects the key (REQUEST_DENIED / 401 / 403 / OVER_DAILY_LIMIT), mark the remaining inputs as failed without sending them (saves your quota). All free.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}