Live oddsRegenerated hourly
BOBillOdds

Developers · API v1

The BillOdds API

Every tracked bill’s probability of passage, its history and what changed, as read-only JSON. Built for analysts, newsrooms and trading desks that want the tape in their own tools.

Overview

The BillOdds API is read-only JSON over HTTPS: every tracked bill, the probability that it passes, that probability’s history, and what changed since you last asked. It is the same data the site shows, scoped to your key’s plan.

It is a polling API. There are no webhooks and no streaming in v1 — call /changes on a schedule instead. Push delivery with an SLA is the enterprise feed, a separate product.

Base URL https://billodds.com/api/v1. The full description is an OpenAPI 3.1 document at /openapi.json — public, no key — which imports into Postman, Insomnia or any code generator. Everything under Endpoints is rendered from it.

Download the Postman collection — every endpoint, with your key set once in the collection’s api_key variable.

Authentication

Send your key in the Authorization header as a bearer token, on every request. That is the only place the API reads it.

Authenticated request
curl -sS "https://billodds.com/api/v1/meta" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Never put a key in a URL. URLs end up in server, proxy and CDN logs, so a request carrying a key in its query string is refused with a 400 key_in_query before it is authenticated. Keep keys on your server: the API sends no CORS headers, because a key in a browser is a key anyone can read.

Keys are issued by request: hello@billodds.com. A revoked key stops working within 60 seconds. Call /meta first: it returns your key’s own plan, so a client can discover what it may ask for.

Plans & scopes

Every key carries a plan: which states, sectors and endpoints it covers, how much history it reads, how fast it may call, and when it expires. /meta returns it as data.key.scopes.

Plan fields
FieldMeaning
statesThe states whose bills your key can see, or "*" for all.
sectorsThe sectors your key can see, or "*" for all.
endpointsThe endpoints your key may call, or "*" for all. /meta is always allowed.
history_daysHow far back history reaches. null is unlimited.
rate_per_minRequests per minute.
expiresWhen the key stops working, or null.

Lists are narrowed to your plan without comment. Asking for something outside it by name — a state in ?state=, a sector in a path, a bill’s address, history before your window — is a 403 whose code ends in _not_in_plan. It carries an upgrade block pointing back here, and the contact for a larger plan when one is configured.

A plan refusal
{
  "error": {
    "status": 403,
    "code": "state_not_in_plan",
    "message": "Your plan covers NY, NJ. TX is not included.",
    "request_id": "7d8b0b0e-4d4f-4b8e-9a59-0c7e8d7a3f11",
    "upgrade": {
      "docs": "https://billodds.com/developers#plans"
    }
  }
}

To upgrade, ask for a new plan on the same key. Keys are issued by request: hello@billodds.com.

Rate limits

Each key may make rate_per_min requests per 60-second window. Every authenticated response says where you stand:

  • RateLimit-Limit — your requests per window.
  • RateLimit-Remaining — what is left in this one.
  • RateLimit-Reset — seconds until it resets.

Past the limit the answer is 429 rate_limited with a Retry-After header in seconds. Wait that long. Failed authentication is throttled per client too, so retrying a bad key only gets you 429s sooner.

Limits are enforced per region and are approximate. Your requests may be served from more than one place, each counting on its own, so treat the headers as guidance and stay comfortably under your limit rather than at it.

Caching

Successful responses carry a weak ETag and Cache-Control: private, max-age=60. Send the ETag back as If-None-Match and an unchanged response comes back as 304 Not Modified with no body.

A 304 still counts toward your rate limit. It saves bandwidth, not quota. Responses are private and vary on Authorization because each is scoped to the key that asked — never put them in a cache shared between keys. Errors are no-store.

Errors

Every error has the same envelope. Branch on code, never on message, which is for people and may be reworded. details lists the parameters a 400 refused; request_id matches the X-Request-Id header — quote it if you report a problem.

Error envelope
{
  "error": {
    "status": 400,
    "code": "invalid_parameter",
    "message": "One or more query parameters are not valid for this endpoint.",
    "request_id": "0c1f6a52-58b4-4bb8-a5f2-5b8f8d1c2e90",
    "details": [
      {
        "param": "per_page",
        "issue": "Too big: expected number to be <=100"
      }
    ]
  }
}

