Betfair+API.SH

Betfair API

Read Betfair Exchange markets, back and lay prices and matched money as JSON, without a Betfair account or app key.

The API.SH Betfair API returns public Betfair Exchange prices as structured JSON. List the competitions of a sport, page through its markets soonest or most traded first, then read one market in full: every runner's best three back and lay prices with the money available, last traded price, money matched, status and in-play flag. Racing markets add form, jockey, trainer and silks, and runners carry Betfair Starting Price when it is published. Prices are in GBP and slightly delayed, as on the public exchange pages.

  • 3 endpoints
  • from $1 / 1,000 calls
  • 1,000 free credits / month
  • failed calls free
Betfair Exchange competitions of a sport
GET https://api.api.sh/betfair/v1/competitions
{ "success": true }
1 credit · $1 per 1,000 calls

What you can build with the Betfair API

Odds and price history collection

Poll a sport's markets on a schedule and store back, lay and last traded prices to build your own price history for back-testing.

Odds comparison sites

Show exchange back and lay prices next to bookmaker odds for football, tennis, racing and more, by competition or event.

Market liquidity monitoring

Sort markets by money matched to see where the action is, and read the money available at each price before you act.

Horse and greyhound racing data

Pull racing markets with runner form, jockey and trainer, cloth number, silks and Starting Price near, far and actual.

Political and novelty markets

Track exchange prices on elections and other politics markets as implied probabilities for research or news coverage.

Betfair data you get

Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.

Betfair API endpoints and prices

Every Betfair endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing

Products, listings and places2
Betfair Exchange market prices
/betfair/v1/market
$1 · $2 PAYG
1 credit
Betfair Exchange markets with back and lay prices
/betfair/v1/markets
$1 · $2 PAYG
1 credit
More data1
Betfair Exchange competitions of a sport
/betfair/v1/competitions
$1 · $2 PAYG
1 credit

Call the Betfair API

Betfair Exchange competitions of a sport: GET https://api.api.sh/betfair/v1/competitions

curl "https://api.api.sh/betfair/v1/competitions?sport=soccer" \
  -H "x-api-key: $APISH_KEY"
  1. Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
  2. Create an API keyOne key works for all 482 platforms.
  3. Send the requestJSON back in one call. Add output=csv or output=ndjson for files.

Why API.SH for Betfair data

  • Public data only: no Betfair login, cookies or account needed
  • One key and one response shape for Betfair and 481 other platforms
  • Built and maintained by API.SH, not third-party publishers
  • Pay per call; errors on our side cost nothing
  • Live status for every endpoint

API.SH vs the official Betfair API

Betfair has an official Exchange API (plus a Stream API and historical data) documented on its Developers Portal. It needs a Betfair account and an application key, and live, undelayed access carries a one-off fee. API.SH needs no Betfair account or app key and returns the public exchange prices (slightly delayed) as JSON; it is read-only and cannot place bets.

Instead of writing your own Betfair odds scraper or comparing odds API vendors on RapidAPI and Apify, API.SH gives you one key, one JSON shape and a fixed price per call.

Betfair API questions

What Betfair data can I get?+

Competitions of a sport with their open market counts (/betfair/v1/competitions), exchange markets with back and lay prices, money matched, in-play flag and event details, filtered by competition, event, market type, country and dates (/betfair/v1/markets), and one or more markets in full with every runner's prices and Starting Price (/betfair/v1/market).

How much does the Betfair API cost?+

Every Betfair endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

Is there a free trial?+

Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /betfair/v1/competitions at 1 credit each.

Is there an official Betfair API?+

Yes. Betfair's Exchange API reads markets and places bets, but it requires a Betfair account and an application key, and live access has a one-off fee. API.SH is a read-only alternative for public exchange prices that needs neither.

Do I need a Betfair account or API key?+

No. API.SH reads the public Betfair Exchange pages only. No endpoint uses a login, an app key or anyone's account, and nothing places or manages bets.

Is there a free Betfair API?+

Betfair's own API always needs a Betfair account and an app key. With API.SH every account gets 1,000 free credits every month, enough to try every endpoint without a Betfair login.

Can I use the Betfair API from Python?+

Yes. Call the endpoints over plain HTTPS with requests, or use the API.SH Python SDK. Responses are JSON, so prices drop straight into pandas for analysis.

How do I get started?+

1. Sign up at api.sh. 2. Copy your API key. 3. Call /betfair/v1/markets with sport=soccer and sort=matched to get the busiest football markets with back and lay prices. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.

More sports APIs all sports APIs →

Start with 1,000 free credits
Every month, on every account. One key works for all 482 platforms.
Get a free API key