{
  "openapi": "3.0.1",
  "info": {
    "title": "Address Validation API - USPS ZIP+4 and 240 Countries",
    "description": "Validate and standardize postal addresses against USPS and international postal authority data. Returns the corrected delivery line, ZIP+4, DPV deliverability codes, county, time zone and rooftop latitude and longitude. One row per verified candidate, in over 240 countries.",
    "version": "0.1",
    "x-build-id": "lJ1GlghjD74OIGPcR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~address-validation-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-address-validation-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~address-validation-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-address-validation-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~address-validation-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-address-validation-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": {
          "addresses": {
            "title": "Addresses to verify",
            "type": "array",
            "description": "One object per address, using this provider's own field names. For the US service those are street, street2, secondary, city, state, zipcode, lastline, addressee and urbanization. For the international service they are address1 to address4, locality, administrative_area, postal_code, organization and a required country. Everyday names are accepted too and rewritten for you, so line1, zip, town, province, company and postcode all work. A plain string is treated as a single line address. Add input_id to carry your own reference onto the row."
          },
          "scope": {
            "title": "Coverage",
            "enum": [
              "us",
              "international"
            ],
            "type": "string",
            "description": "Which of the provider's two services to call. The US service checks against USPS data and returns ZIP+4 and DPV deliverability. The international service covers over 240 other countries and requires a country on every address. The two take different field names, so pick the one that matches your list.",
            "default": "us"
          },
          "authId": {
            "title": "Auth ID",
            "type": "string",
            "description": "Your own account's auth ID for this provider. Bring your own credentials: nothing is shared between runs and the credentials are never written to the dataset. Use a secret key pair rather than an embedded key, because an embedded key is bound to a website host and will not authenticate from a server."
          },
          "authToken": {
            "title": "Auth token",
            "type": "string",
            "description": "Your own account's auth token for this provider, the secret half of the pair. It is sent with every request and is never stored on the run."
          },
          "match": {
            "title": "Match strategy",
            "enum": [
              "strict",
              "invalid",
              "enhanced"
            ],
            "type": "string",
            "description": "How hard the US service tries to match. Strict returns only addresses it can confirm. Invalid also returns addresses it could not confirm, with the components it did parse. Enhanced searches an extended dataset and finds addresses strict will not, and is billed differently on most plans. Ignored by the international service.",
            "default": "strict"
          },
          "candidates": {
            "title": "Candidates per address",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many matching addresses the US service may return for one input, up to ten. Above one this is how an ambiguous address, such as a street with no house number, returns every possibility instead of nothing. Each candidate is a row and is charged as a row.",
            "default": 1
          },
          "countySource": {
            "title": "County source",
            "enum": [
              "postal",
              "geographic"
            ],
            "type": "string",
            "description": "Which county to report for a US address. Postal gives the county the mail is delivered from, which is the default and is what most billing and tax lookups expect. Geographic gives the county the building physically sits in, and the provider only returns it when the match strategy is enhanced.",
            "default": "postal"
          },
          "features": {
            "title": "Extra fields",
            "type": "array",
            "description": "Optional field groups the provider adds to the response when asked. Component analysis reports, per component, whether it was confirmed, changed or missing, which is what you want when you need to explain a correction. IANA time zone adds the standard time zone identifier rather than the provider's own name.",
            "items": {
              "type": "string",
              "enum": [
                "component-analysis",
                "iana-timezone"
              ],
              "enumTitles": [
                "Component analysis",
                "IANA time zone"
              ]
            },
            "default": []
          },
          "geocode": {
            "title": "Add coordinates (international)",
            "type": "boolean",
            "description": "Ask the international service for latitude and longitude. It is a separate entitlement on most plans and is billed on top of the verification, so it is off by default. The US service always returns coordinates and ignores this.",
            "default": false
          },
          "language": {
            "title": "Output language (international)",
            "enum": [
              "native",
              "latin"
            ],
            "type": "string",
            "description": "Whether the international service returns the address in its own script or transliterated into Latin characters. Native keeps the local script, for example Cyrillic or Kanji. Latin is what you want if the result has to go into a system that cannot store the local script.",
            "default": "native"
          },
          "country": {
            "title": "Default country (international)",
            "type": "string",
            "description": "A country applied to every international address that does not name its own, given as a name or an ISO code such as GBR, DEU or JPN. The international service refuses an address with no country, so setting this here saves repeating it on every row."
          },
          "skipUnverified": {
            "title": "Only keep verified addresses",
            "type": "boolean",
            "description": "Leave addresses that did not verify out of the dataset entirely. Off by default, because knowing that an address does not exist is usually the reason for running a check at all. 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, in which case the coverage setting no longer picks the host."
          },
          "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 plan 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}