{
  "openapi": "3.0.1",
  "info": {
    "title": "LegiScan Bill Scraper - 50 States & Congress, Status, Sponsors",
    "description": "Scrape LegiScan bills for all 50 states, DC and US Congress: keyword search, a state's whole session or bill URLs. Each row: status and date, last action, sponsors with party, history, roll-call votes, subjects, committee, state text links. Monitor mode, RSS feeds. No API key, no login.",
    "version": "0.1",
    "x-build-id": "zklO753ODASjnMzUm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~legiscan-bill-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-legiscan-bill-scraper",
        "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/scrapersdelight~legiscan-bill-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-legiscan-bill-scraper",
        "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/scrapersdelight~legiscan-bill-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-legiscan-bill-scraper",
        "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": {
          "keywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "Full-text search terms, run through LegiScan's own search over current sessions, e.g. \"artificial intelligence\", \"data privacy\", \"cannabis\". LegiScan's operators work (quotes, AND, OR, NOT). Each keyword is searched in each state below. Leave empty to browse whole sessions.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "🗺️ States",
            "type": "array",
            "description": "Where to search or browse. \"All states + Congress\" searches nationally. With keywords: one search per state. Without keywords: every current-session bill of each state (filters below).",
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "US",
                "AL",
                "AK",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "DC",
                "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",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY"
              ],
              "enumTitles": [
                "All states + Congress",
                "US Congress",
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "Washington D.C.",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            }
          },
          "bills": {
            "title": "📄 Bills to look up",
            "type": "array",
            "description": "LegiScan bill URLs (any tab: /CA/bill/AB1/2025, /NJ/text/S4657/2026) or ids like \"CA AB1 2025\", \"US HB10435 2025\". Without a year LegiScan picks the session. Prior sessions are shown to signed-in LegiScan users only.",
            "items": {
              "type": "string"
            }
          },
          "feedUrls": {
            "title": "📡 LegiScan RSS feeds",
            "type": "array",
            "description": "LegiScan RSS feed URLs (the orange feed icons on committee, sponsor and dashboard pages), e.g. https://legiscan.com/gaits/feed/0c6ec19234d8657f74e6f99096b3e66e.rss. Each bill in the feed becomes a row.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "any",
              "introduced",
              "engrossed",
              "enrolled",
              "passed",
              "vetoed",
              "failed",
              "scheduled"
            ],
            "type": "string",
            "description": "Keep bills at this progress status. Applies to searches and state browsing; \"Scheduled\" (bills with a hearing on the calendar) works when browsing a state.",
            "default": "any"
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "both",
              "house",
              "senate"
            ],
            "type": "string",
            "description": "Browse only: bills from one chamber. House includes the Assembly / House of Delegates.",
            "default": "both"
          },
          "billType": {
            "title": "Bill type",
            "enum": [
              "all",
              "bill",
              "resolution",
              "other"
            ],
            "type": "string",
            "description": "Browse only: bills, resolutions (joint, concurrent, simple) or other measures.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "lastAction",
              "billNumber",
              "status"
            ],
            "type": "string",
            "description": "Order LegiScan returns results in. Default: best match first for searches, latest action first when browsing.",
            "default": "default"
          },
          "lastActionWithinDays": {
            "title": "Last action within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep bills with an action in the last N days, e.g. 7. Pairs well with a daily or weekly schedule. 0 = any date.",
            "default": 0
          },
          "lastActionFrom": {
            "title": "Last action on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep bills whose last action is on or after this date (YYYY-MM-DD), e.g. 2026-01-01. Empty = any date."
          },
          "minMatch": {
            "title": "Minimum search match (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Searches only: drop bills LegiScan scores below this relevance, e.g. 80. 0 = keep all.",
            "default": 0
          },
          "excludeKeywords": {
            "title": "Exclude titles containing",
            "type": "array",
            "description": "Drop bills whose title contains any of these words, e.g. \"resolution\", \"commemorat\". Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "includeSponsorDetails": {
            "title": "➕ Sponsor details (add-on)",
            "type": "boolean",
            "description": "Read each bill's Sponsors tab too: role (Primary / Cosponsor / Joint), district, capitol phone, contact form and Ballotpedia / VoteSmart / FollowTheMoney links per sponsor. Charged as one sponsor-details event per bill.",
            "default": false
          },
          "monitorMode": {
            "title": "🔁 Only new or changed bills",
            "type": "boolean",
            "description": "Deliver only bills that are new, or have a new action or status, since earlier runs delivered them. Every run remembers what it delivers. Pairs with a daily or weekly schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that remembers delivered bills. Use different names to keep separate watchlists. Default: legiscan-bill-monitor."
          },
          "maxResults": {
            "title": "Max bills",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Most bills to deliver in this run (all searches together). A search page holds 50 bills; LegiScan lists a few thousand bills per state session. 0 = no limit.",
            "default": 10
          },
          "maxResultsPerSearch": {
            "title": "Max bills per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Most bills from any one search, state listing or feed. 0 = no per-search limit.",
            "default": 0
          },
          "compact": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Core fields only (id, state, number, title, status, last action, committee, sponsors' names, subjects, links): smaller rows for AI / MCP pipelines.",
            "default": false
          },
          "useUnblocker": {
            "title": "Use Apify's Unblocker",
            "type": "boolean",
            "description": "LegiScan puts a Cloudflare check in front of every page; Apify's Unblocker passes it. Turn off only with your own proxy that passes it. RSS feeds never need it.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel bill pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Most bill pages loading at once. The run also spaces page starts and slows down when LegiScan starts answering with its sign-in page, so more is not always faster.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Add your own proxy URLs to try them before the Unblocker. By default the run uses its own route.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}