{
  "openapi": "3.0.1",
  "info": {
    "title": "FastDemocracy Legislative Bill Tracker",
    "description": "Track legislation across the US Congress and all 50 states. Search bills by keyword, browse by state or legislative session, and pull full bill detail - sponsors, votes, actions, and bill text links. Sourced from the free public FastDemocracy bill-tracking site.",
    "version": "1.0",
    "x-build-id": "8cQOYcXxkgllbLoAl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~fastdemocracy-legislative-bill-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-fastdemocracy-legislative-bill-tracker",
        "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/crawlerbros~fastdemocracy-legislative-bill-tracker/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-fastdemocracy-legislative-bill-tracker",
        "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/crawlerbros~fastdemocracy-legislative-bill-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-fastdemocracy-legislative-bill-tracker",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byState",
              "bySession",
              "billDetail",
              "legislators"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "jurisdiction": {
            "title": "Jurisdiction",
            "enum": [
              "US",
              "congress50",
              "states",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DC",
              "DE",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "PR",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "CH",
              "SL",
              "BL",
              "DV",
              "YC"
            ],
            "type": "string",
            "description": "US Congress, an aggregate scope (mode=search only), or a specific state/city. mode=byState/bySession/legislators require a specific jurisdiction (not an aggregate).",
            "default": "US"
          },
          "keyword": {
            "title": "Keyword (mode=search)",
            "type": "string",
            "description": "Free-text search across bill titles and (where indexed) summaries. Required for mode=search; optional browse-narrower on byState/bySession.",
            "default": "climate"
          },
          "session": {
            "title": "Legislative session (mode=bySession / legislators)",
            "type": "string",
            "description": "State-specific session identifier, e.g. `2025-2026` for most states, or a Congress number like `119` for US Congress. Leave blank elsewhere to use the current/default session."
          },
          "sponsorId": {
            "title": "Sponsor legislator ID",
            "type": "string",
            "description": "Restrict results to bills sponsored by this FastDemocracy legislator ID (e.g. `CAL000226`, `USL000556`) — found in a prior result's `sponsors[].legislatorId`, or via mode=legislators."
          },
          "firstSponsorOnly": {
            "title": "First (primary) sponsor only",
            "type": "boolean",
            "description": "When `sponsorId` is set, only match bills where this legislator is the first-listed (primary) sponsor.",
            "default": false
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "",
              "upper",
              "lower"
            ],
            "type": "string",
            "description": "Filter to bills (or, mode=legislators, members) originating in/belonging to a specific chamber.",
            "default": ""
          },
          "partyQuery": {
            "title": "Party contains (mode=legislators)",
            "type": "string",
            "description": "Case-insensitive substring match against the legislator's party (e.g. `Democratic`, `Republican`, `Independent`). Some states report fusion/cross-endorsed labels (e.g. `Republican/Democratic` in NY), so this is a contains-match rather than an exact dropdown."
          },
          "legislatorNameQuery": {
            "title": "Legislator name contains (mode=legislators)",
            "type": "string",
            "description": "Case-insensitive substring match against the legislator's full name."
          },
          "billUrls": {
            "title": "Bill URLs (mode=billDetail)",
            "type": "array",
            "description": "Full fastdemocracy.com bill detail URLs, e.g. `https://fastdemocracy.com/bill-search/ca/2025-2026/bills/CAB00033323/` (copy from a prior result's `billUrl` field).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records. For search/byState/bySession, the actor paginates until this cap or the source's own reported total match count is reached, whichever is smaller, and automatically re-sweeps once if the first pass falls short. Note: fastdemocracy.com's search index has no stable sort key, so on rare occasions a handful of records (well under 1%) may not be recoverable within a single run even after the re-sweep, if the live index reshuffles between every request.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. FastDemocracy is publicly accessible without a proxy; the actor tries a direct connection first and only engages this free Apify datacenter proxy as a fallback if the direct request is blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}