Odds API: a live market probability in one request, no key needed
On 23 November 2026, at 18:29 UTC, the WillThisHappen API put the chance that Apple is the largest company at the end of December 2026 at 84%, using Polymarket prices as the source. Pulling a figure like that into your own code takes one request and no key. This guide shows the request, then covers the parts most odds-API tutorials skip: what each field means, why the leading outcomes do not add to exactly 100%, and how to stay inside the rate limits.
This is a probability feed, not a bookmaker feed
If you searched for an odds API because you want sportsbook prices for a match, a point spread or a bet slip, this is the wrong product, and it is better to say so at the top. WillThisHappen does not publish sportsbook odds, spreads or wagering links. What it serves is the market-implied probability behind a question: the price of a contract that pays out on a stated outcome, read as a percentage.
That still answers a lot of odds-shaped questions. A probability converts into the odds format a reader expects, and the conversion is exact. Later in this guide we turn the 84% above into American odds, so you can see the arithmetic.
One request, no key
The public endpoints work without a key and allow 100 requests a day per IP address. To see the shape of a response, ask for the three most-traded questions:
curl "https://www.willthishappen.com/api/v1/questions?sort=volume&limit=3"
The list response has two top-level keys. meta carries the source, the as_of time, the total number of tracked questions, your rate-limit position and the attribution string the docs ask you to keep. questions is the array itself. When we ran that call on 23 November the total was 480 tracked questions.
A single question sits at /api/v1/questions/ followed by its slug, for example largest-company-end-of-december-2026. The fields a product usually needs are these:
| Field | What it means | How to use it |
|---|---|---|
| probability | Market-implied chance, from 0 to 1 | Multiply by 100 for display, or compare against a threshold |
| probability_pct | The same figure, rounded and formatted | Show it; do not compute with it |
| outcomes | A label and probability for each outcome | For multi-outcome questions, read every entry |
| week_change | Movement over seven days, in probability units | -0.0665 reads as a fall of about 6.7 percentage points |
| volume_usd and liquidity_usd | Traded volume and resting liquidity, in US dollars | Treat a figure on thin liquidity as a weak signal |
| ends_at | When the contract resolves | Check whether the question is still open before you show it |
| as_of | When this figure was taken | Store it beside every value you keep |
| source_url | The venue’s own page for the market | Link it for readers who want the source |
Why the leading outcomes do not add to 100%
The Apple question is multi-outcome. Its four largest entries in the response are Apple at 0.839, NVIDIA at 0.1635, Microsoft at 0.0045 and Alphabet at 0.0025. Added together they come to 1.0095, or 100.95%. The question has nine outcomes in total and the other five are small, but the four leaders alone already exceed certainty.
Two things cause this, and both matter. The first is margin. When each outcome is priced as its own share, the implied probabilities can add up to more than 100%. The excess is called the overround, and bookmakers build it in on purpose. The second is timing. Prices are quotes on a live order book, and the outcomes are not all quoted at the same instant. Neither makes the figures wrong, but a dashboard that shows Apple at 83.9% and NVIDIA at 16.35%, beside a note that the outcomes total 100%, contradicts its own data.
If you need the outcomes as a distribution, normalise them: divide each probability by the total of all the outcomes. Using the four leaders only, Apple becomes about 83.1%, NVIDIA about 16.2%, Microsoft about 0.4% and Alphabet about 0.2%. In production, normalise over every entry in the array rather than a subset. The overround definition is the standard one, set out in the Omni Calculator implied probability guide cited below.
Converting a probability into odds
Readers who arrive with an odds mindset often want the other format, and the conversion is simple. For a favourite, American odds equal minus the probability divided by one minus the probability, times 100. At 84%, that is 84 divided by 16, which is 5.25, times 100: American odds of -525. Read it as a stake of 525 to win 100 on a bet that pays only if the outcome happens.
For an underdog the odds are positive, and equal one hundred minus the probability, divided by the probability, times 100. At 33.3%, that is about +200. The formulas are standard, and the Omni Calculator page sets them out with worked examples. Our contribution is the number underneath: a timestamped probability you can convert, not a price you can bet at.
Rate limits and caching you have to design for
Public calls are limited to 100 requests a day per IP address. An analyst key, created in Settings, raises that to 50,000 a day. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers, so your code can read its position rather than guess. When the budget is spent the API returns 429 with a Retry-After header. MDN documents the 429 status and the header; a client should wait for the number of seconds it gives before retrying.
The limit counts per IP, not per user. A server, a serverless function or a shared office network can use up the public allowance for everything behind the same address. Route calls through one service that caches, or move to a key.
The API also caches responses at the edge for 15 minutes; the header is s-maxage=900, with a stale-while-revalidate window of a day. Polling faster than that mostly returns the same figure with the same as_of. Poll at the cadence your product needs, and check as_of before you show a number.
Calling it from a browser
Responses send Access-Control-Allow-Origin: *and allow GET and OPTIONS, so a page on any domain can read them. MDN’s guidance is that the wildcard suits a public API and should not be used for private data or with credentials. That fits the keyless endpoints, which serve public probabilities. It does not fit an analyst key: a bearer key sent from browser JavaScript is visible to every visitor. Keep the key on your server and proxy the call.
A pattern for a product page
This is the smallest version that behaves well in production. Run it in a server-side function, not in the browser.
- Request the single-question endpoint with a short timeout.
- Check
as_of. If the figure is more than an hour old, show the time it was taken rather than presenting it as current. - Show
probability_pctbeside the question title, and linksource_urlfor the source. - For a multi-outcome question, show the normalised leaders and say that the full set was used.
- Keep the attribution text wherever a figure appears, as the docs ask.
Which call to make
| Job | Call | Notes |
|---|---|---|
| Current probability for one question | GET /api/v1/questions/ then the slug | Flat object, with the outcomes included |
| Find a question by words | GET /api/v1/questions?q=recession | Full-text search across tracked questions |
| Most-traded questions in a topic | GET /api/v1/questions?topic=economy&sort=volume | Topic ids are listed on the API documentation page |
| What moved this week | GET /api/v1/questions?sort=movers | Ranked by change over the week |
| Sportsbook prices or spreads | Not served | Use a bookmaker feed for those |
Where to read more
The full reference is on the API documentation page. For how a market price becomes a probability in the first place, read how to read a market-implied probability. If an AI agent is going to call the API as a tool, see prediction markets for AI agents. For why the venue behind a price matters, compare Polymarket and Kalshi. Live questions are on the questions page, and the biggest moves are on the movers page.
Frequently asked questions
Is this a sportsbook odds API?
No. It serves market-implied probabilities for real-world questions. It does not publish bookmaker odds, point spreads or bet slips.
Do I need a key to start?
No. The public endpoints need none and allow 100 requests a day per IP. An analyst key raises the budget to 50,000 a day.
How fresh is the data?
Each response carries as_of, the time the figure was taken. Check it rather than assuming the number is live. Responses are cached at the edge for 15 minutes.
Why does my multi-outcome question not add to 100%?
Each outcome is priced separately, so the total can drift above 100% from margin or from quote timing. Normalise over all the outcomes before you treat them as a distribution.
Do I have to attribute the data?
The docs ask for attribution to WillThisHappen with its URL, and the list response includes that text. Read the terms before you redistribute the data at volume.
Sources
- MDN, Access-Control-Allow-Origin: when a wildcard is appropriate.
- MDN, 429 Too Many Requests: the status used for rate limiting.
- MDN, Retry-After: how a client should time its retry.
- Omni Calculator, implied probability: the odds-to-probability formulas and the overround.
- Polymarket, API rate limits: upstream limits, which are separate from ours.
The odds, in your inbox
A weekly read on where the markets say the world is heading. No spam, unsubscribe anytime.
