{
  "openapi": "3.0.1",
  "info": {
    "title": "ZIP Code Demographics: Census Income, Age, Home Value by ZIP",
    "description": "Census ACS 5-year demographics for any US ZIP code list, state or radius: income, age, education, home value, rent, race, jobs, commute, internet. Adds US percentiles, an affluence index and state/US comparison. One row per ZIP.",
    "version": "0.1",
    "x-build-id": "BPY1sULgR3oCfXi6n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~zip-code-demographics-acs/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-zip-code-demographics-acs",
        "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/transparent_meteorite~zip-code-demographics-acs/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-zip-code-demographics-acs",
        "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/transparent_meteorite~zip-code-demographics-acs/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-zip-code-demographics-acs",
        "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": {
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "5-digit US ZIP codes (ZIP+4 is fine, the first 5 digits are used). Each becomes one row. ZIPs with no Census ZIP Code Tabulation Area (PO-box or single-business ZIPs) are listed in the run summary and never charged.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States (every ZIP in them)",
            "type": "array",
            "description": "Two-letter state codes (MI, TX, PR ...). Every ZIP Code Tabulation Area in each state is returned (assigned by the county holding most of its land). Use ALL for every ZIP in the US (about 33,000 rows). Combined with the other selectors as a union.",
            "items": {
              "type": "string"
            }
          },
          "radiusCenterZip": {
            "title": "Radius: center ZIP",
            "type": "string",
            "description": "Return every ZIP whose Census center point lies within radiusMiles of this ZIP's center point. Rows get a distanceMiles field and are sorted nearest first."
          },
          "radiusMiles": {
            "title": "Radius: miles",
            "minimum": 0.1,
            "maximum": 250,
            "type": "number",
            "description": "Radius in miles around radiusCenterZip (0.1 to 250). Ignored without a center ZIP.",
            "default": 10
          },
          "acsYear": {
            "title": "ACS 5-year release",
            "enum": [
              "latest",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020"
            ],
            "type": "string",
            "description": "latest = the newest 5-year release the Census API serves (found automatically at run time; 2024 = the 2020-2024 estimates). Or pick a release year from 2020 on.",
            "default": "latest"
          },
          "variableGroups": {
            "title": "Variable groups",
            "type": "array",
            "description": "Topics to include. Population is always included. Leave empty for all. Fields of excluded groups are returned as null. The affluence index needs income, housing and education.",
            "items": {
              "type": "string",
              "enum": [
                "population",
                "income",
                "education",
                "housing",
                "raceEthnicity",
                "employment",
                "internet"
              ],
              "enumTitles": [
                "Population and age",
                "Income and poverty",
                "Education",
                "Housing and home values",
                "Race and ethnicity",
                "Employment and commute",
                "Internet access"
              ]
            }
          },
          "compareToStateAndUs": {
            "title": "Compare to state and US",
            "type": "boolean",
            "description": "Add a comparison object with the same key metrics for the ZIP's state and the whole US, plus an index (100 = equal to the state or US value).",
            "default": true
          },
          "usPercentiles": {
            "title": "US percentiles and affluence index",
            "type": "boolean",
            "description": "Rank each ZIP against all US ZIP Code Tabulation Areas with 100+ residents (income, per-capita income, home value, education, poverty, population, density) and compute the 0-100 affluence index.",
            "default": true
          },
          "minPopulation": {
            "title": "Minimum population",
            "minimum": 0,
            "type": "integer",
            "description": "Skip ZIPs with fewer residents than this (they are not charged). The default 1 skips uninhabited ZIP areas that have no data.",
            "default": 1
          },
          "sortBy": {
            "title": "Sort rows by",
            "enum": [
              "input",
              "zip",
              "population",
              "affluenceIndex",
              "medianHouseholdIncome",
              "distance"
            ],
            "type": "string",
            "description": "Row order. input keeps your ZIP list order (radius-only runs default to distance).",
            "default": "input"
          },
          "maxZips": {
            "title": "Max ZIP profiles",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit on rows delivered (and charged) in this run.",
            "default": 50000
          },
          "censusApiKey": {
            "title": "Census API key (optional)",
            "type": "string",
            "description": "Optional: your own free key from api.census.gov/data/key_signup.html. Leave empty to use the actor's built-in key. Stored encrypted and never logged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}