Error codes
Code · statusMeaning
key_in_query400Send the key in an Authorization: Bearer header, never in the URL.
invalid_parameter400One or more query parameters are not valid for this endpoint.
invalid_cursor400The since value is neither an RFC 3339 instant nor a next_since cursor this API issued.
unauthorized401A valid API key is required: Authorization: Bearer bo_live_…
key_revoked401This API key has been revoked.
key_expired401This API key has expired.
endpoint_not_in_plan403Your plan does not include this endpoint.Carries the upgrade block.
state_not_in_plan403Your plan does not include this state.Carries the upgrade block.
sector_not_in_plan403Your plan does not include this sector.Carries the upgrade block.
bill_not_in_plan403Your plan does not include this bill.Carries the upgrade block.
history_not_in_plan403Your plan does not include history that far back.Carries the upgrade block.
not_found404No such endpoint or resource.
method_not_allowed405This API is read-only. Use GET.
rate_limited429Rate limit exceeded. Retry after the number of seconds in Retry-After.Carries the upgrade block.
internal500Something went wrong on our side.
unavailable503Too many requests are being authenticated right now. Retry shortly.

Endpoints

Every endpoint is a GET. Each block is rendered from the OpenAPI document; the curl samples run as written once BILLODDS_API_KEY is set in your shell.

GET/meta

Describe the API and this key

The vocabularies, the universe as your key sees it, and the key’s own entitlements. Every key may call it, whatever its plan. Call it first.

Plan scope: meta

No parameters.

Request · getMeta
curl -sS "https://billodds.com/api/v1/meta" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · getMeta (trimmed)
{
  "data": {
    "api_version": "v1",
    "model_version": "v2.3.1",
    "universe": {
      "bills_tracked": 214,
      "states": [
        {
          "state": "NY",
          "bills": 37
        }
      ],
      "sectors": [
        "sports_betting"
      ]
    },
    "enums": {
      "status": [
        "introduced",
        "in_committee",
        "enacted"
      ],
      "chamber": [
        "house",
        "senate"
      ],
      "event_type": [
        "hearing",
        "vote"
      ],
      "sector": [
        "sports_betting"
      ]
    },
    "key": {
      "prefix": "bo_live_AbCd",
      "scopes": {
        "states": [
          "NY",
          "NJ"
        ],
        "sectors": "*",
        "endpoints": "*",
        "history_days": 90,
        "rate_per_min": 60,
        "expires": null
      },
      "expires": null
    }
  },
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1"
  }
}

GET/bills

List bills with their latest probability

Every tracked bill your key can see, filtered, sorted and paginated.

Plan scope: bills

