{
  "openapi": "3.0.1",
  "info": {
    "title": "State Legislation API: Bills, Legislators, Votes (Open States)",
    "description": "Search US state legislation in all 50 states, DC and Puerto Rico: bills and resolutions with sponsors, actions, votes and versions, current state legislators by district or map point, committees, hearings and sessions, via the Open States API from Plural Policy. Bring your own key.",
    "version": "0.1",
    "x-build-id": "WW5Bxjf1G15G2yDZY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~state-legislature-bills-legislators-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-state-legislature-bills-legislators-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/nabeelbaghoor~state-legislature-bills-legislators-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-state-legislature-bills-legislators-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/nabeelbaghoor~state-legislature-bills-legislators-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-state-legislature-bills-legislators-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",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "bills",
              "lookup",
              "legislators",
              "legislatorsByLocation",
              "committees",
              "events",
              "jurisdictions"
            ],
            "type": "string",
            "description": "Bills search finds state bills and resolutions by state, session, chamber, type, subject, sponsor, dates or full text. Lookup fetches single bills by state, session and number (CA 20252026 AB 1) or bill page URL, and any record by its Open States ID. Legislators search lists current state legislators; Legislators by location finds the legislators who represent a latitude and longitude. Committees, Hearings and events, and States and sessions list those for the chosen states.",
            "default": "bills"
          },
          "jurisdictions": {
            "title": "Jurisdictions (states)",
            "type": "array",
            "description": "Bills, legislators, committees, events and states and sessions. One lookup per state. Bills search needs a state unless a full text search is set; legislators need a state unless a name is set; committees and events need a state. Leave empty in States and sessions to list every state.",
            "items": {
              "type": "string",
              "enum": [
                "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",
                "pr",
                "ri",
                "sc",
                "sd",
                "tn",
                "tx",
                "ut",
                "vt",
                "va",
                "wa",
                "wv",
                "wi",
                "wy"
              ],
              "enumTitles": [
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "District of Columbia",
                "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",
                "Puerto Rico",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            }
          },
          "searchQuery": {
            "title": "Full text search",
            "type": "string",
            "description": "Bills search only. Words or a phrase searched in bill text and titles, such as \"data privacy\" or minimum wage; supports quotes, OR and -word. A bill number such as HB 1 matches that bill. Without a state it searches all states."
          },
          "session": {
            "title": "Session",
            "type": "string",
            "description": "Bills search only, with a state. The Open States session identifier, such as 20252026 for California; the States and sessions mode lists them."
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "any",
              "upper",
              "lower",
              "legislature",
              "executive"
            ],
            "type": "string",
            "description": "Bills: chamber the bill started in. Legislators: current chamber. Committees: chamber the committee belongs to.",
            "default": "any"
          },
          "billClassification": {
            "title": "Bill type",
            "enum": [
              "any",
              "bill",
              "resolution",
              "joint resolution",
              "concurrent resolution",
              "constitutional amendment",
              "memorial",
              "joint memorial",
              "proclamation",
              "appointment",
              "nomination"
            ],
            "type": "string",
            "description": "Bills search only. Keep only bills, resolutions, constitutional amendments or another Open States bill classification.",
            "default": "any"
          },
          "subjects": {
            "title": "Subjects",
            "type": "array",
            "description": "Bills search only. Keep bills tagged with all of these state subject terms, written as the state writes them, such as Education or Health.",
            "items": {
              "type": "string"
            }
          },
          "sponsor": {
            "title": "Sponsor",
            "type": "string",
            "description": "Bills search only. A sponsor name as Open States lists it, or an ocd-person ID from a Legislators search."
          },
          "sponsorClassification": {
            "title": "Sponsor type",
            "enum": [
              "any",
              "primary",
              "cosponsor"
            ],
            "type": "string",
            "description": "Bills search only, with a sponsor. Keep bills where that sponsor is a primary sponsor or a cosponsor.",
            "default": "any"
          },
          "billNumbers": {
            "title": "Bill numbers",
            "type": "array",
            "description": "Bills search only. Keep only these bill numbers, such as AB 1 or SB 23, up to 20.",
            "items": {
              "type": "string"
            }
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "Bills search only. Bills whose Open States record changed on or after this date, YYYY-MM-DD. Good for daily change feeds."
          },
          "createdSince": {
            "title": "Introduced since",
            "type": "string",
            "description": "Bills search only. Bills first added to Open States on or after this date, YYYY-MM-DD."
          },
          "actionSince": {
            "title": "Action since",
            "type": "string",
            "description": "Bills search only. Bills with a legislative action (hearing, vote, passage, signature) on or after this date, YYYY-MM-DD."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "updated_asc",
              "updated_desc",
              "first_action_asc",
              "first_action_desc",
              "latest_action_asc",
              "latest_action_desc"
            ],
            "type": "string",
            "description": "Bills search only. Order of the bills.",
            "default": "updated_desc"
          },
          "billIncludes": {
            "title": "Bill details to include",
            "type": "array",
            "description": "Bills search and lookup. Extra bill details to return. Actions, votes, bill text versions or documents add the full history and price each bill as a detailed bill.",
            "items": {
              "type": "string",
              "enum": [
                "sponsorships",
                "abstracts",
                "other_titles",
                "other_identifiers",
                "actions",
                "sources",
                "documents",
                "versions",
                "votes",
                "related_bills"
              ],
              "enumTitles": [
                "Sponsors",
                "Abstracts",
                "Other titles",
                "Other identifiers",
                "Actions (full history)",
                "Source links",
                "Documents (fiscal notes, analyses)",
                "Bill text versions",
                "Roll call votes",
                "Related bills"
              ]
            },
            "default": [
              "sponsorships",
              "abstracts"
            ]
          },
          "lookups": {
            "title": "Bills and IDs to look up",
            "type": "array",
            "description": "Lookup only. One per line: a bill as state, session and number (CA 20252026 AB 1 or ca/20252026/AB1), a bill page URL from open.pluralpolicy.com, or an Open States ID (ocd-bill/..., ocd-person/..., ocd-organization/..., ocd-event/..., ocd-jurisdiction/...). Up to 200.",
            "items": {
              "type": "string"
            }
          },
          "legislatorName": {
            "title": "Legislator name",
            "type": "string",
            "description": "Legislators search only. Part of a name, case insensitive. Without a state it searches all states."
          },
          "district": {
            "title": "District",
            "type": "string",
            "description": "Legislators search only, with a state. District name or number as the state writes it, such as 12."
          },
          "locations": {
            "title": "Locations (latitude, longitude)",
            "type": "array",
            "description": "Legislators by location only. One point per line as latitude,longitude; returns the state legislators (and members of Congress) who represent it. Up to 200.",
            "items": {
              "type": "string"
            }
          },
          "personIncludes": {
            "title": "Legislator details to include",
            "type": "array",
            "description": "Legislators and lookup. Extra legislator details to return; offices carry phone numbers and addresses.",
            "items": {
              "type": "string",
              "enum": [
                "other_names",
                "other_identifiers",
                "links",
                "sources",
                "offices"
              ],
              "enumTitles": [
                "Other names",
                "Other identifiers",
                "Links (websites, social)",
                "Source links",
                "Offices (phone, address)"
              ]
            },
            "default": [
              "links",
              "offices"
            ]
          },
          "committeeClassification": {
            "title": "Committee type",
            "enum": [
              "any",
              "committee",
              "subcommittee"
            ],
            "type": "string",
            "description": "Committees only.",
            "default": "any"
          },
          "parentCommitteeId": {
            "title": "Parent committee ID",
            "type": "string",
            "description": "Committees only. An ocd-organization ID to list that committee's subcommittees."
          },
          "committeeIncludes": {
            "title": "Committee details to include",
            "type": "array",
            "description": "Committees and lookup. Extra committee details to return.",
            "items": {
              "type": "string",
              "enum": [
                "memberships",
                "links",
                "sources"
              ],
              "enumTitles": [
                "Members",
                "Links (websites, social)",
                "Source links"
              ]
            },
            "default": [
              "memberships"
            ]
          },
          "eventsAfter": {
            "title": "Events after",
            "type": "string",
            "description": "Hearings and events only. Events starting after this date, YYYY-MM-DD."
          },
          "eventsBefore": {
            "title": "Events before",
            "type": "string",
            "description": "Hearings and events only. Events starting before this date, YYYY-MM-DD."
          },
          "requireBills": {
            "title": "Only events with bills on the agenda",
            "type": "boolean",
            "description": "Hearings and events only.",
            "default": false
          },
          "eventIncludes": {
            "title": "Event details to include",
            "type": "array",
            "description": "Hearings, events and lookup. Extra event details to return; the agenda lists the bills heard.",
            "items": {
              "type": "string",
              "enum": [
                "links",
                "sources",
                "media",
                "documents",
                "participants",
                "agenda"
              ],
              "enumTitles": [
                "Links (websites, social)",
                "Source links",
                "Media (video, audio)",
                "Documents (fiscal notes, analyses)",
                "Participants (committees, people)",
                "Agenda (bills heard)"
              ]
            },
            "default": [
              "participants",
              "agenda"
            ]
          },
          "jurisdictionIncludes": {
            "title": "State details to include",
            "type": "array",
            "description": "States and sessions and lookup. Extra state details to return.",
            "items": {
              "type": "string",
              "enum": [
                "organizations",
                "legislative_sessions",
                "latest_runs"
              ],
              "enumTitles": [
                "Chambers and districts",
                "Legislative sessions",
                "Latest data updates"
              ]
            },
            "default": [
              "legislative_sessions"
            ]
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stops after this many rows. Each page of up to 20 bills, committees or events (50 legislators) is one Open States request; free keys allow 250 requests a day.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 360,
            "type": "integer",
            "description": "Pacing ceiling. Free Open States keys allow 10 requests a minute (bronze 40, silver 80); raise this only for a higher tier.",
            "default": 9
          },
          "apiKey": {
            "title": "API key (Open States)",
            "type": "string",
            "description": "Your own free Open States API key: sign up at open.pluralpolicy.com/accounts/signup/, confirm the email, then copy the key from open.pluralpolicy.com/accounts/profile/. Sent only to v3.openstates.org in the X-API-KEY header and never logged. You can also set the DATA_API_KEY environment variable."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}