{
  "openapi": "3.0.1",
  "info": {
    "title": "Geocoding API with Congressional Districts and Census: Geocodio",
    "description": "Batch and single address geocoding and reverse geocoding for the US, Canada, Mexico, UK, Australia and New Zealand through the Geocodio API, with appends for congressional districts, state legislative districts, census tracts and FIPS, school districts, time zones, ZIP+4 and ACS. Bring your own key.",
    "version": "0.1",
    "x-build-id": "gi8u2uyWZ1yUs622w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~geocoding-congressional-district-census-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-geocoding-congressional-district-census-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-congressional-district-census-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-geocoding-congressional-district-census-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-congressional-district-census-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-geocoding-congressional-district-census-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 to do",
            "enum": [
              "geocode",
              "batchGeocode",
              "reverse",
              "batchReverse"
            ],
            "type": "string",
            "description": "Forward geocoding turns addresses into coordinates, one request per address. Batch forward geocoding sends up to 10,000 lookups per request, the fastest way to geocode a list. Reverse geocoding turns latitude,longitude pairs into the nearest addresses; batch reverse does the same in bulk. Every mode can add data appends such as congressional districts or census tracts.",
            "default": "geocode"
          },
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "Forward modes. One full address per line: a street plus city and state, or a postal code. Canadian addresses must include the word Canada. Duplicates are sent once.",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "title": "Coordinates",
            "type": "array",
            "description": "Reverse modes. One latitude,longitude pair per line, latitude first, in WGS 84 decimal degrees.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Data appends",
            "type": "array",
            "description": "Optional. Extra data added to every match, such as congressional districts (cd), state legislative districts (stateleg), census tract and FIPS codes (census), school districts, time zone and ZIP+4. Each append costs one extra Geocodio lookup per record on your account. US appends do nothing for other countries.",
            "items": {
              "type": "string",
              "enum": [
                "cd113",
                "cd114",
                "cd115",
                "cd116",
                "cd117",
                "cd118",
                "cd119",
                "cd120",
                "cd",
                "census2000",
                "census2010",
                "census2011",
                "census2012",
                "census2013",
                "census2014",
                "census2015",
                "census2016",
                "census2017",
                "census2018",
                "census2019",
                "census2020",
                "census2021",
                "census2022",
                "census2023",
                "census2024",
                "census2025",
                "census",
                "stateleg",
                "stateleg-next",
                "school",
                "ffiec",
                "zip4",
                "acs-demographics",
                "acs-demographics-block_group",
                "acs-demographics-tract",
                "acs-demographics-zcta",
                "acs-demographics-place",
                "acs-demographics-msa",
                "acs-demographics-county",
                "acs-demographics-county_subdivision",
                "acs-demographics-state",
                "acs-demographics-division",
                "acs-demographics-region",
                "acs-demographics-nation",
                "acs-economics",
                "acs-economics-block_group",
                "acs-economics-tract",
                "acs-economics-zcta",
                "acs-economics-place",
                "acs-economics-msa",
                "acs-economics-county",
                "acs-economics-county_subdivision",
                "acs-economics-state",
                "acs-economics-division",
                "acs-economics-region",
                "acs-economics-nation",
                "acs-families",
                "acs-families-block_group",
                "acs-families-tract",
                "acs-families-zcta",
                "acs-families-place",
                "acs-families-msa",
                "acs-families-county",
                "acs-families-county_subdivision",
                "acs-families-state",
                "acs-families-division",
                "acs-families-region",
                "acs-families-nation",
                "acs-housing",
                "acs-housing-block_group",
                "acs-housing-tract",
                "acs-housing-zcta",
                "acs-housing-place",
                "acs-housing-msa",
                "acs-housing-county",
                "acs-housing-county_subdivision",
                "acs-housing-state",
                "acs-housing-division",
                "acs-housing-region",
                "acs-housing-nation",
                "acs-social",
                "acs-social-block_group",
                "acs-social-tract",
                "acs-social-zcta",
                "acs-social-place",
                "acs-social-msa",
                "acs-social-county",
                "acs-social-county_subdivision",
                "acs-social-state",
                "acs-social-division",
                "acs-social-region",
                "acs-social-nation",
                "riding",
                "riding-next",
                "provriding",
                "provriding-next",
                "statcan",
                "uk-westminster",
                "uk-westminster-next",
                "uk-devolved",
                "uk-devolved-next",
                "uk-local",
                "uk-local-next",
                "uk-census",
                "au-census2021",
                "au-census",
                "au-demographics",
                "au-housing",
                "au-income",
                "au-federal-electorate",
                "au-federal-electorate-next",
                "au-state-electorate",
                "timezone",
                "gazetteer"
              ],
              "enumTitles": [
                "Congressional district, 113th Congress (US)",
                "Congressional district, 114th Congress (US)",
                "Congressional district, 115th Congress (US)",
                "Congressional district, 116th Congress (US)",
                "Congressional district, 117th Congress (US)",
                "Congressional district, 118th Congress (US)",
                "Congressional district, 119th Congress (US)",
                "Congressional district, 120th Congress (US)",
                "Congressional district and legislators (current, US)",
                "Census geographies, 2000 vintage (US)",
                "Census geographies, 2010 vintage (US)",
                "Census geographies, 2011 vintage (US)",
                "Census geographies, 2012 vintage (US)",
                "Census geographies, 2013 vintage (US)",
                "Census geographies, 2014 vintage (US)",
                "Census geographies, 2015 vintage (US)",
                "Census geographies, 2016 vintage (US)",
                "Census geographies, 2017 vintage (US)",
                "Census geographies, 2018 vintage (US)",
                "Census geographies, 2019 vintage (US)",
                "Census geographies, 2020 vintage (US)",
                "Census geographies, 2021 vintage (US)",
                "Census geographies, 2022 vintage (US)",
                "Census geographies, 2023 vintage (US)",
                "Census geographies, 2024 vintage (US)",
                "Census geographies, 2025 vintage (US)",
                "Census block, tract, FIPS, MSA and CSA, latest vintage (US)",
                "State legislative districts and legislators (US)",
                "State legislative districts, upcoming boundaries (US)",
                "School districts (US)",
                "FFIEC CRA and HMDA data, beta (US)",
                "USPS ZIP+4 and delivery info (US)",
                "ACS demographics, block group (US)",
                "ACS demographics, block group level (US)",
                "ACS demographics, tract level (US)",
                "ACS demographics, zcta level (US)",
                "ACS demographics, place level (US)",
                "ACS demographics, msa level (US)",
                "ACS demographics, county level (US)",
                "ACS demographics, county subdivision level (US)",
                "ACS demographics, state level (US)",
                "ACS demographics, division level (US)",
                "ACS demographics, region level (US)",
                "ACS demographics, nation level (US)",
                "ACS economics, income, block group (US)",
                "ACS economics, income, block group level (US)",
                "ACS economics, income, tract level (US)",
                "ACS economics, income, zcta level (US)",
                "ACS economics, income, place level (US)",
                "ACS economics, income, msa level (US)",
                "ACS economics, income, county level (US)",
                "ACS economics, income, county subdivision level (US)",
                "ACS economics, income, state level (US)",
                "ACS economics, income, division level (US)",
                "ACS economics, income, region level (US)",
                "ACS economics, income, nation level (US)",
                "ACS families, households, block group (US)",
                "ACS families, households, block group level (US)",
                "ACS families, households, tract level (US)",
                "ACS families, households, zcta level (US)",
                "ACS families, households, place level (US)",
                "ACS families, households, msa level (US)",
                "ACS families, households, county level (US)",
                "ACS families, households, county subdivision level (US)",
                "ACS families, households, state level (US)",
                "ACS families, households, division level (US)",
                "ACS families, households, region level (US)",
                "ACS families, households, nation level (US)",
                "ACS housing, block group (US)",
                "ACS housing, block group level (US)",
                "ACS housing, tract level (US)",
                "ACS housing, zcta level (US)",
                "ACS housing, place level (US)",
                "ACS housing, msa level (US)",
                "ACS housing, county level (US)",
                "ACS housing, county subdivision level (US)",
                "ACS housing, state level (US)",
                "ACS housing, division level (US)",
                "ACS housing, region level (US)",
                "ACS housing, nation level (US)",
                "ACS social, education and veterans, block group (US)",
                "ACS social, education and veterans, block group level (US)",
                "ACS social, education and veterans, tract level (US)",
                "ACS social, education and veterans, zcta level (US)",
                "ACS social, education and veterans, place level (US)",
                "ACS social, education and veterans, msa level (US)",
                "ACS social, education and veterans, county level (US)",
                "ACS social, education and veterans, county subdivision level (US)",
                "ACS social, education and veterans, state level (US)",
                "ACS social, education and veterans, division level (US)",
                "ACS social, education and veterans, region level (US)",
                "ACS social, education and veterans, nation level (US)",
                "Federal electoral district, riding (Canada)",
                "Federal electoral district, upcoming boundaries (Canada)",
                "Provincial electoral district (Canada)",
                "Provincial electoral district, upcoming boundaries (Canada)",
                "Statistics Canada boundaries (Canada)",
                "Westminster parliamentary constituency (UK)",
                "Westminster constituency, upcoming boundaries (UK)",
                "Devolved parliament constituency (UK)",
                "Devolved constituency, upcoming boundaries (UK)",
                "Local authority ward (UK)",
                "Local authority ward, upcoming boundaries (UK)",
                "UK census geographies (UK)",
                "Australian census 2021 geographies (AU)",
                "Australian census geographies (AU)",
                "Australian demographics (AU)",
                "Australian housing (AU)",
                "Australian income (AU)",
                "Australian federal electorate (AU)",
                "Australian federal electorate, upcoming boundaries (AU)",
                "Australian state electorate (AU)",
                "Time zone (all countries)",
                "Gazetteer place data"
              ]
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "",
              "USA",
              "Canada",
              "Mexico",
              "GB",
              "AU",
              "NZ"
            ],
            "type": "string",
            "description": "Forward modes. The country of the addresses. Geocodio recommends setting it: when empty it infers the country and falls back to the US. UK needs a Flex or Unlimited plus UK plan.",
            "default": "USA"
          },
          "limit": {
            "title": "Results per lookup",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "The most matches Geocodio returns per address or coordinate. The best match fills the row; the rest go in otherResults. 0 means no limit. It does not change what Geocodio bills.",
            "default": 1
          },
          "appendsOnly": {
            "title": "Appends only (skip reverse geocoding)",
            "type": "boolean",
            "description": "Reverse modes. Returns only the data appends for each coordinate, with no address, using Geocodio skipGeocoding. Needs at least one data append; Geocodio then bills only the appends.",
            "default": false
          },
          "endpoint": {
            "title": "Geocodio server",
            "enum": [
              "standard",
              "enterprise"
            ],
            "type": "string",
            "description": "The self-serve API at api.geocod.io, or the Enterprise API at api.enterprise.geocod.io, which needs an Enterprise key.",
            "default": "standard"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Pacing for calls to Geocodio. Single lookups are limited to 1,000 per minute on pay as you go and Flex plans; a batch request counts as one call here. Throttled calls are retried after a pause.",
            "default": 600
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Geocodio API key, from dash.geocod.io/apikey. Stored as a secret and sent only to Geocodio in the Authorization header; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}