Parameters
ParameterDescription
statequeryComma-separated two-letter state codes. Narrowed to the states your key covers.
sectorqueryComma-separated sectors. Naming one outside your plan is a 403 `sector_not_in_plan`.
statusqueryComma-separated bill statuses (see `/meta` → `enums.status`).
chamberqueryThe chamber the bill originated in.One of: house, senate, joint, unknown
session_idqueryOnly bills in this session (`/sessions`).
p_minqueryLowest probability of passage, 0–1.
p_maxqueryHighest probability of passage, 0–1. May not be below `p_min`.
updated_sincequeryRFC 3339 instant. Only bills whose probability was published at or after it.
sortquerySort key; a leading `-` sorts descending.One of: p_pass, -p_pass, change_1d, -change_1d, change_7d, -change_7d, last_action_date, -last_action_date, bill_number, -bill_number, updated_at, -updated_atDefault: -updated_at
pagequeryPage number, from 1.Default: 1
per_pagequeryResults per page, 1–100.Default: 25
Request · listBills
curl -sS "https://billodds.com/api/v1/bills?state=NY&sector=sports_betting&per_page=1" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listBills (trimmed)
{
  "data": [
    {
      "id": 48213,
      "state": "NY",
      "bill_number": "S10153",
      "session": {
        "id": 412,
        "name": "2025-2026 General Assembly",
        "year_start": 2025,
        "year_end": 2026
      },
      "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
      "chamber": "senate",
      "status": "in_committee",
      "status_date": "2026-03-02",
      "last_action": "Referred to Racing, Gaming and Wagering",
      "last_action_date": "2026-03-02",
      "sectors": [
        "sports_betting"
      ],
      "sector_sides": [
        {
          "sector": "sports_betting",
          "side": "neutral_regulatory"
        }
      ],
      "p_pass": 0.18,
      "p_pass_as_of": "2026-10-14T12:41:07Z",
      "updated_at": "2026-10-14T12:41:09Z",
      "change_1d": -1.2,
      "change_7d": 3.4,
      "url": "https://billodds.com/ny/s10153"
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "pagination": {
      "page": 1,
      "per_page": 1,
      "total": 37,
      "total_pages": 37
    }
  }
}

GET/bills/{state}/{bill}

One bill in full

The list item plus the description, the model’s top factors, the AI summary with its disclosure, who is affected, the organizations it affects (`affected_organizations`: companies and brands from our registry, each with a `tier` and a `basis` — `named_in_text` only where the name or a known alias appears in the bill text, else `inferred`; `null` for bills outside the hot set that is mapped nightly), sponsors and the event history from your plan’s history floor.

Plan scope: bill

Parameters
ParameterDescription
statepath · requiredTwo-letter state code, either case.
billpath · requiredThe bill number as the bill page spells it, e.g. `s10153` or `AB 2446`.
session_idqueryA `sessions.id` from `/sessions`. Defaults to the bill’s newest session.
Request · getBill
curl -sS "https://billodds.com/api/v1/bills/ny/s10153" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · getBill (trimmed)
{
  "data": {
    "id": 48213,
    "state": "NY",
    "bill_number": "S10153",
    "session": {
      "id": 412,
      "name": "2025-2026 General Assembly",
      "year_start": 2025,
      "year_end": 2026
    },
    "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
    "chamber": "senate",
    "status": "in_committee",
    "status_date": "2026-03-02",
    "last_action": "Referred to Racing, Gaming and Wagering",
    "last_action_date": "2026-03-02",
    "sectors": [
      "sports_betting"
    ],
    "sector_sides": [
      {
        "sector": "sports_betting",
        "side": "neutral_regulatory"
      }
    ],
    "p_pass": 0.18,
    "p_pass_as_of": "2026-10-14T12:41:07Z",
    "updated_at": "2026-10-14T12:41:09Z",
    "change_1d": -1.2,
    "change_7d": 3.4,
    "url": "https://billodds.com/ny/s10153",
    "description": "Establishes a task force to examine, evaluate and make recommendations on proposition betting.",
    "committee_name": "Racing, Gaming and Wagering",
    "introduced_date": "2026-01-07",
    "has_fiscal_note": false,
    "fiscal_note_url": null,
    "source_url": null,
    "factors": [
      {
        "feature": "stage",
        "label": "Still in committee",
        "direction": "down",
        "contribution_logit": -0.82
      }
    ],
    "summary": {
      "text": "Would set up a task force to study proposition betting and recommend how to regulate it.",
      "generated_at": "2026-01-08T09:15:00Z",
      "model": "summary-model",
      "disclosure": "Written by a language model from the bill’s title and description, not from its full text. It is a description, not legal advice, and it is not a forecast — the probability above is the only prediction on this page. Check anything that matters against the bill itself."
    },
    "affected": null,
    "affected_organizations": {
      "items": [
        {
          "slug": "vgw",
          "name": "VGW",
          "kind": "operator",
          "parent_slug": null,
          "parent_name": null,
          "tier": "direct",
          "basis": "named_in_text",
          "rationale": "The bill names VGW among operators whose dual-currency games it would bar."
        },
        {
          "slug": "chumba-casino",
          "name": "Chumba Casino",
          "kind": "operator",
          "parent_slug": "vgw",
          "parent_name": "VGW",
          "tier": "direct",
          "basis": "inferred",
          "rationale": "A dual-currency sweepstakes casino of the kind the bill would bar."
        }
      ],
      "model": "mapping-model",
      "generated_at": "2026-01-08T09:20:00Z",
      "dropped_count": 0
    },
    "sponsors": [
      {
        "name": "A. Senator",
        "party": "democrat",
        "role": "primary",
        "district": "15",
        "chamber": "senate"
      }
    ],
    "history": [
      {
        "id": 90117,
        "type": "status_change",
        "occurred_at": "2026-03-02T00:00:00Z",
        "label": "Referred to Racing, Gaming and Wagering",
        "payload_public": {
          "from": "introduced",
          "to": "in_committee"
        }
      }
    ],
    "related": [
      {
        "id": 51877,
        "state": "CA",
        "bill_number": "AB2446",
        "title": "Gaming: sports wagering study",
        "url": "https://billodds.com/ca/ab2446",
        "sectors": [
          "sports_betting"
        ],
        "similarity": 0.47,
        "fate": "live",
        "p_pass": 0.31
      }
    ],
    "companion_candidate": null
  },
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "window": {
      "start": "2026-07-16T13:00:00.000Z",
      "truncated": false
    }
  }
}

