{
  "openapi": "3.0.1",
  "info": {
    "title": "🏠 Address Normalizer - Parse, Canonicalise & Dedupe Addresses",
    "description": "⚡ Parse freeform addresses into unit, house number, street name/type, city, region, postcode and country — for US, UK, DE and FR patterns.",
    "version": "1.0",
    "x-build-id": "ngOLJ5v7ByxceGV6o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~address-normalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-address-normalizer",
        "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/that_red_bird~address-normalizer/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-address-normalizer",
        "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/that_red_bird~address-normalizer/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-address-normalizer",
        "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",
            "type": "array",
            "description": "The addresses to parse, as an array of freeform strings, and/or objects that carry the address text in \"addressField\" plus any other columns you want passed through unchanged. Combine freely with sourceDatasetIds.",
            "default": [
              "221B Baker St, Apt 3B, Springfield, IL 62701",
              "221b baker street, apt B, springfield il",
              "10 Downing Street, London SW1A 2AA",
              "sw1a 2aa, 10 downing st, london",
              "Musterstraße 1, 10117 Berlin",
              "12 Rue de la Paix, 75002 Paris"
            ]
          },
          "sourceDatasetIds": {
            "title": "Source dataset IDs",
            "type": "array",
            "description": "Apify dataset IDs to pull additional address rows from (e.g. the output of a scraper actor). Items are read the same way as \"addresses\".",
            "items": {
              "type": "string"
            }
          },
          "addressField": {
            "title": "Address field name",
            "type": "string",
            "description": "When an item in \"addresses\" is an object rather than a plain string, this is the property that holds the freeform address text.",
            "default": "address"
          },
          "defaultCountry": {
            "title": "Default country",
            "enum": [
              "auto",
              "US",
              "GB",
              "DE",
              "FR"
            ],
            "type": "string",
            "description": "Country to assume when one can't be detected from the text itself (no country name and an ambiguous or missing postcode). \"Auto-detect\" relies purely on postcode shape and address wording.",
            "default": "auto"
          },
          "dedupeThreshold": {
            "title": "Duplicate match threshold (0-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Two parsed addresses scoring at or above this are flagged as the same place. Higher = fewer false matches, lower = catches more loosely-written duplicates. Expressed 0-100; 88 means 0.88.",
            "default": 88
          },
          "includeAllPairs": {
            "title": "Include every compared pair",
            "type": "boolean",
            "description": "Emit every address pair that was compared (not just matches), with per-field similarity. Useful for tuning dedupeThreshold; verbose on large inputs.",
            "default": false
          },
          "enableGeocoding": {
            "title": "Enable geocoding (Nominatim)",
            "type": "boolean",
            "description": "Off by default. When on, each parsed address is looked up against the free OpenStreetMap Nominatim geocoder to attach latitude/longitude. Requires \"Geocoding contact info\" and is rate-limited to 1 request/second per Nominatim's usage policy, so large batches take a while.",
            "default": false
          },
          "geocodeContact": {
            "title": "Geocoding contact info",
            "type": "string",
            "description": "An app name, URL or email included in the User-Agent sent to Nominatim, as their usage policy requires so they can contact you about your traffic. Only used when \"Enable geocoding\" is on."
          },
          "geocodeDelayMs": {
            "title": "Geocoding delay between requests (ms)",
            "minimum": 1000,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait between geocoding requests. Always enforced at 1000ms minimum regardless of this value, per Nominatim's 1 request/second limit.",
            "default": 1000
          },
          "maxGeocodeRequests": {
            "title": "Max geocoding requests per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on how many addresses get geocoded in one run, so a large input with geocoding on can't turn into an hours-long run. Addresses beyond the cap are still parsed and deduped, just not geocoded.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}