{"openapi":"3.1.0","info":{"title":"CapitolMath API","version":"1.0.0","description":"CapitolMath's aggregated U.S. state and congressional legislative data: bill search & detail, legislators, roll-call vote histories, and derived ideology/bipartisan metrics. Chambers are normalized to upper/lower. Authenticate with an API key."},"servers":[{"url":"https://staging.capitolmath.ai/v1"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Send your key as 'Authorization: Bearer vd_live_…'."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternatively, send your key as 'X-API-Key: vd_live_…'. Used only when no Bearer Authorization header is present."}},"headers":{"X-RateLimit-Limit":{"description":"Requests per minute your plan allows. Shared by every key in the organization.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current one-minute window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"When the current window resets, in Unix epoch seconds.","schema":{"type":"integer"}},"X-Quota-Limit":{"description":"Requests per billing period your plan allows, or \"unlimited\".","schema":{"type":"string"},"example":"5000"},"X-Quota-Remaining":{"description":"Requests left this billing period. Absent when X-Quota-Limit is \"unlimited\".","schema":{"type":"integer"}},"X-Quota-Period":{"description":"The billing period the quota counts against, as YYYY-MM (UTC).","schema":{"type":"string"},"example":"2026-09"},"Retry-After":{"description":"Seconds to wait before retrying. Sent with a rate_limited 429 (not with quota_exceeded, which lasts until the period ends).","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Invalid request: a parameter the endpoint doesn't take, or a malformed or unknown value (code invalid_request).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key (code unauthorized).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key's organization is suspended or not active (code forbidden).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Per-minute rate limit exceeded (code rate_limited; carries Retry-After and error.retry_after) or monthly quota exhausted (code quota_exceeded; carries the X-Quota-* headers).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","rate_limited","quota_exceeded","internal"],"description":"invalid_request 400, unauthorized 401, forbidden 403 (organization suspended or not active), not_found 404, conflict 409 (DELETE /watches on a bill the key owner owns a tracked item for; a /tracked-items write the organization's settings or the item's state refuses), rate_limited 429, quota_exceeded 429, internal 500."},"message":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds until the rate-limit window resets. Present on rate_limited only; mirrors the Retry-After header."},"reason":{"type":"string","description":"Present on a forbidden answer decided by the permissions of the member who created the key: which layer decided, e.g. adjusted_off (turned off for them), locked_client or org_switched_off."},"covered":{"type":"array","items":{"type":"string"},"description":"Present on event-search's 400 for a request naming only jurisdictions with no calendar: the two-letter codes of the jurisdictions that do have one."}}}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","description":"1-based page number."},"page_size":{"type":"integer","description":"Records per page. Defaults to your plan's max (capped at 100); request fewer with the page-size query parameter."},"returned_count":{"type":"integer","description":"Records in this page."},"total_count":{"type":"integer","description":"Total records matching the query."},"total_pages":{"type":"integer"},"next_url":{"type":["string","null"],"format":"uri","description":"Absolute URL of the next page; null on the last page."},"prev_url":{"type":["string","null"],"format":"uri","description":"Absolute URL of the previous page; null on the first page."}}},"TrackingEntry":{"type":"object","description":"One tracked item for a bill, as the key's owner sees it: one per client that tracks the bill, and one for the organization's own work.","properties":{"id":{"type":"string","description":"The tracked item's id (/tracked-items/{id})."},"client":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Who it's for; null for the organization's own work. A client the key's owner can't see is named \"Another client\"."},"position":{"type":["string","null"],"enum":["support","support_if_amended","neutral","oppose_unless_amended","oppose","none",null],"description":"The organization's position. Null with positions turned off."},"priority":{"type":["string","null"],"enum":["high","medium","low",null],"description":"Null when none is set, with priority turned off, or for a client member."},"status":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"closed":{"type":"boolean"}},"description":"The organization's workflow status. Null for a client member when status isn't shown to clients."},"owner":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The member who owns it; \"A former member\" for someone no longer in the organization. Null for a client member."},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"description":"Empty for a client member when tags aren't shown to clients."}}},"TrackedItem":{"type":"object","description":"A tracked item: one bill tracked for the organization's own work or for one client, with the organization's fields on it, as the key's owner sees it. Fields they can't see are null or empty.","properties":{"id":{"type":"string","description":"The tracked item's id (/tracked-items/{id})."},"bill":{"type":"object","properties":{"location":{"type":["string","null"],"example":"CA"},"session":{"type":["integer","null"],"example":2026},"bill_number":{"type":["string","null"],"example":"SB 12"},"bill_name":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri","description":"This bill's /v1/bill-detail URL."}}},"client":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Who it's for; null for the organization's own work. A client the key's owner can't see is named \"Another client\"."},"position":{"type":["string","null"],"enum":["support","support_if_amended","neutral","oppose_unless_amended","oppose","none",null],"description":"The organization's position. Null with positions turned off."},"position_label":{"type":["string","null"],"description":"The position as the organization names it."},"public_position":{"type":["boolean","null"],"description":"Whether the position may leave the organization (widgets, report links). Null with positions off or for a client member."},"our_ask":{"type":["string","null"],"enum":["adopted","partly","not_adopted",null],"description":"Whether the amendment the organization asked for was adopted. Null when not recorded, with positions off, or for a client member."},"priority":{"type":["string","null"],"enum":["high","medium","low",null],"description":"Null when none is set, with priority turned off, or for a client member."},"status":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"closed":{"type":"boolean"}},"description":"The organization's workflow status. Null for a client member when status isn't shown to clients."},"owner":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The member who owns it; \"A former member\" for someone no longer in the organization. Null for a client member."},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"description":"Empty for a client member."},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"description":"Empty for a client member when tags aren't shown to clients."},"custom_fields":{"type":"array","description":"The organization's custom fields that hold a value on this item, in the organization's order. Inactive fields are included and marked: they're hidden in the app and refuse every write, but their values are kept and readable here. A client member gets only the active fields shown to clients.","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["text","number","money","date","yes_no","choice"]},"value":{"type":["string","number","boolean"],"description":"Text; a number (money too, in dollars); a date as YYYY-MM-DD; true or false; or a choice's option id."},"value_label":{"type":["string","null"],"description":"A choice's label; null for every other type."},"inactive":{"type":"boolean"}}}},"open_tasks":{"type":["integer","null"],"description":"Open tasks on it the key's owner can see. Null when they don't read tasks (a client member never does)."},"conflict":{"type":["boolean","null"],"description":"Another client tracks the bill with the opposite position. Null for a client member."},"unread":{"type":"boolean","description":"Changed by someone else since the key's owner last opened it in the app. Only items they own, watch or were mentioned on are ever unread; reading through the API never marks one read."},"unread_kinds":{"type":"array","items":{"type":"string","enum":["stage","vote","hearing","note","mention","task","field","amendment"]},"description":"What changed since they last opened it. More kinds may be added to this list; your code should accept a kind it doesn't know."},"read_only":{"type":"boolean","description":"Past the plan's tracked-bill limit: shown, not changed."},"tracked_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time","description":"The newest change on the item or its bill that the key's owner can see."}}},"WhipCount":{"type":"object","description":"Either a projection (fields below); or, when the motion has already been taken, `status: \"already_voted\"` plus `actual`; or, for a placeholder bill, `status: \"placeholder\"` plus `note`; or, when the chamber's whip counts are withdrawn, `status: \"withdrawn\"` plus `note` and `withdrawn`.","properties":{"bill":{"type":"object","properties":{"location":{"type":"string"},"year":{"type":"integer"},"number":{"type":["string","null"]},"name":{"type":"string"}}},"chamber":{"type":"string","enum":["upper","lower"]},"status":{"type":"string","enum":["already_voted","placeholder","withdrawn"],"description":"Present ONLY when there is no projection: `already_voted` when the chamber has already taken this motion (`actual` then holds the recorded roll call), `placeholder` when the bill has no content to project from yet, `withdrawn` when the chamber's whip counts did worse than their baseline on the public accuracy scoreboard (`withdrawn` then says since when, and links to it). `members` is absent in each case."},"carried":{"type":"object","description":"Present early in a session, before the chamber has had the 20 contested votes its own model needs: the projection uses the previous session's model (its own version, `model.version` ending +carried-<year>). Members seated since then aren't projected, and `members_not_projected` says how many.","properties":{"from_session":{"type":"integer"},"members_not_projected":{"type":"integer"},"note":{"type":"string"}}},"withdrawn":{"type":"object","description":"When status is withdrawn: the publication date the chamber was withdrawn at, and its panel on the accuracy scoreboard. Projections are still made and scored, so it can return.","properties":{"since":{"type":"string","format":"date"},"scoreboard_url":{"type":"string","format":"uri"}}},"note":{"type":"string","description":"Present with a status: a sentence explaining why no projection is returned."},"actual":{"type":"object","description":"The recorded roll call, when status is already_voted.","properties":{"date":{"type":["string","null"]},"action":{"type":["string","null"]},"yes":{"type":"integer"},"no":{"type":"integer"},"not_voting":{"type":"integer"}}},"motion":{"type":"string","description":"The floor motion projected — 'passage'."},"threshold":{"type":"integer","description":"Simple majority of the seated chamber. Supermajority requirements are bill-specific and not modeled."},"projected":{"type":"object","description":"Uncertain members are counted OUT of yes/no, not folded into their leaning side.","properties":{"yes":{"type":"integer"},"no":{"type":"integer"},"uncertain":{"type":"integer"}}},"conditional_on":{"type":"string"},"contested":{"type":"object","properties":{"probability":{"type":["number","null"]},"base_rate":{"type":["number","null"]},"likely_uncontested":{"type":"boolean"},"warning":{"type":"string"}}},"confidence":{"type":"object","description":"How much of this projection to trust, led by a COUNT rather than a percentage. See differs_from_usual for whether the bill influenced the result at all.","properties":{"state":{"type":"string","enum":["no_member_read","not_expected_close","working_count","coin_flip"],"description":"no_member_read: at least half the members cannot be called, so the tally cannot indicate an outcome; takes priority over the others. not_expected_close: predicted lopsided, near-certain but uninformative. working_count: contested, undecided members in bands measured >=80%. coin_flip: the deciding members sit where the model is right about half the time."},"label":{"type":"string","description":"Display form of state, e.g. \"Coin flip\"."},"members_in_play":{"type":"integer","description":"Members the model cannot call. The headline number: it degrades honestly, where a single accuracy figure is highest precisely where the projection is least useful."},"in_play_accuracy":{"type":["number","null"],"description":"Measured accuracy of the reliability band those in-play members sit in — not the pooled figure."},"explanation":{"type":"string","description":"One sentence stating what this confidence state means for the reader."},"differs_from_usual":{"type":"integer","description":"Members projected AGAINST their own most common vote on the fitted roll calls. This is the bill-specific signal; at 0 the projection reproduces each member's habitual vote."},"matches_member_modal":{"type":"boolean","description":"True when every member's projection equals their usual vote, i.e. the bill moved nothing."},"member_modal_note":{"type":"string","description":"Present only when matches_member_modal is true, stating the limitation in plain language."}}},"members":{"type":"array","description":"Every seated member, uncertain band first and least-confident first within a band.","items":{"type":"object","properties":{"legislator_id":{"type":"string"},"name":{"type":["string","null"]},"party":{"type":["string","null"]},"district":{"type":["string","null"]},"photo_url":{"type":["string","null"],"format":"uri"},"office":{"type":["string","null"],"description":"The member's current role, as the source names it."},"url":{"type":"string","format":"uri","description":"The member's /legislator-detail URL."},"projection":{"type":"string","enum":["yes","no"]},"confidence":{"type":"number","description":"Observed accuracy at this margin, from model.reliability — not a heuristic."},"band":{"type":"string","enum":["uncertain","likely"]},"no_signal":{"type":"boolean","description":"True when predictions at this margin measured no better than chance; read as \"cannot call\", not as a probability."},"differs_from_usual":{"type":"boolean","description":"True when this member is projected against their own most common vote — the rows where the bill, not the member's habit, drives the call."}}}},"model":{"type":"object","properties":{"version":{"type":"string"},"accuracy_url":{"type":"string","format":"uri","description":"This chamber's panel on the public accuracy scoreboard (/accuracy): how accurate its whip counts have been on real votes."},"trained_through":{"type":["string","null"]},"contested_vote_threshold":{"type":"number"},"contested_votes":{"type":"integer","description":"Contested roll calls the model was fitted on."},"member_count":{"type":"integer","description":"Seated members the model covers; `threshold` is a simple majority of it."},"holdout_accuracy":{"type":["number","null"]},"baseline_accuracy":{"type":["number","null"]},"reliability":{"type":"array","items":{"type":"object"}},"accuracy_note":{"type":"string"}}}}},"BillSummary":{"type":"object","properties":{"session":{"type":["integer","null"]},"session_key":{"type":["string","null"],"example":"FL:2026F","description":"The exact sitting this bill belongs to. Pass it back as ?session= to get that sitting alone — a year is ambiguous where a state sat more than once in it. Null where the bill is not tied to a session record yet."},"bill_number":{"type":["string","null"]},"bill_name":{"type":"string"},"key_words":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]}},"chamber":{"type":["string","null"],"description":"Raw originating-chamber label from the source, e.g. 'House'."},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null],"description":"Normalized chamber: upper or lower (null if unmapped)."},"outcome":{"type":"string","enum":["In progress","Passed","Vetoed","Dead"],"description":"What became of the bill: In progress, Passed, Vetoed or Dead. Dead means the session adjourned (or, where no adjournment is recorded, passed its scheduled end) without passage."},"furthest_stage":{"type":["string","null"],"description":"The furthest rung the bill reached — a HIGH-WATER MARK, not where it is now. Same vocabulary as the furthest-stage parameter, except that floor_vote carries a chamber suffix in responses (floor_vote:upper / floor_vote:lower / floor_vote:none, the last for a unicameral legislature); pass plain floor_vote to the parameter."},"is_resolution":{"type":"boolean"},"summary":{"type":["string","null"],"description":"Plain-language summary of the bill."},"location":{"type":["string","null"],"description":"Two-letter code of the jurisdiction this bill belongs to — the one field a multi-jurisdiction search cannot do without."},"location_name":{"type":["string","null"]},"currently_with":{"type":["string","null"],"description":"Who holds the bill NOW, in words: a committee name, \"Senate floor\", the lower chamber's floor, or \"Governor / Executive\". Null when nobody does — enacted or dead. Distinct from furthest_stage, which is how far it got. Replaced `current_chamber`, which named a chamber but never the committee actually holding the bill."},"current_committee":{"type":["string","null"],"description":"The committee holding the bill now, when one does."},"economic_score":{"type":["number","null"],"description":"Economic lean of the bill's summary, 1 (conservative) to 5 (liberal)."},"social_score":{"type":["number","null"],"description":"Social lean of the bill's summary, 1 (conservative) to 5 (liberal)."},"last_updated":{"type":["string","null"],"format":"date","description":"Date of the bill's most recent action. Null for a state whose detailed history has not been ingested."},"bill_sponsors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"legislator_id":{"type":"string"},"photo_url":{"type":["string","null"],"format":"uri","description":"Sponsor headshot, so a bill list renders without a call per sponsor."},"legislator_url":{"type":"string","format":"uri"}}}},"detail_url":{"type":["string","null"],"format":"uri"},"effective":{"type":["object","null"],"description":"When the bill takes effect, for enacted bills where effective dates are live; null for a bill elsewhere or with no dates. Full detail, with the evidence, is on /bill-detail.","properties":{"next_effective":{"type":["string","null"],"format":"date","description":"The bill's next effective date after today (in its jurisdiction), if any."},"last_effective":{"type":["string","null"],"format":"date","description":"Its most recent effective date on or before today, if any."},"basis":{"type":["string","null"],"enum":["published","stated","derived","contingent","unresolved",null],"description":"How sure the main provisions' date is."},"staggered":{"type":"boolean","description":"True when parts of the act take effect on other dates."},"matched_date":{"type":["string","null"],"format":"date","description":"Present when the request filtered by a takes-effect window or range: the date that matched, the latest in a last_ window and the earliest otherwise."}}}}},"BillDetail":{"type":"object","properties":{"session":{"type":["integer","null"]},"bill_number":{"type":["string","null"]},"bill_name":{"type":"string"},"key_words":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]}},"chamber":{"type":["string","null"]},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null],"description":"Chamber the bill was introduced in; fixed for its life. Derived from the chamber label, so it is present for every state."},"outcome":{"type":"string","enum":["In progress","Passed","Vetoed","Dead"],"description":"What became of the bill: In progress, Passed, Vetoed or Dead. Dead means the session adjourned (or, where no adjournment is recorded, passed its scheduled end) without passage."},"furthest_stage":{"type":["string","null"],"description":"The furthest rung the bill reached — a HIGH-WATER MARK, not where it is now. Same vocabulary as the furthest-stage parameter, except that floor_vote carries a chamber suffix in responses (floor_vote:upper / floor_vote:lower / floor_vote:none, the last for a unicameral legislature); pass plain floor_vote to the parameter."},"is_resolution":{"type":"boolean"},"summary":{"type":["string","null"],"description":"Plain-language summary of the bill."},"location":{"type":["string","null"],"description":"Two-letter code of the jurisdiction this bill belongs to."},"location_name":{"type":["string","null"]},"last_updated":{"type":["string","null"],"format":"date","description":"Date of the bill's most recent action. Null for a state whose detailed history has not been ingested."},"placeholder":{"type":"boolean","description":"True while the bill is a placeholder: its current text states an intent to legislate and changes no law (California's \"It is the intent of the Legislature to enact legislation relating to …\"). Its political lean and topics are then null and no whip projection is made; they appear once it is filled in."},"has_whip_count":{"type":"boolean","description":"Whether /v1/whip-count will return a projection for this bill. True only when the bill still faces a floor vote AND a model has been fitted for that chamber-session — models are refused when they cannot beat their baseline, so this is false for most states today. False also once every floor vote has been taken: there is nothing left to forecast, and while the chamber's whip counts are withdrawn (see whip_count_withdrawn)."},"effective":{"type":["object","null"],"description":"When the bill takes effect, as the bill panel shows it: the main provisions' date with how sure it is and how it was worked out, and each provision with a date of its own. Null where effective dates aren't live for the jurisdiction, or the bill has none.","properties":{"act":{"type":["object","null"],"properties":{"scope":{"type":"string","description":"What the date covers: `act` for the act's main provisions, else the section or provision, e.g. 'Sec. 4'."},"kind":{"type":"string","description":"effective (takes effect), operative (operative from), or applies (applies to acts on or after)."},"date":{"type":["string","null"],"format":"date","description":"Null when the date is contingent or unresolved."},"resolution":{"type":"string","enum":["published","stated","derived","contingent","unresolved"],"description":"How sure the date is, and where it came from."},"provisional":{"type":"boolean","description":"True while the date rests on something still to happen (an adjournment not yet recorded, for one)."},"basis":{"type":"object","description":"The evidence, only what applies: `clause` {quote, section, text_label} quoted from the enacted text; `published` {source, url, text}; `rule` {id, citation} with its `steps` and `inputs`; `condition`; `missing`; and references (`same_as`, `depends_on`, `amended_by`, `set_aside`, `main`, `remainder`)."}},"description":"The act's main provisions: scope `act`, kind `effective`."},"provisions":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","description":"What the date covers: `act` for the act's main provisions, else the section or provision, e.g. 'Sec. 4'."},"kind":{"type":"string","description":"effective (takes effect), operative (operative from), or applies (applies to acts on or after)."},"date":{"type":["string","null"],"format":"date","description":"Null when the date is contingent or unresolved."},"resolution":{"type":"string","enum":["published","stated","derived","contingent","unresolved"],"description":"How sure the date is, and where it came from."},"provisional":{"type":"boolean","description":"True while the date rests on something still to happen (an adjournment not yet recorded, for one)."},"basis":{"type":"object","description":"The evidence, only what applies: `clause` {quote, section, text_label} quoted from the enacted text; `published` {source, url, text}; `rule` {id, citation} with its `steps` and `inputs`; `condition`; `missing`; and references (`same_as`, `depends_on`, `amended_by`, `set_aside`, `main`, `remainder`)."}}},"description":"Provisions with dates of their own, and operative and applies-to dates."},"staggered":{"type":"boolean"},"next_effective":{"type":["string","null"],"format":"date"},"last_effective":{"type":["string","null"],"format":"date"},"today":{"type":"string","format":"date","description":"Today in the bill's jurisdiction, which next_ and last_ are counted from."}}},"whip_count_withdrawn":{"type":["object","null"],"description":"When the chamber of this bill's next floor vote has its whip counts withdrawn — below their baseline on the public accuracy scoreboard — the date and the scoreboard link; otherwise null.","properties":{"since":{"type":"string","format":"date"},"scoreboard_url":{"type":"string","format":"uri"}}},"bill_text":{"type":"array","description":"Present ONLY when include-bill-text is sent. Always an array: `latest` returns one entry (the current printing), `history` every printing, oldest first. Empty when no text has been ingested. Can be large.","items":{"type":"object","properties":{"version_label":{"type":["string","null"],"description":"Which printed version this is — e.g. 'Introduced', 'Amended Senate', 'Enrolled'."},"version_date":{"type":["string","null"],"format":"date"},"is_latest":{"type":"boolean"},"text":{"type":["string","null"],"description":"The full legislative text of this printing."}}}},"bill_type":{"type":["string","null"],"enum":["public","private","joint_resolution","concurrent_resolution","simple_resolution",null],"description":"The kind of measure. Null for jurisdictions not yet on the granular model."},"source_url":{"type":["string","null"],"description":"The measure's page on the legislature's own site."},"currently_with":{"type":["string","null"],"description":"Who holds the bill NOW, in words: a committee name, \"Senate floor\", the lower chamber's floor, or \"Governor / Executive\". Null once nobody does. Distinct from furthest_stage, which is how far the bill has got."},"current_committee":{"type":["string","null"],"description":"Committee reviewing the bill now, if any. Independent of furthest_stage: a bill that cleared its origin chamber and sits in a second-house committee has both."},"versions":{"type":"array","description":"Every printed version held for this bill, oldest first, WITHOUT the text. Use include-bill-text to receive the text itself.","items":{"type":"object","properties":{"version":{"type":["string","null"],"description":"The source's label, e.g. 'Amended Assembly'."},"date":{"type":["string","null"],"format":"date"},"is_current":{"type":"boolean"}}}},"history":{"type":"array","description":"Every recorded step in the bill's history — readings, referrals, hearings, votes, executive action — in chronological order. Absent (not empty) for jurisdictions whose history has not been rebuilt onto the granular model.","items":{"type":"object","properties":{"timestamp":{"type":["string","null"],"format":"date-time"},"action":{"type":["string","null"],"description":"The source's own wording for what happened."},"actor":{"type":["string","null"],"description":"The chamber or committee that acted, as the source names it."},"actor_type":{"type":"string","enum":["upper_chamber","lower_chamber","upper_committee","lower_committee","executive","clerk_or_other"]},"stage":{"type":["string","null"]},"is_vote":{"type":"boolean","description":"Whether members' votes were recorded at this step."},"result":{"type":["string","null"],"enum":["pass","fail","signed","vetoed",null]}}}},"bipartisan_index":{"type":["number","null"],"description":"0–100; higher = more bipartisan on the latest floor vote."},"popularity_index":{"type":["number","null"],"description":"0–100; share of cast votes that were 'yes'."},"economic_score":{"type":["number","null"],"description":"1 conservative … 3 neutral … 5 liberal (economic axis)."},"social_score":{"type":["number","null"],"description":"1 conservative … 3 neutral … 5 liberal (social axis)."},"velocity":{"type":["number","null"],"description":"Ladder progress ÷ session-time elapsed (>1 ahead of pace)."},"bill_sponsors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"chamber":{"type":["string","null"]},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null]},"party":{"type":["string","null"]},"legislator_id":{"type":"string"},"legislator_url":{"type":"string","format":"uri"}}}},"floor_vote_history":{"type":"array","description":"One entry per floor vote; most_recent flags the latest per origin_chamber.","items":{"type":"object","properties":{"chamber":{"type":["string","null"]},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null]},"timestamp":{"type":["string","null"],"format":"date-time"},"most_recent":{"type":"boolean"},"result":{"type":["string","null"],"enum":["pass","fail",null]}}}},"last_roll_call":{"type":"array","description":"Per-member votes on the single most-recent floor vote (empty when no per-member roll call was recorded).","items":{"type":"object","properties":{"name":{"type":"string"},"party":{"type":["string","null"]},"chamber":{"type":["string","null"]},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null]},"timestamp":{"type":["string","null"],"format":"date-time"},"vote":{"type":"string","enum":["yes","no"]},"legislator_id":{"type":"string"},"legislator_url":{"type":"string","format":"uri"}}}},"amendments":{"type":["object","null"],"description":"The bill's amendments, as the bill panel lists them. Amendments are released legislature by legislature, once each passes its checks: null where this legislature's aren't released.","properties":{"total":{"type":"integer"},"coverage":{"type":["object","null"],"description":"What CapitolMath's record of this session's amendments covers. Null where no run has recorded the session.","properties":{"filled_by":{"type":"string","enum":["source","derived","none"],"description":"source: the legislature's own listing of amendments. derived: CapitolMath read them out of the bills' actions. none: the rules for the legislature found no amendment with a number."},"tier":{"type":["integer","null"],"description":"1: read from stored actions; 2: the legislature's cached listing re-read; 3: fetched."},"partial":{"type":["string","null"],"description":"Set when only part of the legislature's listing was read for the session, saying what was missing; amendments may be missing."},"printed_versions":{"type":"boolean","description":"The state prints amendments as new versions of the bill instead of numbering them (California): each amended version is a printed_version amendment."},"scope":{"type":["string","null"],"description":"What the rules or listing cover, as the coverage table in Help says it."},"limits":{"type":["string","null"],"description":"What the session's list or its outcomes leave out or may get wrong, written for a reader; null where the source states no limit."}}},"counts":{"type":"object","description":"How many there are of each outcome. recommended is counted on its own, never as adopted.","properties":{"adopted":{"type":"integer"},"not_adopted":{"type":"integer"},"recommended":{"type":"integer"},"offered":{"type":"integer"},"withdrawn":{"type":"integer"},"tabled":{"type":"integer"},"ruled_out":{"type":"integer"},"superseded":{"type":"integer"},"partial":{"type":"integer"},"unknown":{"type":"integer"}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/Amendment"}}}}}},"AgendaBill":{"type":"object","description":"A bill on a meeting's agenda. Addressed by number + jurisdiction, the way every endpoint here addresses a bill — there is no public bill id.","properties":{"bill_number":{"type":["string","null"]},"bill_name":{"type":"string"},"session":{"type":["integer","null"]},"location":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri"}}},"EventSummary":{"type":"object","properties":{"event_id":{"type":"string"},"title":{"type":"string"},"starts_at":{"type":"string","format":"date-time","description":"A real instant, in UTC. Render it in `timezone`, not the reader's: 10:00 in Washington is a claim about Washington."},"ends_at":{"type":["string","null"],"format":"date-time","description":"Rarely published — most notices give a start only."},"all_day":{"type":"boolean","description":"true means IGNORE the zone: the row is a calendar DATE, and shifting 2026-11-30 into Eastern files California's adjournment under 29 November."},"timezone":{"type":"string","description":"The IANA zone the meeting is held in, e.g. America/New_York — the legislature's, or a field hearing's own; never the caller's."},"local_date":{"type":"string","format":"date","description":"The calendar date in that zone, already resolved (UTC for all-day rows), for callers who only want the day."},"status":{"type":"string","enum":["scheduled","rescheduled","cancelled","postponed","held"]},"kind":{"type":["string","null"],"enum":["hearing","markup","business_meeting","floor_session","convene","sine_die","deadline","signing","veto_deadline","other",null]},"calendar":{"type":"string","enum":["session","senate_floor","senate_committee","house_floor","house_committee","executive"],"description":"WHOSE calendar the meeting is on, which is not who is meeting: a joint committee's notice still appears on one chamber's calendar."},"location":{"type":["string","null"],"description":"Two-letter jurisdiction code, e.g. US."},"location_name":{"type":"string","description":"The legislature's full name, e.g. 'US Federal'."},"session":{"type":["integer","null"]},"room":{"type":["string","null"]},"committee_id":{"type":["string","null"]},"committee_name":{"type":["string","null"],"description":"Named even where committee_id is null — some select committees hold hearings and take no bills, so they have no committee record, and an unattributed hearing should not look like an unimportant one."},"committee_url":{"type":["string","null"],"format":"uri"},"is_projected":{"type":"boolean","description":"true means the row was derived from the session record rather than fetched from a published notice — see event-search."},"bill_count":{"type":"integer","description":"The agenda's true length. `bills` below is capped."},"bills":{"type":"array","items":{"$ref":"#/components/schemas/AgendaBill"},"description":"The first 5, in the order the notice printed them. The full agenda is on /event-detail."},"source_url":{"type":["string","null"],"format":"uri","description":"The .gov notice this row was built from."},"last_updated":{"type":["string","null"],"format":"date-time"},"event_url":{"type":"string","format":"uri"}}},"EventDetail":{"type":"object","properties":{"event_id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"],"description":"The notice's own text. For many federal meetings this IS the printed agenda, at up to 5,000 characters, which is why it is here and not on the list rows."},"starts_at":{"type":"string","format":"date-time","description":"A real instant, in UTC. Render it in `timezone`, not the reader's."},"ends_at":{"type":["string","null"],"format":"date-time"},"all_day":{"type":"boolean","description":"true means IGNORE the zone — the row is a calendar DATE."},"timezone":{"type":"string","description":"The IANA zone the meeting is held in (the legislature's, or a field hearing's own)."},"local_date":{"type":"string","format":"date","description":"The calendar date in that zone (UTC for all-day rows)."},"status":{"type":"string","enum":["scheduled","rescheduled","cancelled","postponed","held"]},"kind":{"type":["string","null"],"enum":["hearing","markup","business_meeting","floor_session","convene","sine_die","deadline","signing","veto_deadline","other",null]},"calendar":{"type":"string","enum":["session","senate_floor","senate_committee","house_floor","house_committee","executive"]},"location":{"type":["string","null"],"description":"Two-letter jurisdiction code, e.g. US."},"location_name":{"type":"string","description":"The legislature's full name, e.g. 'US Federal'."},"session":{"type":["integer","null"]},"room":{"type":["string","null"]},"committee_id":{"type":["string","null"]},"committee_name":{"type":["string","null"]},"committee_url":{"type":["string","null"],"format":"uri"},"parent_committee_id":{"type":["string","null"]},"parent_committee_name":{"type":["string","null"]},"parent_committee_url":{"type":["string","null"],"format":"uri"},"is_projected":{"type":"boolean"},"bill_count":{"type":"integer"},"bills":{"type":"array","description":"The WHOLE agenda, in the order the notice printed it.","items":{"allOf":[{"$ref":"#/components/schemas/AgendaBill"},{"type":"object","properties":{"position":{"type":["integer","null"],"description":"Line number on the notice — how you match this against the published PDF."},"note":{"type":["string","null"],"description":"Whatever the notice said beside the bill."}}}]}},"supersedes_event_id":{"type":["string","null"],"description":"A rescheduled meeting is a NEW row pointing at the one it replaced. Without this chain a caller polling changed-since sees two hearings where there was one."},"supersedes_event_url":{"type":["string","null"],"format":"uri"},"superseded_by":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string"},"event_url":{"type":"string","format":"uri"}}}},"source_url":{"type":["string","null"],"format":"uri"},"last_updated":{"type":["string","null"],"format":"date-time"},"event_url":{"type":"string","format":"uri"}}},"CalendarCoverage":{"type":"object","description":"How much of a calendar one jurisdiction actually has. This is on every event-search response because it is the difference between two opposite answers: a jurisdiction with events: 0 and session_dates: 2 holds adjournment dates and no agendas, so a search there returning nothing means 'we have not loaded that calendar', NOT 'nothing is scheduled'.","properties":{"location":{"type":["string","null"]},"location_name":{"type":"string"},"events":{"type":"integer","description":"Published meeting notices held."},"session_dates":{"type":"integer","description":"Usable adjournment dates held."},"unusable_session_dates":{"type":"integer","description":"Adjournments recorded as an end-of-period filler (12-31, 06-30) rather than a date anyone observed. Excluded from results; counted here so the gap is visible."},"last_fetched_at":{"type":["string","null"],"format":"date-time","description":"When this calendar was last polled — not when an event last changed. Null where only session dates are held."}}},"SigningHistoryRow":{"type":"object","properties":{"action":{"type":"string","enum":["signed","vetoed","unsigned"],"description":"What the executive did with this bill — leads the row, the way `vote` leads a vote-history row."},"action_date":{"type":["string","null"],"format":"date"},"session":{"type":["integer","null"]},"bill_number":{"type":["string","null"]},"bill_name":{"type":"string"},"key_words":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]}},"is_resolution":{"type":"boolean"},"summary":{"type":["string","null"]},"location":{"type":["string","null"]},"location_name":{"type":["string","null"]},"economic_score":{"type":["number","null"]},"social_score":{"type":["number","null"]},"detail_url":{"type":["string","null"],"format":"uri"}}},"ExecutiveDetail":{"type":"object","description":"A governor or the President. Separate from LegislatorDetail because an executive casts no votes and sponsors nothing — what they have is a signing record, and the ideology scores here are derived from it rather than from roll calls.","properties":{"executive_id":{"type":"string","description":"The TERM's id. A two-term executive has one per term, and the record below is scoped to this one."},"official_id":{"type":"string","description":"The person, stable across their terms."},"name":{"type":"string"},"title":{"type":"string","description":"Governor or President."},"party":{"type":["string","null"]},"location":{"type":["string","null"]},"location_name":{"type":"string"},"photo_url":{"type":["string","null"],"format":"uri"},"bio":{"type":["string","null"]},"official_url":{"type":["string","null"],"format":"uri"},"contact":{"type":"object","properties":{"address":{"type":["string","null"]},"phone":{"type":["string","null"]}}},"links":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"terms":{"type":"array","description":"Every term this person has held in this office, newest first. Continuous service is ONE term here, because the source records it as one span — separate rows mean service was interrupted.","items":{"type":"object","properties":{"executive_id":{"type":"string"},"start_date":{"type":["string","null"],"format":"date"},"end_date":{"type":["string","null"],"format":"date"},"current":{"type":"boolean"},"executive_url":{"type":"string","format":"uri"}}}},"signing_record":{"type":"object","description":"Counted in BILLS, one row per bill carrying its final executive action — not events, since a veto and its veto message are two of those.","properties":{"signed":{"type":"integer"},"vetoed":{"type":"integer"},"unsigned":{"type":"integer","description":"Became law without a signature: neither endorsed nor rejected, and excluded from the scores for that reason."},"tracked":{"type":"boolean","description":"FALSE where this jurisdiction's executive actions have never been parsed. The counts are then zero by construction, which is a different fact from an executive who signed nothing — check this before reading a zero."},"first_action":{"type":["string","null"],"format":"date"},"last_action":{"type":["string","null"],"format":"date"}}},"economic_score":{"type":["number","null"],"description":"1 (conservative) to 5 (liberal), on the same scale and formula as a legislator's: signing a bill is the +1 a yes vote supplies, vetoing it the −1, each weighted by how ideologically clear the bill is."},"social_score":{"type":["number","null"]},"score_basis":{"type":"integer","description":"Bills the scores are computed over. A lean over 110 bills and one over 3,342 are not the same claim."}}},"CommitteeSummary":{"type":"object","properties":{"committee_id":{"type":"string"},"name":{"type":"string"},"location":{"type":["string","null"],"description":"Two-letter jurisdiction code, e.g. US."},"location_name":{"type":"string","description":"The legislature's full name, e.g. 'US Federal'."},"chamber":{"type":"string","description":"As the jurisdiction names it: House, Senate, Assembly, Joint, Legislature."},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null]},"parent_committee_id":{"type":["string","null"],"description":"Null for a full committee. Committees nest exactly one level."},"parent_committee_url":{"type":["string","null"],"format":"uri"},"subcommittee_count":{"type":"integer"},"member_count":{"type":"integer","description":"The roster for session — membership is session-specific while the committee is not."},"session":{"type":["integer","null"],"description":"Which session member_count is from."},"reviews_bills":{"type":"boolean","description":"Bills have been referred here — a standing committee in practice rather than by declaration."},"bills_received":{"type":"integer","description":"Distinct bills ever referred here, across every session on record."},"last_action_date":{"type":["string","null"],"format":"date"},"is_active":{"type":"boolean"},"last_updated":{"type":["string","null"],"format":"date-time"},"committee_url":{"type":"string","format":"uri"}}},"CommitteeDetail":{"type":"object","properties":{"committee_id":{"type":"string"},"name":{"type":"string"},"location":{"type":["string","null"]},"location_name":{"type":"string"},"chamber":{"type":"string"},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null]},"source_code":{"type":["string","null"],"description":"The jurisdiction's own id for the committee, where it publishes one (e.g. 'hsag00')."},"description":{"type":["string","null"]},"official_url":{"type":["string","null"],"format":"uri"},"is_active":{"type":"boolean"},"parent_committee_id":{"type":["string","null"]},"parent_committee_name":{"type":["string","null"]},"parent_committee_url":{"type":["string","null"],"format":"uri"},"events_url":{"type":"string","format":"uri","description":"This committee's upcoming meetings on /event-search. No count on this record can answer that — they are all drawn from what has already happened."},"sessions":{"type":"array","items":{"type":"integer"},"description":"Sessions this committee has a roster for, newest first."},"session":{"type":["integer","null"],"description":"The session `members` is from."},"members":{"type":"array","items":{"type":"object","properties":{"legislator_id":{"type":"string"},"name":{"type":"string"},"party":{"type":["string","null"]},"role":{"type":["string","null"],"description":"Chair, Vice Chair, Ranking Member, Member."},"district":{"type":["string","null"]},"legislator_url":{"type":"string","format":"uri"}}}},"subcommittees":{"type":"array","items":{"type":"object","properties":{"committee_id":{"type":"string"},"name":{"type":"string"},"member_count":{"type":"integer"},"bills_received":{"type":"integer"},"committee_url":{"type":"string","format":"uri"}}}},"bills":{"type":"object","description":"The five counts below `received` partition it. Each has a bill-search URL returning exactly those bills.","properties":{"received":{"type":"integer","description":"Every bill referred to this committee."},"approved":{"type":"integer","description":"Reached a floor vote after this committee had it. The sequence, not the causation — a jointly-referred bill reaches the floor without the record saying which committee reported it."},"under_review":{"type":"integer","description":"Still with this committee (or a subcommittee), in a session that has not ended."},"tabled":{"type":"integer","description":"Still with it when the session ended. A past-session count by construction: nothing marks a bill tabled, it dies by never leaving."},"referred_elsewhere":{"type":"integer","description":"Now with a committee outside this one's tree."},"unrecorded":{"type":"integer","description":"No current committee in the record."},"held_directly":{"type":["object","null"],"description":"Of under_review and tabled, the share held by this committee itself rather than its subcommittees. Null when it has none.","properties":{"under_review":{"type":"integer"},"tabled":{"type":"integer"}}},"includes_subcommittees":{"type":"boolean"},"holding_tracked":{"type":"boolean","description":"Whether this jurisdiction reports which committee holds a bill. False makes under_review, tabled and referred_elsewhere zero by construction rather than by fact."},"sessions_covered":{"type":["object","null"],"description":"The span the counts cover. They are NOT narrowed by session.","properties":{"first":{"type":"integer"},"last":{"type":"integer"}}},"search_urls":{"type":"object","additionalProperties":{"type":"string","format":"uri"}}}},"last_updated":{"type":["string","null"],"format":"date-time"}}},"LegislatorSummary":{"type":"object","properties":{"name":{"type":"string"},"chamber":{"type":["string","null"]},"branch":{"type":["string","null"],"enum":["upper-chamber","lower-chamber","executive",null],"description":"Replaced origin_chamber on this endpoint. The two chamber values still name the chamber, because that is the distinction a roster reader needs; `executive` is the third branch rather than a third chamber."},"party":{"type":["string","null"],"enum":["D","R","I",null]},"district":{"type":["string","null"]},"leadership_title":{"type":["string","null"],"description":"e.g. 'Majority Leader'; null for rank-and-file members."},"start_date":{"type":["string","null"],"format":"date","description":"When the legislator's current role began."},"last_updated":{"type":["string","null"],"format":"date-time","description":"When the record last changed — the later of the legislator's and their role's last write, and exactly the value `changed-since` filters on, so it can be used as a sync cursor. Excludes the derived economic_score/social_score."},"legislator_id":{"type":"string"},"legislator_url":{"type":"string","format":"uri"}}},"LegislatorDetail":{"type":"object","properties":{"legislator_id":{"type":"string"},"name":{"type":"string"},"chamber":{"type":["string","null"]},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null],"description":"The legislator's current chamber, normalized: upper or lower (null if unmapped, e.g. an executive)."},"branch":{"type":["string","null"],"enum":["upper-chamber","lower-chamber","executive",null],"description":"As on /official-search rows. `executive` marks a governor or the President, whose record is a signing history: read /v1/executive-detail for it — the scores here are null because they cast no votes."},"party":{"type":["string","null"],"enum":["D","R","I",null]},"district":{"type":["string","null"]},"website":{"type":["string","null"]},"bio":{"type":["string","null"]},"photo_url":{"type":["string","null"]},"leadership_title":{"type":["string","null"]},"start_date":{"type":["string","null"],"format":"date"},"last_updated":{"type":["string","null"],"format":"date-time"},"economic_score":{"type":["number","null"],"description":"1 conservative … 5 liberal. Derived from the legislator's contested floor votes and the bills they sponsored or cosponsored, weighted by how ideologically clear each bill is — precomputed where available, otherwise computed on request. Null with no qualifying record."},"social_score":{"type":["number","null"],"description":"1 conservative … 5 liberal, on the same basis as economic_score."},"sponsor_effectiveness":{"type":["object","null"],"description":"Share of the bills the legislator introduced as primary sponsor that passed, ranked within their jurisdiction (both chambers). Resolutions and memorials are not counted. Null when they have sponsored no bill there.","properties":{"bills_sponsored":{"type":"integer","description":"Bills introduced as primary sponsor in the jurisdiction, every session on record; resolutions excluded."},"bills_passed":{"type":"integer","description":"Of bills_sponsored, those that passed."},"effectiveness_pct":{"type":"number","description":"bills_passed / bills_sponsored, as a percentage to one decimal."},"rank":{"type":["integer","null"],"description":"1 = most effective. Null below the ranking minimum of 20 sponsored bills; the counts are still reported."},"ranked_of":{"type":["integer","null"],"description":"How many legislators were ranked."}}},"party_loyalty":{"type":["object","null"],"description":"How often the legislator votes against their party on party-line roll calls, ranked within their chamber. Null when they have no party-line votes on record.","properties":{"party_line_votes":{"type":"integer"},"votes_against_party":{"type":"integer"},"against_party_pct":{"type":"number","description":"votes_against_party / party_line_votes, as a percentage to one decimal."},"loyalty_rank":{"type":["integer","null"],"description":"1 = most loyal. Null below the ranking minimum of 50 party-line votes."},"ranked_of":{"type":["integer","null"],"description":"How many legislators were ranked."}}},"committees":{"type":"array","description":"Committee, caucus, and appointed-position memberships, each linked to the committee endpoints where the committee is one this database tracks.","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","description":"e.g. 'Senate Standing Committee', 'Caucus', 'Joint Committee'."},"role":{"type":"string","description":"'Member' unless a special role, e.g. 'Chair', 'Vice-Chair'."},"url":{"type":["string","null"],"format":"uri","description":"The committee's own homepage, where the ingest captured one."},"committee_id":{"type":["string","null"],"description":"Resolved through this legislator's membership rows, so a name only has to be matched among the committees they are actually on — names are not unique, and three House subcommittees are called 'Health Subcommittee'. Null where the roster names something no membership was built for (about 0.5% of entries), which is a gap in the record rather than a lookup to retry."},"committee_url":{"type":["string","null"],"format":"uri","description":"The committee's /v1/committee-detail URL — its roster, subcommittees and bill counts."}}}},"follow_the_money_link":{"type":["string","null"],"format":"uri","description":"The legislator's FollowTheMoney entity page, when known."},"ballotpedia_link":{"type":["string","null"],"format":"uri"},"votesmart_link":{"type":["string","null"],"format":"uri"},"amendments_offered":{"type":["object","null"],"description":"The amendments this legislator sponsored, in legislatures whose amendments are released: how many of each outcome, and the latest ten. list_url lists them all.","properties":{"total":{"type":"integer"},"counts":{"type":"object","description":"How many there are of each outcome. recommended is counted on its own, never as adopted.","properties":{"adopted":{"type":"integer"},"not_adopted":{"type":"integer"},"recommended":{"type":"integer"},"offered":{"type":"integer"},"withdrawn":{"type":"integer"},"tabled":{"type":"integer"},"ruled_out":{"type":"integer"},"superseded":{"type":"integer"},"partial":{"type":"integer"},"unknown":{"type":"integer"}}},"latest":{"type":"array","items":{"$ref":"#/components/schemas/Amendment"}},"list_url":{"type":"string","format":"uri"}}}}},"VoteHistoryRow":{"type":"object","properties":{"session":{"type":["integer","null"]},"bill_number":{"type":["string","null"]},"bill_name":{"type":"string"},"vote":{"type":"string","enum":["yes","no"]},"vote_type":{"type":["string","null"],"enum":["floor","committee",null],"description":"Whether the vote was cast on the floor or in committee. The endpoint returns floor votes only unless vote-type says otherwise."},"vote_date":{"type":["string","null"],"format":"date"},"key_words":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]}},"outcome":{"type":"string","enum":["In progress","Passed","Vetoed","Dead"],"description":"What became of the bill: In progress, Passed, Vetoed or Dead. Dead means the session adjourned (or, where no adjournment is recorded, passed its scheduled end) without passage."},"furthest_stage":{"type":["string","null"],"description":"The furthest rung the bill reached — a HIGH-WATER MARK, not where it is now. Same vocabulary as the furthest-stage parameter, except that floor_vote carries a chamber suffix in responses (floor_vote:upper / floor_vote:lower / floor_vote:none, the last for a unicameral legislature); pass plain floor_vote to the parameter."},"origin_chamber":{"type":["string","null"],"enum":["upper","lower",null],"description":"Chamber the bill was introduced in."},"currently_with":{"type":["string","null"],"description":"Who holds the bill now."},"location":{"type":["string","null"],"description":"Two-letter code of the jurisdiction the bill belongs to."},"location_name":{"type":["string","null"]},"is_resolution":{"type":"boolean"},"summary":{"type":["string","null"]},"bill_sponsors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"legislator_id":{"type":"string"},"photo_url":{"type":["string","null"],"format":"uri","description":"Sponsor headshot, so a bill list renders without a call per sponsor."},"legislator_url":{"type":"string","format":"uri"}}}},"detail_url":{"type":["string","null"],"format":"uri"}}},"Amendment":{"type":"object","description":"An amendment as a record of its own (Spec R §06): its bill, its label and number as the legislature prints them, its sponsors, its outcome and its roll call.","properties":{"amendment_id":{"type":"string","description":"Stable: the bill, the chamber and the source's own code."},"bill":{"type":"object","description":"The bill it amends. On /legislator-amendments and amendments_offered only; inside a bill's own detail it is that bill.","properties":{"location":{"type":["string","null"]},"session":{"type":["integer","null"]},"bill_number":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri"}}},"label":{"type":"string","description":"As the legislature names it: Floor Amendment 283221/1, House Amendment 1."},"number":{"type":["string","null"],"description":"The legislature's own code for it, as printed: 283221/1, AM1229, HA 1, S-3101."},"kind":{"type":["string","null"],"enum":["committee","floor","substitute","printed_version",null],"description":"Where the source says which. printed_version: the state prints amendments as a new version of the bill instead of numbering them (California)."},"chamber":{"type":["string","null"],"enum":["upper","lower",null],"description":"Where it was offered."},"reading":{"type":["string","null"],"description":"The numbering it belongs to where the chamber renumbers at a later reading (the Texas House)."},"outcome":{"type":"string","enum":["adopted","not_adopted","recommended","offered","withdrawn","tabled","ruled_out","superseded","partial","unknown"],"description":"As the legislature's record states it, never inferred: offered (filed or offered, nothing since), adopted, not_adopted, recommended (a committee's report names it and its chamber hasn't decided it: never counted as adopted), withdrawn, tabled, ruled_out, superseded, partial (a divided question whose parts were decided differently: see parts), or unknown (the record doesn't say)."},"decided_in":{"type":["string","null"],"enum":["committee","chamber",null],"description":"Where the action that decided it was taken. adopted with decided_in committee is a committee's adoption, not the chamber's. Null where the deciding action isn't in the bill's history or names neither."},"parts":{"type":["array","null"],"description":"A divided question's parts, each with its own outcome; null when it was decided whole.","items":{"type":"object","properties":{"part":{"type":"string"},"outcome":{"type":"string","enum":["adopted","not_adopted","recommended","offered","withdrawn","tabled","ruled_out","superseded","partial","unknown"]}}}},"offered_on":{"type":["string","null"],"format":"date"},"decided_on":{"type":["string","null"],"format":"date"},"committee":{"type":["string","null"],"description":"The committee that offered it, for a committee amendment."},"amends_amendment_id":{"type":["string","null"],"description":"The amendment it amends, when it is an amendment to an amendment."},"sponsors":{"type":"array","description":"In the legislature's order. A member is linked only once matched to a legislator; the name is always the one the source printed.","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["member","committee"]},"legislator_id":{"type":["string","null"]},"legislator_url":{"type":["string","null"],"format":"uri"},"via_chair":{"type":"boolean","description":"The source named the committee's chair as offering it."}}}},"roll_call":{"type":["object","null"],"description":"The members' recorded votes on its roll call (the bill's own stored votes, never a printed tally); null with no roll call, or none recorded.","properties":{"yes":{"type":"integer"},"no":{"type":"integer"},"other":{"type":"integer"}}},"effect":{"type":["string","null"],"description":"The legislature's own statement of what it does, as published. CapitolMath never writes one."},"text_url":{"type":["string","null"],"format":"uri"},"provenance":{"type":"string","enum":["source","derived"],"description":"source: read from the legislature's own listing of amendments. derived: read by CapitolMath out of the bill's actions."},"outcome_read_from":{"type":["string","null"],"enum":["listing","actions",null],"description":"For a source row: whether the listing states the outcome, or the listing names the amendment and the outcome was read from the bill's actions. Null on a derived row, all of which was read from the actions."},"tier":{"type":"integer","description":"1: read from stored actions; 2: the legislature's cached listing re-read; 3: fetched."},"listed_under":{"type":["object","null"],"description":"Set on the bill that acted on it when the legislature lists it under another bill (its companion), in the same session.","properties":{"bill_number":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri"}}},"acted_on":{"type":["object","null"],"description":"Set when it is listed under this bill and its chamber acted on the companion bill instead.","properties":{"bill_number":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri"}}},"limits":{"type":["string","null"],"description":"On /legislator-amendments and amendments_offered only: what its session's amendments leave out or may get wrong, as bill-detail's amendments.coverage.limits says it."}}}}},"paths":{"/bill-search":{"get":{"summary":"Search bills across one or more jurisdictions, or all of them","description":"A page of bills, newest session first. `location` is a query parameter so a single request can span several jurisdictions — and is named `location` rather than `state` because US Federal is one of its values. Combine any of the filters below.","parameters":[{"name":"location","in":"query","required":true,"schema":{"type":"string"},"example":"TX","description":"One or more two-letter jurisdiction codes — a USPS state code, or US for Congress. Single: location=TX. Several: location=[TX,US] (url-encoded location=%5BTX%2CUS%5D). A bare comma list (location=TX,US) and repeated bracket keys (location[]=TX&location[]=US) are accepted too. Codes are case-insensitive. RENAMED FROM `state`, which is now rejected with a 400: US Federal is a jurisdiction, not a state. Or ALL for every jurisdiction at once — on its own only (location=[ALL,TX] is a 400), and not with session, origin-chamber or currently-with, which belong to one jurisdiction (also a 400). A one-state plan's key is refused ALL, as it is any other state."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"session","in":"query","schema":{"type":"string"},"description":"Which session. A YEAR (2025) covers every sitting in it; a SESSION KEY (FL:2026F) is exactly one — a state can sit several times in a year, and Florida held nine special sessions since 2023. Keys are <STATE>:<the jurisdiction's own name for the sitting> and are case-insensitive; they appear as `session_key` on bill-search and saved-view-search rows. Accepts a list — session=[2025,FL:2026F] — matching any of them. An unknown key is a 400, not an empty page."},{"name":"outcome","in":"query","schema":{"type":"string","enum":["in_progress","passed","vetoed","dead"]},"description":"What became of the bill. Accepts a list — outcome=[passed,vetoed] — matching any of them. `in_progress` means not passed, not vetoed, and its session has not adjourned; `dead` means the session adjourned without passage — or, where no adjournment is recorded, passed its scheduled end — which is how most bills end and is not otherwise recorded. Replaced `status`, whose vocabulary was an internal lifecycle enum whose commonest value was \"other\". Allowed values: in_progress, passed, vetoed, dead."},{"name":"topic","in":"query","schema":{"type":"string"},"description":"Filter to bills tagged with this topic. Values are lowercase and case-sensitive (topic=Crime is a 400). Accepts one value or a list: topic=crime, topic=[crime,housing], topic[]=crime&topic[]=housing, or a bare comma list. Several values match ANY of them. Allowed values: taxes, budget, affordability, crime, immigration, ai, climate, housing, healthcare, agriculture, mining, traffic, wages, education, elections, defense, foreign-policy, government, finance, public-lands, technology, civil-rights, other."},{"name":"origin-chamber","in":"query","schema":{"type":"string","enum":["upper","lower"]},"description":"Originating chamber: upper (senate) or lower (house/assembly)."},{"name":"is-resolution","in":"query","schema":{"type":"string","enum":["y","n"]},"description":"y = resolutions/memorials only; n = proposed laws only."},{"name":"furthest-stage","in":"query","schema":{"type":"string"},"description":"The furthest rung the bill has reached — a HIGH-WATER MARK, not where it is now (use currently-with for that). Accepts a list. Allowed values: introduced, first_reading, second_reading, third_reading, in_committee, floor_vote, reconciliation, executive_signature, override."},{"name":"currently-with","in":"query","schema":{"type":"string"},"description":"Who holds the bill NOW: upper-floor, lower-floor, executive (with the governor or already enacted), or a committee name matched case-insensitively (currently-with=APPROPRIATIONS). Distinct from furthest-stage, which never moves backwards. NOT comma-split, because committee names contain commas — send several values as repeated keys: currently-with[]=upper-floor&currently-with[]=RULES."},{"name":"committee","in":"query","schema":{"type":"string"},"example":"cmte-US-hsag00","description":"Bills this committee has handled, by committee ID (see /committee-search). Distinct from currently-with, which takes a NAME and asks only where a bill is NOW: a committee name is unique within its parent rather than nationally — three House subcommittees are called 'Health Subcommittee' — and a bill this committee referred onward is in this set and not in that one."},{"name":"committee-action","in":"query","schema":{"type":"string","enum":["received","approved","under_review","tabled","referred_elsewhere","unrecorded"]},"description":"Which of the committee's six views to return; defaults to received (every bill ever referred there). The five others partition it. Ignored without `committee`. Same definitions as /committee-detail's counts, built from the same clause."},{"name":"economic-lean-min","in":"query","schema":{"type":"number","minimum":1,"maximum":5},"description":"Lower bound on the bill's economic lean, 1 (conservative) to 5 (liberal). Scored from the bill's summary; bills with no score are excluded."},{"name":"economic-lean-max","in":"query","schema":{"type":"number","minimum":1,"maximum":5},"description":"Upper bound on the bill's economic lean."},{"name":"social-lean-min","in":"query","schema":{"type":"number","minimum":1,"maximum":5},"description":"Lower bound on the bill's social lean, 1 (conservative) to 5 (liberal)."},{"name":"social-lean-max","in":"query","schema":{"type":"number","minimum":1,"maximum":5},"description":"Upper bound on the bill's social lean."},{"name":"text-like","in":"query","schema":{"type":"string"},"description":"Free-text search. Matches the bill title, its keywords, or the LATEST bill text. Multiple words are matched as separate terms anywhere in the bill — quote them (\"eminent domain\") to require the exact phrase, and prefix a term with - to exclude it. Title and keyword matching is substring-based, so a partial bill number still matches; the bill body is word-based, so it is unaffected by word endings. Bill text is searched for jurisdictions whose history has been rebuilt onto the granular model; elsewhere this matches title and keywords only."},{"name":"sponsor-name-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on a sponsor's name."},{"name":"last-updated-after-date","in":"query","schema":{"type":"string","format":"date"},"description":"Only bills whose history has changed since this date — the bill's most recent action falls on or after it. Accepts YYYY-MM-DD (read as UTC midnight) or a full ISO-8601 timestamp. Availability varies by state: this reads the detailed action history, which is present for some states and being added to the rest, so a state without it returns no matches rather than all of its bills. Combine with last-updated-within-days and the later of the two cutoffs applies."},{"name":"last-updated-before-date","in":"query","schema":{"type":"string","format":"date"},"description":"Only bills whose most recent action falls on or BEFORE this date. Paired with last-updated-after-date this expresses a window rather than a cutoff — '14 to 30 days ago' is after=30-days-ago and before=14-days-ago."},{"name":"last-updated-within-days","in":"query","schema":{"type":"integer","minimum":1},"description":"Only bills whose history has changed in the last N days, counted back from now. Same availability caveat as last-updated-after-date: it reads the detailed action history, so a state without one returns no matches."},{"name":"takes-effect-window","in":"query","schema":{"type":"string","enum":["last_30","last_90","last_365","next_30","next_90","this_year"]},"example":"next_90","description":"Only enacted bills with an effective date in a window, as the Legislation page's Takes effect filter. Counted in each bill's own jurisdiction's time, and today counts as past (a law taking effect today is in the last_ windows). A bill with several effective dates matches if any falls in the window, and `effective.matched_date` says which: the latest in a last_ window, the earliest otherwise. Contingent and Unresolved dates have no date, so they match no window. Use takes-effect-from / takes-effect-to instead for a range of your own. Effective dates are live for AK, AL, AR, AZ, CA, CO, CT, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, US, UT, VA, VT, WA, WI, WV, WY (US is Congress); a jurisdiction is added when its dates pass a pre-registered check against its enacted laws. Elsewhere no bill has a date to match, so a request naming no live jurisdiction is a 400 rather than an empty page."},{"name":"takes-effect-from","in":"query","schema":{"type":"string","format":"date"},"example":"2027-01-01","description":"Only enacted bills with an effective date on or after this date (YYYY-MM-DD). With takes-effect-to, a range; alone, open-ended. Not with takes-effect-window. Same availability as takes-effect-window."},{"name":"takes-effect-to","in":"query","schema":{"type":"string","format":"date"},"example":"2027-01-31","description":"Only enacted bills with an effective date on or before this date (YYYY-MM-DD)."},{"name":"effective-status","in":"query","schema":{"type":"string","enum":["published","stated","derived","contingent","unresolved"]},"description":"Only bills with an effective date of this basis — the main provisions’ or any provision’s, as the Takes Effect Basis filter matches; `effective.basis` on the row is the main provisions’: published (a date the state publishes), stated (a date clause in the enacted text), derived (the state's default rule applied to the signing or adjournment), contingent (takes effect on a condition, with no date yet), unresolved (not yet dated). Combines with the takes-effect filters; same availability."},{"name":"tracked","in":"query","schema":{"type":"boolean"},"description":"true: only bills your organization tracks that the key's creator can see, as the Legislation page's Tracked filter; false: only bills it doesn't. Needs a key whose creator can read tracked items (403 otherwise)."}],"responses":{"200":{"description":"A page of bills. Each row's `tracking` lists the organization's tracked items for the bill as the key's creator sees them.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BillSummary"},{"type":"object","properties":{"tracking":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TrackingEntry"},"description":"One entry per tracked item for this bill — per client that tracks it, and the organization's own — as the key's creator sees them; empty when none they can see. Null when the key's creator can't read tracked items (a key made before organizations, a creator who has left, or one without Read on Tracked items), so an absence never reads as \"not tracked\"."}}}]}}}}}}},"400":{"description":"Missing `location`, an unknown session key, a retired parameter (e.g. `state`, `status`, `session-year`), an invalid filter value, or an effective-date filter for jurisdictions whose effective dates aren't live.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/scorecard":{"get":{"summary":"Get a legislator scorecard, as its Display options set it up","description":"One of the organization's legislator scorecards, by name (case-insensitive), computed live as on its own page. The payload follows the scorecard's Display options (its Review step): each tab it shows adds a section — Legislators → `legislators`, Bills → `bills`, Matrix → `matrix` (each legislator's vote on each bill in `bills`), Distribution → `distribution`, Map → `map`, Tiles → `photo_url` on `legislators`, Methodology → `methodology` — and a tab left off leaves its section out; `sections` lists what is present. The scorecard's saved filters restrict the legislators and bills returned and its saved sorts order them (`filters` and `sort` report what was applied). `scoring` — grade bands, minimum scored bills, non-vote rule — is always present, since a grade means nothing without its band. A key sees the scorecards its creator sees in the app through sharing — their own and those shared with them — and no others. An unknown name is rejected with 400, listing the names the key can see.","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"},"example":"California 2026 Legislator Scorecard","description":"The scorecard's name, matched without regard to case. Names are unique within an organization."}],"responses":{"200":{"description":"The scorecard, with the sections its Display options show.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"jurisdiction":{"type":"string"},"session_year":{"type":"integer"},"chambers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["upper","lower"]},"label":{"type":"string"}}}},"computed_at":{"type":"string","format":"date-time"},"sections":{"type":"array","items":{"type":"string","enum":["legislators","bills","matrix","distribution","map","tiles","methodology"]}},"scoring":{"type":"object","properties":{"grade_bands":{"type":"array","items":{"type":"object","properties":{"grade":{"type":"string"},"min_score":{"type":"number"}}}},"min_scored_bills":{"type":"integer"},"non_vote_rule":{"type":"string"}}},"party_colours":{"type":"boolean"},"filters":{"type":"object","description":"The saved filters applied, only those set: chamber, party, grade, score [min,max], outcome, origin, weight [min,max], rationale."},"sort":{"type":"object"},"counts":{"type":"object","properties":{"legislators":{"type":"integer"},"scored":{"type":"integer"},"insufficient_record":{"type":"integer"},"bills":{"type":"integer"}}},"legislators":{"type":"array","description":"Present with Legislators, Tiles, Matrix, Distribution or Map. photo_url only with Legislators or Tiles.","items":{"type":"object"}},"bills":{"type":"array","description":"Present with Bills or Matrix.","items":{"type":"object"}},"matrix":{"type":"array","description":"Present with Matrix.","items":{"type":"object"}},"distribution":{"type":"object","description":"Present with Distribution: counts by grade and by ten-point score band."},"map":{"type":"array","description":"Present with Map: one row per district held by a returned legislator, with their mean score.","items":{"type":"object"}},"methodology":{"type":"object","description":"Present with Methodology: the summary in words, the methodology version and the input and score digests."}}}}}}}},"400":{"description":"Missing or unknown scorecard name (the message lists the names the key can see).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/saved-view-search":{"get":{"summary":"Search bills using your saved views","description":"Runs one or more of the saved views built in the legislation browser and returns the bills they match. A key sees the saved views its creator sees in the app — their own and those shared with them — and no others. A saved view already carries its own jurisdiction(s) and facet selection, so it does not compose with bill-search's required `location` and its filter parameters — mixing the two would raise \"which wins?\" on every field — which is why this is a separate endpoint rather than a parameter on /bill-search. Naming several views returns bills matching ANY of them. Results come in the view's saved order: a view saved on the Legislation page as a table sorted by a column returns in that sort; otherwise newest session first. With several names, the first that records a sort decides. Only BILL views resolve here: a calendar view's name is reported as unknown. A Tracked items view resolves too, to the bills of the items it lists for the key's creator, one row per bill (for the items themselves, /tracked-items?saved-view=). An unknown label is rejected with 400 rather than silently returning nothing. Saved views were called saved filters until the rename; the deprecated path /saved-filter-search and the `saved-filter` parameter still work.","parameters":[{"name":"saved-view","in":"query","required":true,"schema":{"type":"string"},"example":"Datacenter new","description":"One or more saved-view names. Single: saved-view=Datacenter%20new. Several: saved-view=[Datacenter new,Energy] (url-encoded). A bare comma list and repeated bracket keys (saved-view[]=A&saved-view[]=B) are accepted too. Every value is split on commas, so a view whose name contains a comma cannot be requested. Names are matched exactly, apart from collapsing runs of whitespace."},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["bill","tracked"]},"description":"Which kind of saved view the names are: `bill`, the Legislation page's views, or `tracked`, Tracked items views (their items' bills). Left out, a name may be either, and a Legislation view is taken over a Tracked items view of the same name. The unknown-name error lists only views of the kind asked for."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."}],"responses":{"200":{"description":"A page of bills.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BillSummary"}}}}}}},"400":{"description":"Missing or unknown saved-view name (the message lists the bill views the key can see), or an invalid page parameter.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/related-text/{location}/{year}/{number}":{"get":{"summary":"Detect model legislation: near-identical text in other bills","description":"Whether this bill's text also appears near-identically in OTHER bills — usually in other states, the signature of a coordinated campaign — and which instance came first. `instance_count` is the size of the whole cluster and INCLUDES the bill you asked for; `instances` EXCLUDES it, so it is one shorter. The value is LEAD TIME, not completeness: `earliest_instance`, and the introduction date on each instance, are what let a wave be seen while it is still in three states. Comparison runs on NORMALIZED text — formatting, line-number gutters, sponsor blocks and statutory citations removed — because two states can enact identical language and share almost no raw characters. Legitimately shared legislative language (uniform acts, federal-conformity clauses, standard definitions) is excluded by corpus document frequency BEFORE anything is compared, so eleven states adopting the UCC do not read as a campaign. `boilerplate_excluded` reports that this ran; `specificity` (0-1) reports how distinctive the shared phrasing was, and a cluster below ~0.5 deserves suspicion. `instances[].similarity` is measured against THE BILL YOU ASKED FOR, and is null when `linked` is `via_cluster`: a cluster is a connected component, so two members can belong without having cleared the threshold against one another. `cluster_id` is STABLE across re-indexing — minted from the earliest instance and carried forward to the cluster that best overlaps the previous membership — so it can be stored and re-queried later. LIMITS. (1) Introduction dates come from the rebuilt bill history, which only some states carry; `dated_instances` counts the instances that have one, and an UNDATED instance is never reported as the earliest, so lead time is never invented. (2) `registered_support` is always empty today — attributing a campaign to a named organization requires lobbying registrations this database does not yet carry. On a cluster response the field is present, not omitted, so its shape will not change when they land. (3) Detection is of copied text, not of paraphrase: a campaign that rewrites rather than reuses will not be found. WHEN THE BILL IS IN NO CLUSTER the response is only `seed`, `cluster_id: null`, `analysed`, `reason` and `instances: []` — none of the cluster fields. A bill analyzed with no match has `analysed: true`, deliberately distinct from a bill too short to compare, which has `analysed: false`; `reason` says which.","parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, e.g. TX, or US for Congress."},{"name":"year","in":"path","required":true,"schema":{"type":"integer"},"description":"Session year, e.g. 2025."},{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Bill number, e.g. 'HB 11' (URL-encode the space)."}],"responses":{"200":{"description":"The bill's cluster, its other instances, and the earliest of them — or, with no cluster, only seed, cluster_id (null), analysed, reason and an empty instances.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"seed":{"type":"object","properties":{"location":{"type":["string","null"]},"year":{"type":["integer","null"]},"number":{"type":["string","null"]}}},"cluster_id":{"type":["string","null"]},"analysed":{"type":"boolean"},"reason":{"type":"string","description":"Only when cluster_id is null: whether the bill was analyzed and matched nothing, or was never analyzed."},"earliest_instance":{"type":["object","null"],"properties":{"location":{"type":"string"},"year":{"type":["integer","null"]},"number":{"type":["string","null"]},"introduced":{"type":"string","format":"date"}}},"locations":{"type":"integer","description":"Jurisdictions the cluster spans."},"instance_count":{"type":"integer","description":"Bills in the cluster, INCLUDING the requested one."},"dated_instances":{"type":"integer","description":"Cluster members with an introduction date."},"instances":{"type":"array","description":"The cluster's OTHER bills (the requested one is excluded), earliest introduced first, undated last.","items":{"type":"object","properties":{"location":{"type":"string"},"year":{"type":["integer","null"]},"number":{"type":["string","null"]},"title":{"type":"string"},"similarity":{"type":["number","null"],"description":"Against the requested bill; null when linked is via_cluster."},"linked":{"type":"string","enum":["direct","via_cluster"]},"introduced":{"type":["string","null"],"format":"date"},"status":{"type":["string","null"]},"source_url":{"type":["string","null"],"format":"uri"},"bill_url":{"type":"string","format":"uri"}}}},"specificity":{"type":"number","description":"0-1; below ~0.5 deserves suspicion."},"min_similarity":{"type":"number"},"boilerplate_excluded":{"type":"boolean"},"registered_support":{"type":"array","items":{"type":"object","properties":{"org":{"type":"string"},"locations":{"type":"array","items":{"type":"string"}}}}},"computed_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"The year path segment is not an integer.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No such bill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/accuracy":{"get":{"summary":"The accuracy scoreboard: how accurate whip counts have been","description":"PUBLIC: no key is needed. The same publication /accuracy shows, as JSON: every whip count is recorded before anyone sees it and scored against the official roll call, and the scoreboard is published on a fixed schedule whatever it says (methodology: /accuracy/methodology). Returns the latest public publication, or the one on `publication`. Each PUBLISHED chamber carries its figures at each lead time (`at_introduction`, `90d`, `30d`, `7d`): the tested margin over the party-line baseline with its 95% interval, uncertain-band and overall accuracy, both baselines, Brier score, reliability, counts and resolution rate, per model version, and shown vs never shown. `whip_counts` is `withdrawn` (with `withdrawn_since`) for a chamber below its baseline. Chambers not yet published are named in `not_yet_published` with no figures. 404 before the first publication.","security":[],"parameters":[{"name":"publication","in":"query","schema":{"type":"string","format":"date"},"description":"A past publication's date, YYYY-MM-DD. Defaults to the latest."},{"name":"state","in":"query","schema":{"type":"string"},"description":"Only chambers of this jurisdiction: a USPS code, or US for Congress."},{"name":"chamber","in":"query","schema":{"type":"string","enum":["upper","lower"]},"description":"Only this chamber."},{"name":"session","in":"query","schema":{"type":"integer"},"description":"Only this session year."},{"name":"lead","in":"query","schema":{"type":"string","enum":["at_introduction","90d","30d","7d"]},"description":"Only this lead time."}],"responses":{"200":{"description":"One publication of the scoreboard.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"feature":{"type":"string","enum":["whip_count"]},"publication":{"type":"object","properties":{"date":{"type":"string","format":"date"},"published_at":{"type":"string","format":"date-time"},"published_late":{"type":"boolean"},"methodology_version":{"type":"string"},"methodology_url":{"type":"string","format":"uri"},"ledger_head":{"type":"object","properties":{"seq":{"type":"integer"},"hash":{"type":"string"}}},"ledger_anchor_url":{"type":"string","format":"uri","description":"The prediction ledger's inclusion proof in its latest daily audit anchor: /v1/accuracy/anchor."},"dataset":{"type":["object","null"],"description":"Every prediction of the published chambers, joined to its outcome, including those never shown (marked shown: false). Null on publications made before datasets existed.","properties":{"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["jsonl.gz"]},"rows":{"type":"integer"},"bytes":{"type":"integer"},"sha256":{"type":"string"},"license":{"type":"string"},"license_url":{"type":"string","format":"uri"}}}}},"claim":{"type":"object","description":"Of the published chambers: how many are above, below, inconclusive or short of data, seven days out.","properties":{"published":{"type":"integer"},"above":{"type":"integer"},"below":{"type":"integer"},"inconclusive":{"type":"integer"},"insufficient":{"type":"integer"}}},"minimum_resolved_chamber_votes":{"type":"integer"},"chambers":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"chamber":{"type":"string","enum":["upper","lower"]},"session":{"type":["integer","null"]},"name":{"type":"string"},"whip_counts":{"type":"string","enum":["offered","withdrawn"]},"withdrawn_since":{"type":["string","null"],"format":"date"},"verdict":{"type":"string","enum":["above_baseline","below_baseline","inconclusive","insufficient_data"]},"lead_times":{"type":"object","description":"Keyed by lead time; null where nothing was predicted that far ahead. Figures are null below the minimum."}}}},"not_yet_published":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"chamber":{"type":"string"},"session":{"type":["integer","null"]},"name":{"type":"string"}}}},"five_worst":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"chamber":{"type":"string"},"session":{"type":["integer","null"]},"name":{"type":"string"},"tested_margin":{"type":"number"}}}},"refusal":{"type":["object","null"],"properties":{"eligible":{"type":"integer"},"refused":{"type":"integer"},"rate":{"type":["number","null"]}}}}}}}}}},"400":{"description":"A malformed parameter."},"404":{"description":"Nothing published yet, or no publication on that date."}}}},"/accuracy/dataset":{"get":{"summary":"Download a scoreboard publication's dataset","description":"PUBLIC: no key is needed. Redirects (302) to a short-lived link to the publication's dataset: one JSON object per line, gzipped — every whip prediction of its published chambers up to the ledger head it read, with its outcome (resolved, unresolvable, void or pending), whether it was shown to anyone, and its ledger hashes. Check the file against `publication.dataset.sha256` from /v1/accuracy. Licensed CC BY 4.0.","security":[],"parameters":[{"name":"publication","in":"query","schema":{"type":"string","format":"date"},"description":"A publication's date, YYYY-MM-DD. Defaults to the latest."}],"responses":{"302":{"description":"To the download."},"404":{"description":"Nothing published yet, or no dataset for that publication."}}}},"/accuracy/anchor":{"get":{"summary":"The prediction ledger's proof in the daily audit anchor","description":"PUBLIC: no key is needed. The prediction ledger's head as of its most recent daily audit anchor, the Merkle inclusion proof to that anchor's root, and where the root was published, so the head a scoreboard publication states can be checked against a record CapitolMath can't quietly change.","security":[],"responses":{"200":{"description":"The proof."},"404":{"description":"Not anchored yet."}}}},"/whip-count/{location}/{year}/{number}":{"get":{"summary":"Project how a chamber would vote on a pending bill","description":"A FORECAST, not a record: where each seated member is projected to land on a bill that has not yet had its floor vote, with the genuinely undecided members returned first. Read the limits before using it. (1) The projection is for the PASSAGE motion specifically — a chamber takes several distinct floor votes on a bill (passage, concurrence in the other chamber's amendments, urgency-clause adoption) and they are different questions with different coalitions. (2) It is valid only CONDITIONAL ON the bill reaching that vote: floor votes exist only for bills leadership allowed onto the floor, so the model has never seen a bill that died in committee. (3) Only the ideological dimension is modeled, so accuracy is materially weaker on close, cross-cutting votes than the headline figure suggests — which is exactly where a whip count matters. (4) Roughly three quarters of floor votes are near-unanimous and the model is fitted only on contested ones; `contested.likely_uncontested` flags a bill it has little to say about. `confidence` (top level) is the summary to lead with. Its headline is `members_in_play` — how many members the model cannot call — NOT an accuracy percentage: measured reliability runs about 99% at high margin and 46-49% for members near the cutpoint, so a single pooled figure reads highest exactly where the projection is least useful. `confidence.state` is one of `no_member_read` (at least half the members cannot be called, so the tally cannot indicate an outcome — this takes priority over the other three), `not_expected_close` (the motion is predicted lopsided: near-certain, but it says little), `working_count` (contested, and the undecided members sit in bands measured at 80% or better), or `coin_flip` (the members who decide it sit where this model has been right about half the time — read the tally as a range). (5) READ `confidence.differs_from_usual` BEFORE ACTING ON A PROJECTION. It counts the members projected against their own most common vote on the roll calls the model was fitted on, and it is the only part of the response the BILL is driving. Measured across every fitted chamber, a projection matches a per-member constant — predict each member’s usual vote, ignore the bill — to within 0.2 points of accuracy; California’s Senate model scores 98.4% against a 98.4% member-modal baseline. When `matches_member_modal` is true the projection reproduces each member’s habitual vote and tells you nothing bill-specific, and `member_modal_note` says so in the response. The per-member `differs_from_usual` flag marks exactly which rows break that pattern. `members[].confidence` is read off the published `model.reliability` curve — observed accuracy on held-out roll calls at that margin — so it can be checked rather than trusted. `model.accuracy_url` is the chamber's panel on the public accuracy scoreboard: how accurate its whip counts have been on real votes. If the chamber has ALREADY taken the motion, the response is `status: \"already_voted\"` with a `note`, the recorded roll call in `actual`, and no `members` array. If the chamber's whip counts are WITHDRAWN — below their baseline on the public accuracy scoreboard — the response is `status: \"withdrawn\"` with a `note`, the date and the scoreboard link in `withdrawn`, and no `members` array. They return after doing better at two publications.","parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, e.g. TX, or US for Congress."},{"name":"year","in":"path","required":true,"schema":{"type":"integer"},"description":"Session year, e.g. 2025."},{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Bill number, e.g. 'HB 11' (URL-encode the space)."},{"name":"chamber","in":"query","schema":{"type":"string","enum":["upper","lower"]},"description":"Chamber to project: upper (senate) or lower (house/assembly). Defaults to upper."}],"responses":{"200":{"description":"A projection, or the recorded roll call when the motion has already been taken.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WhipCount"}}}}}},"400":{"description":"The year path segment is not an integer, or chamber is not upper or lower.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown bill, or no fitted model for that chamber-session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/bill-detail/{location}/{year}/{number}":{"get":{"summary":"Get a single bill with sponsors, floor history, and metrics","description":"Full detail for one bill: derived scores, the full action history, the versions held, per-chamber floor_vote_history, and the last_roll_call (per-member votes on the most-recent floor vote). Pass include-bill-text=latest or =history to also return the text itself.","parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, e.g. TX, or US for Congress."},{"name":"year","in":"path","required":true,"schema":{"type":"integer"},"description":"Session year, e.g. 2025."},{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Bill number, e.g. 'HB 11' (URL-encode the space)."},{"name":"include-bill-text","in":"query","schema":{"type":"string","enum":["latest","history"]},"description":"Return the bill's legislative text as `bill_text`. `latest` gives the current printing; `history` gives every printing the bill has had, oldest first — an amended bill can have seven or more. ALWAYS AN ARRAY, so one loop reads either: `latest` is simply that array with a single entry. Each entry carries version_label, version_date, is_latest and text. Omitted entirely when the parameter is absent, because a full history can be many megabytes. `1` is still accepted as a synonym for `latest`."}],"responses":{"200":{"description":"Bill detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillDetail"}}}}}},"400":{"description":"The year path segment is not an integer, or include-bill-text is not latest, history or 1.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown bill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/official-search/{location}":{"get":{"summary":"Search a jurisdiction's elected officials","description":"The officials currently serving in one jurisdiction: its legislators, plus the governor (or, for `US`, the President). Pass `US` for Congress — a federal seat is its own jurisdiction here, not part of the state that elected the member, so /official-search/TX is the Texas statehouse and governor and does not include its congressional delegation. Members who have LEFT are excluded: their role is marked inactive and the seat itself appears as a \"District N - Vacant\" placeholder, which is returned and is what is-vacant filters on. A departed member still has a working /legislator-detail.","parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, e.g. TX, or US for Congress."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"name-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the legislator's name."},{"name":"chamber","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the raw chamber label (e.g. 'Senate'). Prefer branch. When given, branch is ignored."},{"name":"branch","in":"query","schema":{"type":"string","enum":["upper-chamber","lower-chamber","executive"]},"description":"Which branch, and for the legislature which chamber. REPLACED `origin-chamber`, which is now rejected with a 400: this endpoint returns the governor or President too, and neither upper nor lower describes them."},{"name":"party","in":"query","schema":{"type":"string"},"description":"D, R or I. Accepts a list — party=[R,D] — matching any of them."},{"name":"district","in":"query","schema":{"type":"string"}},{"name":"committee-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match against the NAME of any committee the legislator sits on."},{"name":"leadership-title-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the leadership title. Pass 'any' to match every legislator holding any leadership post."},{"name":"first-chamber-year","in":"query","schema":{"type":"integer"},"description":"Calendar year of the legislator's current-role start date, e.g. 2023."},{"name":"years-in-chamber-min","in":"query","schema":{"type":"number","minimum":0,"maximum":100},"description":"Least time served in the current role, in years. Measured from start_date, so it moves with the calendar rather than being a stored value."},{"name":"years-in-chamber-max","in":"query","schema":{"type":"number","minimum":0,"maximum":100},"description":"Most time served in the current role, in years."},{"name":"is-vacant","in":"query","schema":{"type":"boolean"},"description":"true returns only vacant-seat placeholders; false returns only occupied seats."},{"name":"changed-since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only legislators whose record changed at/after this date (YYYY-MM-DD or ISO-8601), matching the row's last_updated. Covers every stored attribute of both legislator endpoints — name, party, chamber, district, leadership_title, start_date, website, bio, photo_url, committees, and the reference links. NOT tracked: economic_score and social_score (derived from votes and bill scores). Alias: changed_since."}],"responses":{"200":{"description":"A page of officials.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LegislatorSummary"}}}}}}},"400":{"description":"`origin-chamber` (replaced by branch), or an invalid parameter value.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/saved-view-official-search":{"get":{"summary":"Search officials using your saved legislator views","description":"Runs one or more of the saved views built on the Elected Officials page and returns the officials they match, exactly as that page shows them: it applies the page's own rules to the same roster — committees, status, years in chamber and the ideology ranges included, which /official-search's parameters do not express. A key sees the saved views its creator sees in the app — their own and those shared with them — and no others. Only LEGISLATOR views resolve here; a bill view's name is reported as unknown. Each row is an official summary plus `location` (the view's jurisdiction, US for Congress) and `is_active`. Naming several views returns officials matching ANY of them, each once. Results come in the view's saved order: a view saved on the Elected Officials page as a table sorted by a column returns in that sort; otherwise in the page's own order (chamber, then name). With several names, the first that records a sort decides. On the State plan a view for another jurisdiction contributes no one. An unknown name is rejected with 400 rather than silently returning nothing. Saved views were called saved filters until the rename; the deprecated path /saved-filter-official-search and the `saved-filter` parameter still work.","parameters":[{"name":"saved-view","in":"query","required":true,"schema":{"type":"string"},"example":"Texas Republicans","description":"One or more legislator saved-view names. Single: saved-view=Texas%20Republicans. Several: saved-view=[Texas Republicans,Tax writers] (url-encoded). A bare comma list and repeated bracket keys are accepted too. Every value is split on commas, so a view whose name contains a comma cannot be requested."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."}],"responses":{"200":{"description":"A page of officials.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/LegislatorSummary"},{"type":"object","properties":{"location":{"type":"string","description":"The jurisdiction the view is for: a USPS state code, or US for Congress."},"is_active":{"type":"boolean","description":"False for a member who has left office (a view can include them)."}}}]}}}}}}},"400":{"description":"Missing or unknown saved-view name (the message lists the legislator views the key can see), or an invalid page parameter.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/legislator-detail/{id}":{"get":{"summary":"Get a legislator with vote-derived ideology scores","description":"Legislator profile. economic_score and social_score are derived from the legislator's contested floor votes and the bills they sponsored or cosponsored (precomputed where available, otherwise computed on request); sponsor_effectiveness and party_loyalty rank them against their peers.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Legislator id."}],"responses":{"200":{"description":"Legislator detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LegislatorDetail"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown legislator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/committee-search/{location}":{"get":{"summary":"Search a legislature's committees","description":"A page of committees in one jurisdiction. The jurisdiction is a PATH segment, unlike bill-search: a committee belongs to exactly one legislature. Pass `US` for Congress. Retired committees are excluded by default — a renamed or merged committee is a different committee, kept rather than deleted — so `is-active=false` is how you reach them. `member_count` is the roster for `session`, because membership is session-specific while the committee is not; `bills_received` counts every bill ever referred there, across sessions.","parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, or US for Congress."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"name-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the committee's name."},{"name":"chamber","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the jurisdiction's own label — House, Senate, Assembly, Joint, Legislature. Prefer origin-chamber for a cross-state query."},{"name":"origin-chamber","in":"query","schema":{"type":"string","enum":["upper","lower"]},"description":"upper (senate) or lower (house/assembly), resolved through the same chamber vocabulary the legislator endpoints use."},{"name":"level","in":"query","schema":{"type":"string","enum":["parent","subcommittee"]},"description":"Committees nest exactly one level deep, so this is whether the committee has a parent."},{"name":"parent-id","in":"query","schema":{"type":"string"},"description":"The subcommittees of one committee."},{"name":"reviews-bills","in":"query","schema":{"type":"boolean"},"description":"true returns only committees bills have actually been referred to — a standing committee in practice rather than by declaration."},{"name":"is-active","in":"query","schema":{"type":"boolean"},"description":"Defaults to true. false returns retired committees."},{"name":"session","in":"query","schema":{"type":"integer"},"description":"Which roster member_count reports, e.g. 2025. ONE value only: this selects a roster rather than filtering, and there is one member_count per committee, so a list has no answer. Does not change which committees are listed — a committee with no roster that year still exists."},{"name":"member-id","in":"query","schema":{"type":"string"},"description":"Committees this legislator sits on — the inverse of official-search's committee-like. Matched against the roster for `session` (default: the jurisdiction's most recent roster)."},{"name":"changed-since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only committees whose record changed at/after this date (YYYY-MM-DD or ISO-8601). Alias: changed_since."}],"responses":{"200":{"description":"A page of committees.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CommitteeSummary"}}}}}}},"400":{"description":"More than one session, or an invalid parameter value.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/committee-detail/{id}":{"get":{"summary":"Get a committee with its roster, subcommittees and bill counts","description":"One committee: who sits on it for a session, its subcommittees, and six counts of the bills that have passed through it, each with the bill-search URL that returns exactly those bills. THE FIVE COUNTS UNDER `received` PARTITION IT, in this precedence: `approved` (reached a floor vote after this committee had it), `under_review` (still here, session not ended), `tabled` (still here when the session ended), `referred_elsewhere`, `unrecorded`. `approved` is the sequence, not the causation: a bill referred to several committees at once reaches the floor without the record saying which one reported it. `tabled` is a past-session count by construction — nothing marks a bill tabled, it dies by never leaving committee, which only separates from live review once the session ends. THREE FIELDS SAY WHAT THE NUMBERS ARE NOT. `includes_subcommittees`: a parent's counts follow bills into its subcommittees, and `held_directly` is the share at its own table. `holding_tracked`: false where the jurisdiction never reports which committee currently holds a bill, which makes under_review, tabled and referred_elsewhere zero by construction rather than by fact. `sessions_covered`: the counts span every session on record, NOT the session the roster came from.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Committee id, e.g. cmte-US-hsag00."},{"name":"session","in":"query","schema":{"type":"integer"},"description":"Which roster to return, e.g. 2025. One value only — it selects a roster rather than filtering. Defaults to the most recent on record. Does NOT narrow the bill counts — see sessions_covered."}],"responses":{"200":{"description":"Committee detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CommitteeDetail"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown committee.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/event-search":{"get":{"summary":"Search the legislative calendar","description":"What is SCHEDULED — hearings, markups, floor sessions and session deadlines. Nothing else in this API can answer it: the bill history holds no future-dated rows.\n\n`location` is a QUERY parameter here, not a path segment as on committee-search: a committee belongs to exactly one legislature, but a WEEK does not, and \"what is scheduled on the bills I follow\" is legitimately a cross-jurisdiction question. Omit it to search every jurisdiction with a calendar.\n\nREAD `coverage` BEFORE READING AN EMPTY RESULT. Every other search here returning nothing means \"no rows match\". This one can also mean \"that legislature's calendar has never been fetched\", and those are opposite conclusions about whether a bill is about to be heard. A request naming only uncovered jurisdictions is a 400 rather than an empty page.\n\nUPCOMING BY DEFAULT: without `starts-after` the floor is today. Pass an earlier date to reach the archive.\n\nRows marked `is_projected` are session deadlines derived from the session record rather than a published notice — sine die is the date every bill still in committee dies, which is why it is on the calendar at all.","parameters":[{"name":"location","in":"query","schema":{"type":"string"},"description":"Two-letter jurisdiction code — a USPS state code, or US for Congress. Accepts a list: location=[TX,US], location[]=TX&location[]=US, or location=TX,US. Omitted searches every covered jurisdiction."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"starts-after","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting on or after this. DEFAULTS TO TODAY — pass an explicit earlier date (starts-after=2024-01-01) to include past meetings. YYYY-MM-DD or a full ISO-8601 timestamp."},{"name":"starts-before","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting before this. Paired with starts-after this is a window rather than a cutoff. Must be later than starts-after — which defaults to today, so a past starts-before alone is a 400."},{"name":"kind","in":"query","schema":{"type":"string","enum":["hearing","markup","business_meeting","floor_session","convene","sine_die","deadline","signing","veto_deadline","other"]},"description":"What sort of meeting. Accepts a list."},{"name":"calendar","in":"query","schema":{"type":"string","enum":["session","senate_floor","senate_committee","house_floor","house_committee","executive"]},"description":"Whose calendar it is on. Accepts a list."},{"name":"status","in":"query","schema":{"type":"string","enum":["scheduled","rescheduled","cancelled","postponed","held"]},"description":"scheduled, rescheduled, cancelled, postponed or held. Accepts a list. A cancellation is an UPDATE to the existing row, not its removal — pair with changed-since to poll for them."},{"name":"committee","in":"query","schema":{"type":"string"},"description":"Meetings held by one committee, by id (see /committee-search). Subcommittees are separate committees and are not rolled up."},{"name":"bill-number","in":"query","schema":{"type":"string"},"description":"Meetings with this bill on the agenda, e.g. 'H.R. 410'. REQUIRES `location`: bill numbers repeat across jurisdictions and sessions, so an unscoped lookup would return another legislature's meetings and look right. Narrow further with session."},{"name":"session","in":"query","schema":{"type":"string"},"description":"The session the meeting belongs to. A year (2025) or a session key (FL:2026F, case-insensitive). Accepts a list — session=[2025,FL:2026F] — matching any of them. An unknown key is a 400."},{"name":"text-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring across three places a caller might mean: the meeting title, the committee holding it, and the bills on its agenda — a hearing is most often looked up by a bill, which is not in the title."},{"name":"has-bills","in":"query","schema":{"type":"boolean"},"description":"true returns only meetings with an agenda. An oversight hearing usually has none, which is not a data gap."},{"name":"is-projected","in":"query","schema":{"type":"boolean"},"description":"false excludes session deadlines and returns published notices only; true returns the deadlines alone."},{"name":"changed-since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only rows whose record changed on or after this — the polling parameter. A canceled or moved meeting shows up here, having never been a new row. Alias: changed_since."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"By start time. Defaults to asc (soonest first); desc reads an archive backwards."}],"responses":{"200":{"description":"A page of events, with the coverage of every jurisdiction in scope.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"coverage":{"type":"array","items":{"$ref":"#/components/schemas/CalendarCoverage"}},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventSummary"}}}}}}},"400":{"description":"No calendar is loaded for any requested jurisdiction (`error.covered` lists the ones that are); bill-number without location; starts-before not later than starts-after; an unknown session key; or an invalid parameter value.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/saved-view-event-search":{"get":{"summary":"Search the calendar using your saved bill views","description":"\"When are the bills on my watchlist being heard?\" — the calendar counterpart to /saved-view-search, which answers the same question about the bills themselves. The view selects BILLS; this returns the meetings those bills are on the agenda for.\n\nA separate endpoint rather than a parameter on /event-search, for the same reason /saved-view-search is separate from /bill-search: the view already carries its own jurisdiction and selection, so `location`, `bill-number` and `text-like` are REJECTED with a 400 rather than silently dropped — a `location` that disagreed with the view could only ever return an empty page. `is-projected` is rejected too: a session deadline carries no agenda, so it can never match a bill view. `has-bills=true` is accepted and is what this endpoint does anyway; `has-bills=false` is rejected, because every meeting here has a matching bill on its agenda and the value could only return an empty page.\n\nEverything that describes the MEETING still applies — when, what kind, whose calendar, which committee, what changed — because those narrow the answer without contradicting the question. Naming several views returns meetings matching ANY of them; an unknown label is a 400, not an empty result.\n\n`saved_view.bills_on_calendar` says how many of the view's bills appear on any agenda at all. It is the difference between \"nothing you follow is scheduled\" and \"your view matches plenty, none of it on a calendar\" — and `coverage` separates both from \"that legislature's calendar was never fetched\". Saved views were called saved filters until the rename; the deprecated path /saved-filter-event-search and the `saved-filter` parameter still work. Through the old path the response also carries `saved_filter`, the old name of `saved_view`.","parameters":[{"name":"saved-view","in":"query","required":true,"schema":{"type":"string"},"example":"Datacenter new","description":"One or more saved BILL view names. Single: saved-view=Datacenter%20new. Several: saved-view=[Datacenter new,Energy] (url-encoded). A bare comma list and repeated bracket keys are accepted too. Every value is split on commas, so a view whose name contains a comma cannot be requested. Calendar-kind views are never resolved here: their names are reported as unknown."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"starts-after","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting on or after this. DEFAULTS TO TODAY — pass an explicit earlier date to include past meetings."},{"name":"starts-before","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting before this. Must be later than starts-after — which defaults to today, so a past starts-before alone is a 400."},{"name":"kind","in":"query","schema":{"type":"string","enum":["hearing","markup","business_meeting","floor_session","convene","sine_die","deadline","signing","veto_deadline","other"]},"description":"What sort of meeting. Accepts a list."},{"name":"calendar","in":"query","schema":{"type":"string","enum":["session","senate_floor","senate_committee","house_floor","house_committee","executive"]},"description":"Whose calendar it is on. Accepts a list."},{"name":"status","in":"query","schema":{"type":"string","enum":["scheduled","rescheduled","cancelled","postponed","held"]},"description":"scheduled, rescheduled, cancelled, postponed or held. Accepts a list."},{"name":"committee","in":"query","schema":{"type":"string"},"description":"Meetings held by one committee, by id."},{"name":"session","in":"query","schema":{"type":"string"},"description":"The session the MEETING belongs to — not the view's own session term, which the view already applies to its bills. A year (2025) or a session key (FL:2026F). Accepts a list."},{"name":"has-bills","in":"query","schema":{"type":"boolean"},"description":"Accepted as true only, so one parameter set works against both calendar endpoints. Every meeting here already has a bill from your view on its agenda; false is rejected rather than returning an empty page."},{"name":"changed-since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only rows whose record changed on or after this — the polling parameter for cancellations and reschedules. Alias: changed_since."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"By start time. Defaults to asc."}],"responses":{"200":{"description":"A page of meetings, with what the view matched and the coverage of the jurisdictions it named.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"saved_view":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"string"},"description":"The views that were resolved."},"locations":{"type":"array","items":{"type":"string"},"description":"The jurisdictions the views name — taken FROM them, which is why there is no location parameter."},"bills_on_calendar":{"type":"integer","description":"How many of the views' bills appear on any agenda. Zero here means the view matched nothing scheduled, which is not the same as no meetings matching."}}},"coverage":{"type":"array","items":{"$ref":"#/components/schemas/CalendarCoverage"}},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventSummary"}}}}}}},"400":{"description":"Missing or unknown saved-view name, a parameter that conflicts with the view, has-bills=false, or starts-before not later than starts-after.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/saved-calendar-view-search":{"get":{"summary":"Run your saved calendar views","description":"Runs saved CALENDAR views — the views saved on the Calendar page — and returns their meetings: the calendar counterpart of /saved-view-search (bill views) and /saved-view-official-search (legislator views). Each view is read exactly as the page reads it: its jurisdictions (All, or none, is every jurisdiction), its window, calendars, kinds, agenda filter and search text, and its Legislation filter — the saved bill views it includes, read as the meetings whose agendas carry their bills. Naming several views returns meetings matching any of them.\n\nNot /saved-view-event-search, which takes saved BILL views. A view keeps its own window unless starts-after or starts-before is given, which then applies to every view in the request. What the view already decides — location, text-like, has-bills, bill-number, is-projected — is rejected with a 400 rather than silently dropped; everything else describing the meeting narrows every view alike. A one-state plan reads every view within its state.","parameters":[{"name":"saved-view","in":"query","required":true,"schema":{"type":"string"},"example":"Upcoming hearings in our states","description":"One or more saved CALENDAR view names. Single: saved-view=Upcoming%20hearings. Several: saved-view=[Upcoming hearings,Florida] (url-encoded). A bare comma list and repeated bracket keys are accepted too. Every value is split on commas, so a view whose name contains a comma cannot be requested."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"starts-after","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting on or after this, replacing every view's own window."},{"name":"starts-before","in":"query","schema":{"type":"string","format":"date"},"description":"Only meetings starting before this, replacing every view's own window. Must be later than starts-after."},{"name":"kind","in":"query","schema":{"type":"string","enum":["hearing","markup","business_meeting","floor_session","convene","sine_die","deadline","signing","veto_deadline","other"]},"description":"What sort of meeting, narrowing the views. Accepts a list."},{"name":"calendar","in":"query","schema":{"type":"string","enum":["session","senate_floor","senate_committee","house_floor","house_committee","executive"]},"description":"Whose calendar it is on, narrowing the views. Accepts a list."},{"name":"status","in":"query","schema":{"type":"string","enum":["scheduled","rescheduled","cancelled","postponed","held"]},"description":"scheduled, rescheduled, cancelled, postponed or held. Accepts a list."},{"name":"committee","in":"query","schema":{"type":"string"},"description":"Meetings held by one committee, by id."},{"name":"session","in":"query","schema":{"type":"string"},"description":"The session the meeting belongs to: a year or a session key. Accepts a list."},{"name":"changed-since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only rows whose record changed on or after this — for polling cancellations and reschedules."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"By start time. Defaults to asc (desc when every view looks back, as Past 7 days does)."}],"responses":{"200":{"description":"A page of meetings, with how each view read and the coverage of the jurisdictions they reach.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"saved_view":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"string"},"description":"The views that were resolved."},"views":{"type":"array","description":"How each view read.","items":{"type":"object","properties":{"label":{"type":"string"},"window":{"type":"string","description":"The view's window (next7, next30, next90, past7, past30, all), or custom when starts-after/starts-before replaced it."},"locations":{"description":"The jurisdictions the view names, or \"all\".","oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["all"]}]},"bill_views":{"type":"integer","description":"How many saved bill views its Legislation filter includes."}}}}}},"coverage":{"type":"array","items":{"$ref":"#/components/schemas/CalendarCoverage"}},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventSummary"}}}}}}},"400":{"description":"Missing or unknown calendar view name, a parameter that conflicts with the view, or starts-before not later than starts-after.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/event-detail/{id}":{"get":{"summary":"Get one calendar event with its full agenda","description":"What this adds over a row in event-search, and why it is a second request: the WHOLE agenda (a list row previews five bills, and a markup routinely covers dozens); the notice's `description`, which for many federal meetings is the printed agenda in full; and the supersedes chain, so a caller polling `changed-since` can tell a moved hearing from a second one.\n\nThe id may be a published meeting or a projected session deadline (`sine-die-{STATE}-{SESSION}`), which resolves back to the session record — the calendar does not copy an adjournment into a second table where the two dates could disagree.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Event id, e.g. cal-US-336587, or a projected session deadline: sine-die-US-2025 for a regular session, sine-die-FL-2026F for a special one."}],"responses":{"200":{"description":"Event detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventDetail"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/executive-detail/{id}":{"get":{"summary":"Get a governor or the President","description":"The chief executive of a jurisdiction, with the signing record and the ideology scores derived from it. Separate from /legislator-detail, which resolves an executive but returns null scores — it computes from votes an executive does not cast.\n\nAddressed by TERM rather than person, because the record is per term. The id may be an executive term id, or the person's id from /official-search (where executives appear with branch `executive`), which resolves to their current term — or, for someone no longer in office, their most recent.\n\nREAD `signing_record.tracked` FIRST. Executive actions are parsed for five jurisdictions today; elsewhere the counts are zero by construction and the scores null, which is a gap in coverage rather than a governor who signed nothing.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An executive TERM id, or the person's id from /official-search — which resolves to their current term (else their most recent)."}],"responses":{"200":{"description":"Executive detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExecutiveDetail"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown executive term.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/executive-signing-history/{id}":{"get":{"summary":"An executive's signed and vetoed bills","description":"The counterpart to /legislator-vote-history, and the parallel is the point: a legislator's record is the votes they cast, an executive's is the bills they signed or refused to. Same envelope — pagination, the subject once at the top, then the rows.\n\nONE ROW PER BILL, carrying its final action, which is the view the profile's counts and the browse drill also use — so a page here and the number on the profile cannot disagree. Counting events instead would report twelve vetoes over two bills, because a veto and its veto message are filed separately.\n\nCheck `executive.tracked` before reading an empty page: executive actions are parsed for five jurisdictions, and elsewhere there is nothing to return rather than nothing to report.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An executive TERM id, or the person's id from /official-search — which resolves to their current term (else their most recent)."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"action","in":"query","schema":{"type":"string","enum":["signed","vetoed","unsigned"]},"description":"Narrow to one disposition. `unsigned` is a bill that became law without a signature — neither endorsed nor rejected."},{"name":"session","in":"query","schema":{"type":"string"},"description":"Which session. A YEAR (2025) covers every sitting in it; a SESSION KEY (FL:2026F) is exactly one — a state can sit several times in a year, and Florida held nine special sessions since 2023. Keys are <STATE>:<the jurisdiction's own name for the sitting> and are case-insensitive; they appear as `session_key` on bill-search and saved-view-search rows. Accepts a list — session=[2025,FL:2026F] — matching any of them. An unknown key is a 400, not an empty page."},{"name":"topic","in":"query","schema":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]},"description":"Filter to bills tagged with this topic. ONE value only (no list syntax), lowercase and case-sensitive: topic=crime. Allowed values: taxes, budget, affordability, crime, immigration, ai, climate, housing, healthcare, agriculture, mining, traffic, wages, education, elections, defense, foreign-policy, government, finance, public-lands, technology, civil-rights, other."},{"name":"is-resolution","in":"query","schema":{"type":"string","enum":["y","n"]},"description":"y = resolutions/memorials only; n = proposed laws only."},{"name":"text-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the bill title, bill number or keywords. A plain substring — NOT bill-search's free-text syntax (no quoted phrases, no -exclusions, no bill-text search)."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"By action date. Defaults to desc (most recent first)."}],"responses":{"200":{"description":"A page of bills with the executive's identity.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"executive":{"type":"object","properties":{"executive_id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"location":{"type":["string","null"]},"location_name":{"type":"string"},"tracked":{"type":"boolean"},"executive_url":{"type":"string","format":"uri"}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/SigningHistoryRow"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown executive term.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/datasets":{"get":{"summary":"List the bulk datasets and their files","description":"Every bulk dataset — bills, votes, bill_texts (latest version of each bill), legislators, committees, events, effective_dates (a row per effective date, where they are live) — with its newest nightly build and every file in it: one per jurisdiction (`ALL` for every jurisdiction together) and, where the data has years, per year; in CSV (gzip) and Parquet. Each file lists its size, row count and SHA-256. Any key can read the catalog; `bulk_access` says whether this key's plan can download (Pro and Scale).","parameters":[{"name":"dataset","in":"query","schema":{"type":"string","enum":["bills","votes","bill_texts","legislators","committees","events","effective_dates","amendments"]},"description":"One dataset only."}],"responses":{"200":{"description":"The catalog.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"bulk_access":{"type":"boolean","description":"Whether this key's plan can download."},"data":{"type":"array","items":{"type":"object","properties":{"dataset":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"split_by":{"type":"array","items":{"type":"string","enum":["location","year"]}},"formats":{"type":"array","items":{"type":"string","enum":["csv","parquet"]}},"version":{"type":["string","null"],"description":"The newest build's date; null before the first build."},"built_at":{"type":["string","null"],"format":"date-time"},"not_refreshed":{"type":"array","items":{"type":"string"},"description":"Jurisdictions whose day's ingest hadn't finished when this build ran; their files carry the previous build's data. Usually empty."},"rows":{"type":"integer"},"locations":{"type":"array","items":{"type":"string"}},"years":{"type":"array","items":{"type":"integer"}},"files":{"type":"array","items":{"type":"object","properties":{"location":{"type":"string"},"year":{"type":["integer","null"]},"format":{"type":"string","enum":["csv","parquet"]},"bytes":{"type":"integer"},"rows":{"type":"integer"},"sha256":{"type":"string"}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/datasets/{dataset}/download":{"get":{"summary":"Get a download link for one bulk dataset file","description":"A link to one file, good for 15 minutes; download it straight from storage. Pro and Scale plans only (403 `forbidden` otherwise). One request against the monthly quota, whatever the file's size.","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string","enum":["bills","votes","bill_texts","legislators","committees","events","effective_dates","amendments"]}},{"name":"location","in":"query","required":true,"schema":{"type":"string"},"description":"A jurisdiction code (TX, US …) or ALL."},{"name":"year","in":"query","schema":{"type":"integer"},"description":"Required for the datasets split by year: bills, votes, bill_texts, effective_dates (session year) and events (calendar year)."},{"name":"format","in":"query","schema":{"type":"string","enum":["csv","parquet"],"default":"csv"},"description":"csv is gzip-compressed."},{"name":"version","in":"query","schema":{"type":"string","format":"date"},"description":"One of the last seven nightly builds; default the newest."}],"responses":{"200":{"description":"The link and the file it points to.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"dataset":{"type":"string"},"version":{"type":"string"},"location":{"type":"string"},"year":{"type":["integer","null"]},"format":{"type":"string"},"bytes":{"type":"integer"},"rows":{"type":"integer"},"sha256":{"type":"string"},"filename":{"type":"string"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No such dataset, no build yet, or no file for that jurisdiction, year and format (the error lists the years that have one).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/audit-events":{"get":{"summary":"Read the organization's audit log","description":"Who did what in the organization — sign-ins, members and licenses, API keys, saved views, exports, widgets, webhooks, plan changes — and every time CapitolMath staff opened or changed it. For a SIEM or other collector. **Ids only**: names are shown only to the organization's own Owners and Admins in the app. The key must have been created by an Owner or Admin with *Can read the audit log*, on a plan that includes it (Developer and above); otherwise 403 `forbidden`. Entries are append-only and chained: each carries the hash of the one before (`prev_hash`) and its own (`hash` = SHA-256 of `prev_hash`, a newline, and the entry's canonical JSON), so a missing or altered entry shows. Follow the log with `after`: keep the last `seq` you stored and ask for what came after it — every entry arrives exactly once, however many are written meanwhile. How far back it reaches is the plan's retention (`retention_days`).","parameters":[{"name":"after","in":"query","schema":{"type":"string","pattern":"^[0-9]+$"},"description":"Oldest first, starting after this seq."},{"name":"before","in":"query","schema":{"type":"string","pattern":"^[0-9]+$"},"description":"Newest first, starting before this seq. Omit both for the newest page."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"action","in":"query","schema":{"type":"string"},"description":"One action, e.g. `member.role_changed`."},{"name":"group","in":"query","schema":{"type":"string","enum":["auth","access","egress","configuration","billing","organization","staff"]},"description":"A family of actions."},{"name":"actor_type","in":"query","schema":{"type":"string","enum":["user","api_key","system","staff"]}},{"name":"actor_id","in":"query","schema":{"type":"string"}},{"name":"outcome","in":"query","schema":{"type":"string","enum":["success","failure","denied"]}},{"name":"staff","in":"query","schema":{"type":"string","enum":["1"]},"description":"CapitolMath staff access only."},{"name":"resource_type","in":"query","schema":{"type":"string"}},{"name":"resource_id","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of entries.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"string","description":"1, 2, 3 … within the organization; a gap is a missing entry."},"occurred_at":{"type":"string","format":"date-time","description":"UTC."},"action":{"type":"string"},"outcome":{"type":"string","enum":["success","failure","denied"]},"actor_type":{"type":"string","enum":["user","api_key","system","staff"]},"actor_id":{"type":["string","null"]},"actor_ref":{"type":["string","null"],"description":"For an API key, the member who created it."},"resource_type":{"type":["string","null"]},"resource_id":{"type":["string","null"]},"source_ip":{"type":["string","null"]},"user_agent":{"type":["string","null"]},"request_id":{"type":["string","null"]},"changes":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"prior":{"type":["string","null"]},"new":{"type":["string","null"]}}},"description":"Fields the action changed. A name, description or filter is recorded as changed, without its value."},"metadata":{"type":"object"},"prev_hash":{"type":["string","null"]},"hash":{"type":"string"}}}},"next":{"type":["string","null"],"description":"The cursor for the next page: pass it as `after` (oldest first) or `before` (newest first)."},"order":{"type":"string","enum":["asc","desc"]},"retention_days":{"type":"integer"},"window_start":{"type":"string","format":"date-time"},"anchor":{"type":["object","null"],"description":"The most recent daily anchor that includes this log, and the proof: the entry at `seq` (whose hash is `head_hash`) is a leaf of the Merkle tree whose `root` was published that day. Null before the log is first anchored. Check it with the verifier in the public anchor repository.","properties":{"day":{"type":"string","format":"date"},"org_id":{"type":"string"},"seq":{"type":"string"},"head_hash":{"type":"string"},"leaf_hash":{"type":"string"},"proof":{"type":"array","items":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"hash":{"type":"string"}}}},"root":{"type":"string"},"chains":{"type":"integer","description":"How many chains the tree covers."},"published":{"type":["object","null"],"properties":{"file_url":{"type":["string","null"]},"commit_sha":{"type":["string","null"]},"archive_urls":{"type":"array","items":{"type":"string"}}}},"verify":{"type":"string","description":"How to verify, with the standalone verifier."}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/watches":{"get":{"summary":"List the key owner's watched bills","description":"The bills the key's owner watches, in the key's organization. Watch is how a member follows a bill: its stage changes and hearings come to them by email, under their own notification settings. A watch is personal: a key reads and changes only its creator's watches, never anyone else's. No extra key permission is needed: any key whose creator may use the REST API can use it. Keys created before organizations get 403 `forbidden`. Newest first.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."}],"responses":{"200":{"description":"A page of watched bills.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"type":"object","properties":{"location":{"type":["string","null"],"example":"CA"},"session":{"type":["integer","null"],"example":2026},"bill_number":{"type":["string","null"],"example":"SB 12"},"bill_name":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri","description":"This bill's /v1/bill-detail URL."},"watching":{"type":"boolean"},"watched_at":{"type":["string","null"],"format":"date-time","description":"When the key's owner began watching it."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"summary":"Watch a bill","description":"The bills the key's owner watches, in the key's organization. Watch is how a member follows a bill: its stage changes and hearings come to them by email, under their own notification settings. A watch is personal: a key reads and changes only its creator's watches, never anyone else's. No extra key permission is needed: any key whose creator may use the REST API can use it. Keys created before organizations get 403 `forbidden`. Watching a bill the organization tracks also lists the key's owner among the watchers of each tracked item for it they can see. Watching a bill already watched changes nothing (`added` is false). Watching never counts against a plan's tracked bills.","parameters":[{"name":"location","in":"query","required":true,"schema":{"type":"string"},"example":"CA","description":"The bill's two-letter jurisdiction code, as in /v1/bill-detail (US for Congress)."},{"name":"session","in":"query","required":true,"schema":{"type":"integer"},"example":2026,"description":"The bill's session year, as in /v1/bill-detail."},{"name":"bill-number","in":"query","required":true,"schema":{"type":"string"},"example":"SB 12","description":"The bill's number, as in /v1/bill-detail; case-insensitive."}],"responses":{"200":{"description":"The bill, now watched.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"location":{"type":["string","null"],"example":"CA"},"session":{"type":["integer","null"],"example":2026},"bill_number":{"type":["string","null"],"example":"SB 12"},"bill_name":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri","description":"This bill's /v1/bill-detail URL."},"watching":{"type":"boolean"},"watched_at":{"type":["string","null"],"format":"date-time","description":"When the key's owner began watching it."},"added":{"type":"boolean","description":"False when it was already watched."}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No such bill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"summary":"Stop watching a bill","description":"The bills the key's owner watches, in the key's organization. Watch is how a member follows a bill: its stage changes and hearings come to them by email, under their own notification settings. A watch is personal: a key reads and changes only its creator's watches, never anyone else's. No extra key permission is needed: any key whose creator may use the REST API can use it. Keys created before organizations get 403 `forbidden`. Also takes the key's owner off the watchers of the tracked items for it. A member who owns a tracked item for the bill always follows it: that is a 409 `conflict` until the item is given to someone else.","parameters":[{"name":"location","in":"query","required":true,"schema":{"type":"string"},"example":"CA","description":"The bill's two-letter jurisdiction code, as in /v1/bill-detail (US for Congress)."},{"name":"session","in":"query","required":true,"schema":{"type":"integer"},"example":2026,"description":"The bill's session year, as in /v1/bill-detail."},{"name":"bill-number","in":"query","required":true,"schema":{"type":"string"},"example":"SB 12","description":"The bill's number, as in /v1/bill-detail; case-insensitive."}],"responses":{"200":{"description":"The bill, no longer watched.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"location":{"type":["string","null"],"example":"CA"},"session":{"type":["integer","null"],"example":2026},"bill_number":{"type":["string","null"],"example":"SB 12"},"bill_name":{"type":["string","null"]},"detail_url":{"type":["string","null"],"format":"uri","description":"This bill's /v1/bill-detail URL."},"watching":{"type":"boolean"},"watched_at":{"type":["string","null"],"format":"date-time","description":"When the key's owner began watching it."},"removed":{"type":"boolean","description":"False when it wasn't watched."}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No such bill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The key's owner owns a tracked item for this bill, and owners always follow their items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/tracked-items":{"get":{"summary":"Search the organization's tracked items","description":"The organization's tracked items as the member who created the key sees them on Tracking › Tracked items: the same items, filters and order, with Read All when they hold it, and through the client wall when they're a client member. Their permissions are read on every call: without Read on Tracked items the answer is 403 `forbidden` with the reason. Keys created before organizations get 403. With no `status`, only items in an open status are listed, as the page starts; `status=all` lists every status. Lists take `a,b` or `[a,b]`. A value the key's owner can't filter by (an unknown status, tag or client, a field they can't see) is a 400, never set aside. Reading never marks an item read.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Words to find in the bill number and name, the client, the owner and the tags (every word must match).","example":"housing"},{"name":"search-notes","in":"query","schema":{"type":"boolean"},"description":"With q: also match items whose notes the key's owner can read contain the words."},{"name":"status","in":"query","schema":{"type":"string"},"description":"Status ids (from an item's status.id), `open` for every open status, or `all`. Default: every open status."},{"name":"owner","in":"query","schema":{"type":"string"},"description":"Member ids, or `me` for the key's owner. Combines with watcher by OR: owner=me&watcher=me is the items they own or watch."},{"name":"watcher","in":"query","schema":{"type":"string"},"description":"Member ids, or `me`."},{"name":"position","in":"query","schema":{"type":"string","description":"Allowed: support, support_if_amended, neutral, oppose_unless_amended, oppose, none."},"description":"Positions. A 400 with positions turned off.","example":"oppose"},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Tag ids (from an item's tags[].id). Any of them."},{"name":"client","in":"query","schema":{"type":"string"},"description":"Client ids (from an item's client.id), or `none` for the organization's own work."},{"name":"legislation-view","in":"query","schema":{"type":"string"},"description":"A Legislation saved view's name, as the key's owner sees it, or `Bills I watch`: items whose bill it matches."},{"name":"location","in":"query","schema":{"type":"string"},"description":"Two-letter jurisdiction codes of the items' bills (US for Congress).","example":"CA"},{"name":"outcome","in":"query","schema":{"type":"string","description":"Allowed: in_progress, passed, vetoed, dead."},"description":"What became of the bill."},{"name":"furthest-stage","in":"query","schema":{"type":"string","description":"Allowed: introduced, in_committee, floor_vote:lower, floor_vote:upper, floor_vote:none, reconciliation, executive_signature, override."},"description":"The furthest rung the bill reached, as the page's Furthest stage filter."},{"name":"effective","in":"query","schema":{"type":"string","enum":["in_effect","d30","d90","d365","later","none"]},"description":"When the bill takes effect: in_effect, d30, d90, d365 (the next 30, 90 or 365 days), later, or none."},{"name":"stage-moved","in":"query","schema":{"type":"boolean"},"description":"Only items whose bill's stage moved in the last 7 days."},{"name":"outcome-reached","in":"query","schema":{"type":"boolean"},"description":"Only items still in an open status whose bill was signed, vetoed or died."},{"name":"open-tasks","in":"query","schema":{"type":"boolean"},"description":"Only items with open tasks the key's owner can see."},{"name":"conflicts","in":"query","schema":{"type":"boolean"},"description":"Only items whose bill another client tracks with the opposite position."},{"name":"unread","in":"query","schema":{"type":"string","description":"Allowed: stage, vote, hearing, note, mention, task, field. Also amendment: an amendment to the bill offered or decided."},"description":"Only items with unread changes of these kinds for the key's owner."},{"name":"custom-field","in":"query","schema":{"type":"string"},"description":"A custom field's filter, as <field id>:<filter>: ~words for text, lo..hi for a number, money or date (either end may be left open), a list of choice ids or `none`, `yes`/`no`, or * for any value. Repeat the key for several fields. Active fields only.","example":"fld_abc:100..500"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"A column: bill, name, client, position, priority, status, owner, next, updated, or custom-field:<field id>. Default: priority, then bill number."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"With sort: ascending (the default) or descending."},{"name":"saved-view","in":"query","schema":{"type":"string"},"description":"A Tracked items saved view's name, as the key's creator sees it: its filters, status and order as saved, with Me and open statuses resolved for them. Takes no other filter beside it (only page and page-size)."}],"responses":{"200":{"description":"A page of tracked items.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TrackedItem"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"summary":"Track a bill","description":"Track a bill for the organization's own work or for one client, as the key's creator, as Track does in the app. Needs the key's `tracking:write` permission and a creator who may track bills (Create on Tracked items); a client member's key never can. Fields left out take the app's defaults: no position or priority, the first open status, the key's creator as owner, no tags. Public position, our ask and custom fields are set afterwards with PATCH. A bill already tracked for that client (or for the organization's own work) is 409 `conflict`; a client the creator can't see is 404; past the plan's tracked-bill limit, or outside its states, 403. Audited, naming the key and its creator.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["location","session","bill_number"],"additionalProperties":false,"properties":{"location":{"type":"string","example":"CA","description":"The bill's two-letter jurisdiction code, as in /v1/bill-detail."},"session":{"type":"integer","example":2026,"description":"The bill's session year."},"bill_number":{"type":"string","example":"SB 12","description":"The bill's number; case-insensitive."},"client":{"type":["string","null"],"description":"A client's id, for that client's work; null or left out for the organization's own work. Clients must be on."},"position":{"type":"string","enum":["support","support_if_amended","neutral","oppose_unless_amended","oppose","none"]},"priority":{"type":["string","null"],"enum":["high","medium","low",null]},"status":{"type":"string","description":"A status id (an item's status.id)."},"owner":{"type":"string","description":"A member id: a team member with a Full license who will see the item."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag ids."}}}}}},"responses":{"200":{"description":"The new tracked item. With the key's `read` permission, the item as the key's creator sees it (`data`); a write-only key (`tracking:write` alone) gets only its `id`, since writing never reads more than the key may read.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["data"],"properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/TrackedItem"},{"type":"null"}],"description":"The item as the key's creator now sees it; null when the write took it out of their sight (for instance, giving it to a new owner when they saw it only as its owner)."},"created":{"type":"boolean"}}},{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"created":{"type":"boolean"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No such bill, or a client the key's creator can't see.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already tracked for that client or for the organization's own work, or clients are off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/tracked-items/{id}":{"get":{"summary":"One tracked item","description":"One tracked item as the member who created the key sees it, whatever its status. 404 when it isn't tracked here or isn't shared with them: the two look the same. Reading never marks it read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The tracked item's id."}],"responses":{"200":{"description":"The tracked item.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TrackedItem"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not tracked here, or not shared with the key's owner.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"summary":"Change a tracked item's fields","description":"Change a tracked item's fields as the key's creator, as the tracked item panel does. Needs the key's `tracking:write` permission. Every field is checked against the creator's permissions as they stand: changing fields needs Update on Tracked items; `owner` needs being the item's owner or Manage All, and the new owner a Full license and sight of the item; `our_ask` is the owner's or Manage All's. Fields the organization has turned off (positions, priority) are refused with 409 `conflict`, as is an inactive custom field. Only the fields sent change; a value already held changes nothing. An `owner` change is checked before anything is written. Each change is kept in the item's history with the optional `reason`, is unread for its owner and watchers, runs the organization's automation rules as a change in the app does, and is audited, naming the key and its creator. A client member's key never writes.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The tracked item's id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"position":{"type":"string","enum":["support","support_if_amended","neutral","oppose_unless_amended","oppose","none"]},"priority":{"type":["string","null"],"enum":["high","medium","low",null],"description":"null clears it."},"status":{"type":"string","description":"A status id (an item's status.id)."},"owner":{"type":"string","description":"A member id."},"public_position":{"type":"boolean","description":"On the State plan and up."},"our_ask":{"type":["string","null"],"enum":["adopted","partly","not_adopted",null]},"tags":{"type":"array","items":{"type":"string"},"description":"Tag ids: the item's whole set of tags."},"custom_fields":{"type":"object","additionalProperties":true,"description":"{ <field id>: value }, null clearing one: text, a number, YYYY-MM-DD, true or false, or a choice's option id. Active fields only."},"reason":{"type":"string","maxLength":500,"description":"Why, kept in the item's history beside each change."}}}}}},"responses":{"200":{"description":"The fields that changed (empty when nothing moved), and, with the key's `read` permission, the item as the key's creator now sees it (`data`). A write-only key (`tracking:write` alone) gets the item's `id` instead, since writing never reads more than the key may read.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["data"],"properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/TrackedItem"},{"type":"null"}],"description":"The item as the key's creator now sees it; null when the write took it out of their sight (for instance, giving it to a new owner when they saw it only as its owner)."},"changed":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"changed":{"type":"array","items":{"type":"string"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not tracked here, or not shared with the key's creator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A field the organization has turned off, an inactive custom field, or a status or tag that no longer exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/legislator-vote-history/{id}":{"get":{"summary":"A legislator's recorded floor votes","description":"Every yes/no floor vote the legislator cast, newest first, each joined to its bill. The legislator's identity is returned once at the top level.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Legislator id."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"vote","in":"query","schema":{"type":"string","enum":["yes","no"]},"description":"Filter to yes or no votes."},{"name":"vote-type","in":"query","schema":{"type":"string","enum":["floor","committee","all"]},"description":"Which roll calls to include. Defaults to floor — the votes this endpoint has always returned, and the ones the ideology scores are computed from. Committee votes are available where the jurisdiction's history has been rebuilt onto the granular model."},{"name":"session","in":"query","schema":{"type":"string"},"description":"Which session. A YEAR (2025) covers every sitting in it; a SESSION KEY (FL:2026F) is exactly one — a state can sit several times in a year, and Florida held nine special sessions since 2023. Keys are <STATE>:<the jurisdiction's own name for the sitting> and are case-insensitive; they appear as `session_key` on bill-search and saved-view-search rows. Accepts a list — session=[2025,FL:2026F] — matching any of them. An unknown key is a 400, not an empty page."},{"name":"outcome","in":"query","schema":{"type":"string","enum":["in_progress","passed","vetoed","dead"]},"description":"What became of the bill. ONE value only (no list syntax). `in_progress` means not passed, not vetoed, and its session has not adjourned; `dead` means the session adjourned without passage — or, where no adjournment is recorded, passed its scheduled end; a session found sitting past that date is reopened and its bills are in_progress again. Allowed values: in_progress, passed, vetoed, dead."},{"name":"topic","in":"query","schema":{"type":"string","enum":["taxes","budget","affordability","crime","immigration","ai","climate","housing","healthcare","agriculture","mining","traffic","wages","education","elections","defense","foreign-policy","government","finance","public-lands","technology","civil-rights","other"]},"description":"Filter to bills tagged with this topic. ONE value only (no list syntax), lowercase and case-sensitive: topic=crime. Allowed values: taxes, budget, affordability, crime, immigration, ai, climate, housing, healthcare, agriculture, mining, traffic, wages, education, elections, defense, foreign-policy, government, finance, public-lands, technology, civil-rights, other."},{"name":"origin-chamber","in":"query","schema":{"type":"string","enum":["upper","lower"]},"description":"Originating chamber: upper (senate) or lower (house/assembly)."},{"name":"is-resolution","in":"query","schema":{"type":"string","enum":["y","n"]},"description":"y = resolutions/memorials only; n = proposed laws only."},{"name":"text-like","in":"query","schema":{"type":"string"},"description":"Free-text search. Matches the bill title, its keywords, or the LATEST bill text. Multiple words are matched as separate terms anywhere in the bill — quote them (\"eminent domain\") to require the exact phrase, and prefix a term with - to exclude it. Title and keyword matching is substring-based, so a partial bill number still matches; the bill body is word-based, so it is unaffected by word endings. Bill text is searched for jurisdictions whose history has been rebuilt onto the granular model; elsewhere this matches title and keywords only."},{"name":"sponsor-name-like","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on a sponsor's name."}],"responses":{"200":{"description":"A page of votes with the legislator's identity.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"legislator":{"type":"object","properties":{"legislator_id":{"type":"string"},"name":{"type":"string"},"legislator_url":{"type":"string","format":"uri"}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/VoteHistoryRow"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown legislator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/legislator-amendments/{id}":{"get":{"summary":"The amendments a legislator offered","description":"Every amendment the legislator sponsored, newest first, each with its bill, outcome, roll call and effect, and the counts by outcome. Released legislatures only (amendments are released one legislature at a time, once each passes its checks), in the jurisdiction the legislator's record is scoped to. A sponsor is counted only when the legislature's name for them was matched to this legislator. recommended (a committee's report names it) is never adopted.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Legislator id."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"1-based page number (default 1)."},{"name":"page-size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Records per page. Defaults to your plan's max page size, capped at 100 (Browse, the free plan, is 25); values above it are clamped down. Use a smaller page to keep responses light."},{"name":"session","in":"query","schema":{"type":"integer"},"description":"One session year, e.g. 2026: only amendments to that session's bills."},{"name":"outcome","in":"query","schema":{"type":"string","enum":["adopted","not_adopted","recommended","offered","withdrawn","tabled","ruled_out","superseded","partial","unknown"]},"description":"One outcome, as stored. The counts still cover every outcome."}],"responses":{"200":{"description":"A page of amendments with the legislator's identity and the counts by outcome.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-Quota-Limit":{"$ref":"#/components/headers/X-Quota-Limit"},"X-Quota-Remaining":{"$ref":"#/components/headers/X-Quota-Remaining"},"X-Quota-Period":{"$ref":"#/components/headers/X-Quota-Period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"legislator":{"type":"object","properties":{"legislator_id":{"type":"string"},"name":{"type":"string"},"legislator_url":{"type":"string","format":"uri"}}},"counts":{"type":"object","description":"How many there are of each outcome. recommended is counted on its own, never as adopted.","properties":{"adopted":{"type":"integer"},"not_adopted":{"type":"integer"},"recommended":{"type":"integer"},"offered":{"type":"integer"},"withdrawn":{"type":"integer"},"tabled":{"type":"integer"},"ruled_out":{"type":"integer"},"superseded":{"type":"integer"},"partial":{"type":"integer"},"unknown":{"type":"integer"}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/Amendment"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Unknown legislator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}