GET/tape/{state}/{bill}

A bill’s probability history

Every published probability for one bill, oldest first, downsampled to `points`. Clamped to your plan’s history window; `meta.window.truncated` says when it was.

Plan scope: tape

Parameters
ParameterDescription
statepath · requiredTwo-letter state code, either case.
billpath · requiredThe bill number as the bill page spells it, e.g. `s10153` or `AB 2446`.
fromqueryRFC 3339 instant. The earliest point to return.
toqueryRFC 3339 instant. The latest point to return. Defaults to now.
pointsqueryMost points to return, 10–2000. Longer tapes are downsampled.Default: 600
session_idqueryA `sessions.id` from `/sessions`. Defaults to the bill’s newest session.
Request · getBillTape
curl -sS "https://billodds.com/api/v1/tape/ca/ab2446?points=100" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · getBillTape (trimmed)
{
  "data": {
    "bill": {
      "id": 51877,
      "state": "CA",
      "bill_number": "AB2446",
      "url": "https://billodds.com/ca/ab2446"
    },
    "points": [
      {
        "computed_at": "2026-10-14T12:41:07Z",
        "p_pass": 0.18,
        "model_version": "v2.3.1",
        "kind": "event",
        "trigger_event_id": 90117
      }
    ]
  },
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "window": {
      "start": "2026-07-16T13:00:00.000Z",
      "end": "2026-10-14T13:00:00.000Z",
      "truncated": true
    }
  }
}

GET/changes

Everything that changed since a cursor

Probability moves, status changes and events, in publication order. Poll it with the `next_since` it returns — see “Polling /changes”.

Plan scope: changes

