{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint Census ACS JSON",
    "version": "0.1.0",
    "description": "ACS 5-year housing and economic indicators for AI agents. Pay per call with USDC on Base via x402. This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.",
    "x-guidance": "GET /acs/{level}/{id} with level = state | county | tract | zcta; optional ?year= (ACS 5-year vintage, default latest). Get a tract GEOID from an address with census-geocode-json. No race/ethnicity or household-composition fields by design (fair housing). Unpaid calls receive HTTP 402 with x402 payment requirements (USDC on Base). 4xx/5xx are not charged.",
    "contact": {
      "email": "toolmint.dev@gmail.com",
      "name": "ToolMint"
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/acs/state/{id}": {
      "get": {
        "operationId": "acs_state",
        "summary": "ACS indicators for a state",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "2-letter code (LA) or 2-digit FIPS (22)"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 2015,
              "maximum": 2024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicators + raw variables, provenance, attribution, terms"
          },
          "400": {
            "description": "Bad id/year (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No ACS data for that geography/year (not charged)"
          },
          "502": {
            "description": "Upstream error (not charged)"
          },
          "503": {
            "description": "Data source not configured or rate limited (not charged)"
          }
        }
      }
    },
    "/acs/county/{id}": {
      "get": {
        "operationId": "acs_county",
        "summary": "ACS indicators for a county",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "5-digit county FIPS, e.g. 22015 (Bossier Parish, LA)"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 2015,
              "maximum": 2024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicators + raw variables, provenance, attribution, terms"
          },
          "400": {
            "description": "Bad id/year (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No ACS data for that geography/year (not charged)"
          },
          "502": {
            "description": "Upstream error (not charged)"
          },
          "503": {
            "description": "Data source not configured or rate limited (not charged)"
          }
        }
      }
    },
    "/acs/tract/{id}": {
      "get": {
        "operationId": "acs_tract",
        "summary": "ACS indicators for a tract",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "11-digit tract GEOID (state+county+tract), e.g. 22015011100 \u2014 census-geocode-json returns it"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 2015,
              "maximum": 2024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicators + raw variables, provenance, attribution, terms"
          },
          "400": {
            "description": "Bad id/year (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No ACS data for that geography/year (not charged)"
          },
          "502": {
            "description": "Upstream error (not charged)"
          },
          "503": {
            "description": "Data source not configured or rate limited (not charged)"
          }
        }
      }
    },
    "/acs/zcta/{id}": {
      "get": {
        "operationId": "acs_zcta",
        "summary": "ACS indicators for a zcta",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "5-digit ZIP Code Tabulation Area, e.g. 71111"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 2015,
              "maximum": 2024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicators + raw variables, provenance, attribution, terms"
          },
          "400": {
            "description": "Bad id/year (not charged)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "No ACS data for that geography/year (not charged)"
          },
          "502": {
            "description": "Upstream error (not charged)"
          },
          "503": {
            "description": "Data source not configured or rate limited (not charged)"
          }
        }
      }
    }
  }
}