{
  "openapi": "3.0.1",
  "info": {
    "title": "US Census Bureau Demographics & Population Data API",
    "description": "Access comprehensive US Census Bureau data including American Community Survey (ACS) demographics, population estimates, economic indicators, business statistics, and geographic data. Get population, income, education, housing, employment, and health data for any US location.",
    "version": "1.5",
    "x-build-id": "OINyxjPT2EAvLDnE3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~us-census-bureau-demographics-population-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-us-census-bureau-demographics-population-data-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/alizarin_refrigerator-owner~us-census-bureau-demographics-population-data-api/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-us-census-bureau-demographics-population-data-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/alizarin_refrigerator-owner~us-census-bureau-demographics-population-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-us-census-bureau-demographics-population-data-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",
        "required": [
          "task"
        ],
        "properties": {
          "task": {
            "title": "Task",
            "enum": [
              "get_population",
              "get_demographics",
              "get_income",
              "get_housing",
              "get_education",
              "get_employment",
              "get_business_stats",
              "get_poverty",
              "get_health_insurance",
              "get_commuting",
              "get_migration",
              "compare_locations",
              "get_zip_profile",
              "get_county_profile",
              "get_state_profile",
              "custom_query"
            ],
            "type": "string",
            "description": "Operation to perform",
            "default": "get_population"
          },
          "apiKey": {
            "title": "Census API Key",
            "type": "string",
            "description": "Optional. Free key from https://api.census.gov/data/key_signup.html. The Census Bureau now requires a key for its API. With a key the actor queries api.census.gov directly for the year and dataset you choose. Without a key, ACS tasks still return real data from the latest ACS release (via Census Reporter), and get_business_stats returns a message asking for a key."
          },
          "dataset": {
            "title": "Dataset",
            "enum": [
              "acs5",
              "acs1",
              "pep",
              "dec",
              "cbp",
              "abs"
            ],
            "type": "string",
            "description": "ACS dataset for the population, income, housing and other ACS tasks: acs5 (5-year, every area including ZIP codes and tracts) or acs1 (1-year, areas with 65,000+ people). get_business_stats always uses County Business Patterns. Population Estimates, Decennial, and Annual Business Survey are not supported yet.",
            "default": "acs5"
          },
          "year": {
            "title": "Year",
            "minimum": 2009,
            "maximum": 2030,
            "type": "integer",
            "description": "Data year (with an API key). The newest ACS release is 2024. Without a key the latest release is used and the output says which one.",
            "default": 2024
          },
          "state": {
            "title": "State FIPS Code",
            "type": "string",
            "description": "State as a 2-digit FIPS code (06), postal code (CA) or name. Defaults to California (06) when no geography is given."
          },
          "county": {
            "title": "County FIPS Code",
            "type": "string",
            "description": "3-digit county FIPS code within the state (e.g. 075 for San Francisco County, CA). Needs a state."
          },
          "place": {
            "title": "Place FIPS Code",
            "type": "string",
            "description": "5-digit place (city or town) FIPS code within the state (e.g. 67000 for San Francisco). Needs a state."
          },
          "zipCode": {
            "title": "ZIP Code",
            "type": "string",
            "description": "5-digit ZIP code (ZIP Code Tabulation Area). Used by get_zip_profile and any ACS task. acs5 only."
          },
          "tract": {
            "title": "Census Tract",
            "type": "string",
            "description": "6-digit census tract code. Needs state and county."
          },
          "stateName": {
            "title": "State Name",
            "type": "string",
            "description": "State name (alternative to the state field), e.g. California."
          },
          "variables": {
            "title": "Variables",
            "type": "string",
            "description": "custom_query only: comma-separated ACS variable codes (up to 48), e.g. B01003_001E,B19013_001E."
          },
          "tableGroup": {
            "title": "Table Group",
            "type": "string",
            "description": "custom_query only: an ACS table to return in full, e.g. B25003 (Tenure)."
          },
          "compareStates": {
            "title": "Compare States",
            "type": "string",
            "description": "compare_locations only: comma-separated states (FIPS codes, postal codes or names), e.g. 06,48,36 or CA,TX,NY."
          },
          "naicsCode": {
            "title": "NAICS Code",
            "type": "string",
            "description": "get_business_stats only: NAICS industry code (2017 NAICS). Leave empty for all industries (00). Example: 72 for Accommodation and Food Services."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to send results to (Zapier, Make, n8n, etc.)"
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return clearly labelled placeholder numbers (not real Census data) to preview the output format. No task fee.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}