Parameters
ParameterDescription
sincequery · requiredRequired. The `next_since` from your previous call, or an RFC 3339 instant to start from.
typesqueryComma-separated: `probability`, `status`, `event`. Defaults to all three.
limitqueryMost changes to return, 1–1000.Default: 500
statequeryComma-separated two-letter state codes. Narrowed to the states your key covers.
sectorqueryComma-separated sectors. Naming one outside your plan is a 403 `sector_not_in_plan`.
Request · listChanges
curl -sS "https://billodds.com/api/v1/changes?since=2026-10-14T00:00:00Z&limit=100" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listChanges (trimmed)
{
  "data": [
    {
      "type": "probability",
      "bill": {
        "id": 48213,
        "state": "NY",
        "bill_number": "S10153",
        "url": "https://billodds.com/ny/s10153"
      },
      "at": "2026-10-14T12:41:09Z",
      "old": 0.192,
      "new": 0.18,
      "delta": -0.012,
      "model_version": "v2.3.1",
      "snapshot_id": 771204
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "window": {
      "start": "2026-10-14T00:00:00.000Z",
      "truncated": false
    },
    "next_since": "eyJ0IjoiMjAyNi0xMC0xNFQxMjo0MTowOS4wMDBaIiwiaWQiOjc3MTIwNH0",
    "has_more": false
  }
}

GET/movers

The biggest probability moves

The leaderboard behind the site’s Movers page, scoped to your key.

Plan scope: movers

Parameters
ParameterDescription
windowqueryCompare against the probability `1d` or `7d` ago.One of: 1d, 7dDefault: 1d
directionquery`up`, `down`, or `both` (ranked by the size of the move).One of: up, down, bothDefault: both
limitqueryMost movers to return, 1–100.Default: 20
statequeryComma-separated two-letter state codes. Narrowed to the states your key covers.
sectorqueryComma-separated sectors. Naming one outside your plan is a 403 `sector_not_in_plan`.
Request · listMovers
curl -sS "https://billodds.com/api/v1/movers?window=7d&direction=up&limit=5" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listMovers (trimmed)
{
  "data": [
    {
      "bill": {
        "id": 48213,
        "state": "NY",
        "bill_number": "S10153",
        "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
        "url": "https://billodds.com/ny/s10153",
        "sectors": [
          "sports_betting"
        ]
      },
      "p_pass": 0.18,
      "p_prev": 0.146,
      "delta": 3.4,
      "rank": 1
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1"
  }
}

GET/sectors

Every sector in your plan, with its index

One summary per sector your key covers: bills tracked, the published index and its biggest mover.

Plan scope: sectors

No parameters.

Request · listSectors
curl -sS "https://billodds.com/api/v1/sectors" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listSectors (trimmed)
{
  "data": [
    {
      "sector": "sports_betting",
      "label": "Sports Betting",
      "bills_tracked": 41,
      "index_level": 0.27,
      "change_1d": 0.4,
      "change_7d": -1.1,
      "top_mover": {
        "bill": {
          "id": 48213,
          "state": "NY",
          "bill_number": "S10153",
          "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
          "url": "https://billodds.com/ny/s10153",
          "sectors": [
            "sports_betting"
          ]
        },
        "delta": 3.4
      }
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1"
  }
}

GET/sectors/{sector}

One sector: its index series and its bills

The summary plus the index series (clamped to your history window) and the sector’s bills.

Plan scope: sectors

Parameters
ParameterDescription
sectorpath · requiredThe sector, as its enum value (`sports_betting`) or its site slug (`sports-betting`).One of: prediction_markets, sports_betting, igaming, sweepstakes, skill_games, prediction-markets, sports-betting, skill-games
Request · getSector
curl -sS "https://billodds.com/api/v1/sectors/sports_betting" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · getSector (trimmed)
{
  "data": {
    "sector": "sports_betting",
    "label": "Sports Betting",
    "bills_tracked": 41,
    "index_level": 0.27,
    "change_1d": 0.4,
    "change_7d": -1.1,
    "top_mover": {
      "bill": {
        "id": 48213,
        "state": "NY",
        "bill_number": "S10153",
        "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
        "url": "https://billodds.com/ny/s10153",
        "sectors": [
          "sports_betting"
        ]
      },
      "delta": 3.4
    },
    "index_series": [
      {
        "date": "2026-10-13",
        "level": 0.266
      }
    ],
    "bills": [
      {
        "bill": {
          "id": 48213,
          "state": "NY",
          "bill_number": "S10153",
          "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
          "url": "https://billodds.com/ny/s10153",
          "sectors": [
            "sports_betting"
          ]
        },
        "side": "restrictive",
        "p_pass": 0.18,
        "change_7d": 3.4
      }
    ]
  },
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "window": {
      "start": "2026-07-16T13:00:00.000Z",
      "truncated": true
    }
  }
}

GET/events

Legislative events in a date range

Hearings, votes, amendments, status changes and the rest, by the day they happen. Defaults to the last 7 days and the next 30.

Plan scope: events

Parameters
ParameterDescription
typequeryComma-separated event types (see `/meta` → `enums.event_type`).
fromqueryFirst day, `YYYY-MM-DD`.
toqueryLast day, `YYYY-MM-DD`, inclusive. At most 400 days after `from`.
statequeryComma-separated two-letter state codes. Narrowed to the states your key covers.
sectorqueryComma-separated sectors. Naming one outside your plan is a 403 `sector_not_in_plan`.
pagequeryPage number, from 1.Default: 1
per_pagequeryResults per page, 1–100.Default: 25
Request · listEvents
curl -sS "https://billodds.com/api/v1/events?type=hearing,vote&from=2026-10-14&to=2026-10-31" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listEvents (trimmed)
{
  "data": [
    {
      "id": 90342,
      "type": "hearing",
      "occurred_at": "2026-10-21T14:00:00Z",
      "label": "Public hearing: Racing, Gaming and Wagering",
      "payload_public": {
        "committee": "Racing, Gaming and Wagering"
      },
      "bill": {
        "id": 48213,
        "state": "NY",
        "bill_number": "S10153",
        "title": "Establishes the proposition betting task force to examine, evaluate and make recommendations concerning proposition betting",
        "url": "https://billodds.com/ny/s10153",
        "sectors": [
          "sports_betting"
        ]
      }
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1",
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total": 1,
      "total_pages": 1
    },
    "window": {
      "start": "2026-10-14T00:00:00.000Z",
      "end": "2026-11-01T00:00:00.000Z",
      "truncated": false
    }
  }
}

GET/sessions

Legislative sessions

The sessions your key’s states hold bills in, with their dates and bill counts.

Plan scope: sessions

Parameters
ParameterDescription
statequeryComma-separated two-letter state codes. Narrowed to the states your key covers.
activequery`true` for sessions sitting today, `false` for the rest.One of: true, false
Request · listSessions
curl -sS "https://billodds.com/api/v1/sessions?state=NY&active=true" \
  -H "Authorization: Bearer $BILLODDS_API_KEY"

Response · listSessions (trimmed)
{
  "data": [
    {
      "id": 412,
      "state": "NY",
      "name": "2025-2026 General Assembly",
      "session_type": "regular",
      "year_start": 2025,
      "year_end": 2026,
      "convene_date": "2025-01-08",
      "adjourn_date": null,
      "bills_tracked": 37
    }
  ],
  "meta": {
    "as_of": "2026-10-14T13:00:00Z",
    "generated_at": "2026-10-14T13:00:04.512Z",
    "api_version": "v1"
  }
}

Polling /changes

/changes is how you stay current without re-reading everything. Each page returns changes in the order they were published and a meta.next_since cursor. Pass that cursor back as since next time, and you see every change once — or, rarely, twice.

  1. Start with an RFC 3339 instant as since. After that, only ever send the next_since you were given, and store it durably before you act on the page.
  2. Loop while meta.has_more is true — there is more to read now. When it is false you are caught up: wait (a minute is plenty) and poll again.
  3. De-duplicate by id. A probability change is identified by snapshot_id, a status or event change by event_id. The feed prefers a repeat to a gap, so apply changes idempotently.
  4. Expect a short delay. The cursor never moves past 120 seconds ago, so a write still committing is never skipped. Data on /changes is always at least that old.
  5. Mind the history clamp. A since older than your plan’s history window is moved forward to its start, and meta.window.truncated is true: you have a gap. Re-read the bills you care about from /bills rather than assume nothing changed.

A since that is neither an instant nor a cursor this API issued is a 400 invalid_cursor. Cursors are opaque: do not build or edit them.

Polling loop (shell + jq)
# First run: an RFC 3339 instant to start from. After that, always the saved cursor.
since="$(cat cursor.txt 2>/dev/null || echo 2026-10-14T00:00:00Z)"

while true; do
  page="$(curl -sS -G "https://billodds.com/api/v1/changes" \
    --data-urlencode "since=$since" --data-urlencode "limit=1000" \
    -H "Authorization: Bearer $BILLODDS_API_KEY")"

  # Apply each change idempotently: the same one can arrive twice.
  #   key = type + (snapshot_id for probability, event_id otherwise)
  echo "$page" | jq -c '.data[]' | ./apply-change

  since="$(echo "$page" | jq -r '.meta.next_since')"
  echo "$since" > cursor.txt

  # More waiting? Ask again now. Caught up? Wait before the next poll.
  [ "$(echo "$page" | jq -r '.meta.has_more')" = true ] || sleep 60
done

Attribution & terms

Using the API means accepting these terms.

  1. Attribute what you display. Wherever you show a BillOdds probability, show “Odds by BillOdds” beside it, linked to that bill’s page — the url field on every bill the API returns.
  2. Present the numbers as what they are. Probabilities are model estimates of the chance a bill passes. They are not predictions of fact, and not investment, legal or betting advice; do not present them as any of those. AI-generated summaries must carry the disclosure text returned with them wherever they are shown.
  3. Do not resell the feed. Build products and analysis on the data, but do not resell or redistribute the raw feed as a competing data product.
  4. Keep it fresh. Cache responses for up to 24 hours, then fetch them again.
  5. Keep your key to yourself. BillOdds may revoke a key for abuse — including sharing it, working around its rate limit or plan, or breaking these terms.
Attribution
<a href="{url}">Odds by BillOdds</a>