{
  "openapi": "3.0.1",
  "info": {
    "title": "Geocoding API - Address Verification and Lat Long Lookup",
    "description": "Turn addresses into rooftop latitude and longitude, or verify and standardize them against global postal reference data. Returns ranked candidates with a precision code, parsed address components, postal code plus add-on and per field match flags. Worldwide coverage.",
    "version": "0.1",
    "x-build-id": "B2w5zIyC87xpNuEnv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~geocoding-address-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-geocoding-address-api",
        "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/nabeelbaghoor~geocoding-address-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-geocoding-address-api",
        "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/nabeelbaghoor~geocoding-address-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-geocoding-address-api",
        "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": "What this run does",
            "enum": [
              "geocode",
              "verify"
            ],
            "type": "string",
            "description": "Geocode turns each address into coordinates and returns ranked candidates with a precision code. Verify checks each address against postal reference data and returns the standardized form with a pass or fail status. These are separately entitled services at this provider, so a subscription may cover one and not the other.",
            "default": "geocode"
          },
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "One entry per address. A plain string is used as a whole address in one line, which is what the geocoding service prefers. An object may use this provider's own field names, addressLine1, addressLine2, firmName, city, stateProvince, postalCode and country, and everyday names are accepted too, so line1, town, state, zip and company all work. Whichever shape you give, the other is assembled for you, so the same list runs through either mode."
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own API key for this provider. Bring your own credentials: nothing is shared between runs and the credentials are never written to the dataset. The key and secret are issued as a pair per project, and are exchanged once per run for an access token."
          },
          "apiSecret": {
            "title": "API secret",
            "type": "string",
            "description": "Your own API secret for this provider, the other half of the pair. It is used only for the token exchange and never reaches a data call."
          },
          "bundle": {
            "title": "Geocoding accuracy",
            "enum": [
              "premium",
              "advanced",
              "basic"
            ],
            "type": "string",
            "description": "How precisely the geocoding service places a point. This sits in the request path at this provider, so it decides both the accuracy and the price, and your subscription has to cover the tier you pick. Ignored in verify mode.",
            "default": "premium"
          },
          "country": {
            "title": "Default country",
            "type": "string",
            "description": "A country applied to every address that does not name its own, given as a name or an ISO code such as USA, GBR, DEU or AUS. This provider selects its reference data by country, so setting it correctly is what decides which sources an address is checked against.",
            "default": "USA"
          },
          "matchMode": {
            "title": "Match leniency",
            "enum": [
              "Exact",
              "Standard",
              "Relaxed",
              "Custom",
              "Interactive(USA Only)",
              "CASS(USA Only)"
            ],
            "type": "string",
            "description": "How much difference between your address and the reference data the geocoding service will tolerate. Exact accepts almost nothing. Standard is the sensible default. Relaxed finds more at the cost of some wrong matches. The two named for a single country only work in that country.",
            "default": "Standard"
          },
          "maxCandidates": {
            "title": "Candidates per address",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many possible matches the geocoding service may return for one address. Above one is how an ambiguous address returns every possibility rather than a single guess. Each candidate is a row and is charged as a row.",
            "default": 1
          },
          "fallbackGeo": {
            "title": "Fall back to a region centroid",
            "type": "boolean",
            "description": "When no address level match is possible, return the centre of the geographic region instead of nothing. Useful for mapping at a glance, misleading for anything that needs a real location, because the point will look precise and will not be.",
            "default": true
          },
          "fallbackPostal": {
            "title": "Fall back to a postal centroid",
            "type": "boolean",
            "description": "When no address level match is possible, return the centre of the postal code instead of nothing. Same caution as the region fallback: check the precision code before treating a coordinate as exact.",
            "default": true
          },
          "removeAccentMarks": {
            "title": "Strip accents",
            "type": "boolean",
            "description": "Suppress accents and other diacritical marks in the returned address. Turn this on when the result has to go into a system that cannot store them.",
            "default": false
          },
          "outputCasing": {
            "title": "Output casing (verify)",
            "enum": [
              "U",
              "M"
            ],
            "type": "string",
            "description": "How the standardized address is capitalised in verify mode. Upper case is what most postal standards expect. Mixed case is what you want if the address will be shown to a person.",
            "default": "U"
          },
          "batchSize": {
            "title": "Addresses per request (verify)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many addresses go up in one verification request. The provider takes a batch but does not publish a ceiling, so this is this actor's own chunk size and is deliberately conservative. Lower it if large batches are being refused.",
            "default": 25
          },
          "skipUnmatched": {
            "title": "Only keep matched addresses",
            "type": "boolean",
            "description": "Leave addresses that did not match out of the dataset entirely. Off by default, because a confirmed non match is usually the row worth knowing about. They are charged either way, because the provider bills the lookup.",
            "default": false
          },
          "baseUrl": {
            "title": "Custom host",
            "type": "string",
            "description": "Overrides the host outright. Leave empty unless your account was issued a dedicated hostname or you run this provider's software on your own network."
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many rows. Rows are charged individually, so this is the ceiling on what a run can cost.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "How fast to call the provider. Lower this if your subscription has a tighter rate ceiling than the default.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}