{
  "openapi": "3.0.1",
  "info": {
    "title": "US Address Geocoding (Batch) with Census Tract & FIPS",
    "description": "Batch geocode US addresses to latitude and longitude with census tract, block group and block GEOIDs, state and county FIPS, county name, place, urban/rural, and congressional and state legislative districts, via the U.S. Census Bureau Geocoder. $0.10 per 1,000 matches; no match, no charge.",
    "version": "1.0",
    "x-build-id": "9R6aWoLBXTNmIbM9B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/singgendarhan~us-address-geocoding-census/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-singgendarhan-us-address-geocoding-census",
        "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/singgendarhan~us-address-geocoding-census/runs": {
      "post": {
        "operationId": "runs-sync-singgendarhan-us-address-geocoding-census",
        "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/singgendarhan~us-address-geocoding-census/run-sync": {
      "post": {
        "operationId": "run-sync-singgendarhan-us-address-geocoding-census",
        "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": "US street addresses, one per line, for example \"1600 Pennsylvania Ave NW, Washington, DC 20500\". Include the house number and street plus the city and state or the ZIP code. Puerto Rico addresses work too. Each row of the output gets inputId = its line number (1, 2, 3...). To keep your own IDs, use Records or an uploaded file instead.",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "Records with your own IDs (JSON)",
            "type": "array",
            "description": "Optional. A JSON array of objects, each with an optional id and either one full address or separate street, city, state and zip fields. Examples: [{\"id\": \"A-17\", \"address\": \"350 5th Ave, New York, NY 10118\"}] or [{\"id\": \"A-18\", \"street\": \"233 S Wacker Dr\", \"city\": \"Chicago\", \"state\": \"IL\", \"zip\": \"60606\"}]. Your id is returned as inputId. Common column names such as zipcode, postal_code or street_address are recognized."
          },
          "addressFile": {
            "title": "Address file (CSV or TXT)",
            "type": "string",
            "description": "Optional. Upload a file or paste a public link to one. CSV, TSV or semicolon files need a header row with either an address column, or street, city, state and zip columns; an id column is optional and is returned as inputId. A .txt file can simply list one address per line. Excel users: save as CSV first. Up to 50,000 addresses per run."
          },
          "includeGeographies": {
            "title": "Include census geographies (FIPS, tract, block group, block)",
            "type": "boolean",
            "description": "On (default): adds state and county FIPS codes, county name, census tract, block group and block codes and their GEOIDs. Off: coordinates and the matched address only.",
            "default": true
          },
          "includePlaceAndDistricts": {
            "title": "Add place, county subdivision, urban/rural and districts",
            "type": "boolean",
            "description": "On (default): adds the Census place (city, town, village or census designated place), county subdivision, urban or rural flag and urban area, congressional district, and state senate and house districts. This needs one extra Census lookup per matched location, so allow about 1 to 1.5 minutes per 1,000 addresses. Turn it off for the fastest runs (about 15 seconds per 1,000 addresses). Needs census geographies on.",
            "default": true
          },
          "vintage": {
            "title": "Boundary vintage",
            "enum": [
              "Current_Current",
              "Census2020_Current",
              "ACS2025_Current",
              "ACS2024_Current",
              "ACS2023_Current",
              "Census2010_Current"
            ],
            "type": "string",
            "description": "Which Census boundaries the codes come from. Current (default) is the Census Bureau's current geocoding vintage; for Connecticut it still uses the 8 old counties, like Census 2020. Census 2020 matches 2020 Census tables. The ACS options match American Community Survey tables for that year (they return tract codes but no block codes, and use the Connecticut planning regions). Census 2010 matches 2010-based data.",
            "default": "Current_Current"
          },
          "batchSize": {
            "title": "Addresses per Census batch request",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many addresses go to the Census batch endpoint in one request (the Census maximum is 10,000). The default of 1,000 gives steady progress and quick retries; results are saved after every batch.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}