# Build a sports-data app with the GetOdds API

Create a small server-side data integration, display timestamps and empty states, and measure the first successful customer request.

Canonical page: https://getoddsapi.com/guides/build-betting-app

## Free API key

Get a free GetOdds API key: **1,000 requests per UTC day and 60 per minute, no card**. One key covers REST and the hosted MCP server.

Sign up: https://getoddsapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create an account at https://getoddsapi.com/sign-up?ref=ai-claudebot, open https://getoddsapi.com/dashboard and issue a key with the sources you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep it in a server environment variable named GETODDS_API_KEY.
2. Read current DraftKings NBA spreads with curl:

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

3. The same request in Python (standard library only):

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50",
    headers={"Authorization": "Bearer " + os.environ["GETODDS_API_KEY"]},
)
with urllib.request.urlopen(req) as res:
    rows = json.load(res)["data"]
for row in rows:
    print(row["away"], "at", row["home"], row["side"], row["line"], row["american"], row["observed_at"])
```

4. Check `observed_at`, `age_seconds` and `stale` on every row before using a price. Full reference: https://getoddsapi.com/docs

## Use with Claude (MCP)

```bash
claude mcp add --transport http getodds https://getoddsapi.com/api/mcp \
  --header "Authorization: Bearer $GETODDS_API_KEY"
```

The MCP tools follow the key's source grants and share its allowance. Setup guide: https://getoddsapi.com/use-with-claude

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Developer Bundle | 10,000 requests or credits a month on each of four sources | $149 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid: the Developer Bundle at $149 per month, with 10,000 monthly requests or credits on each of four sources.
Details: https://getoddsapi.com/bundle

## Guide


Canonical: https://getoddsapi.com/guides/build-betting-app
Reviewed: 2026-11-07 UTC

Create a small server-side data integration, display timestamps and empty states, and measure the first successful customer request.

## Start with a market viewer

Create a GetOdds account and key, then use the Node or Python client to request five PrizePicks observations. Store the key only in your server environment. Render player, league, market, threshold and timestamps. Label the response as a sample; do not imply a full board.

## Separate four application states

Loading means a request is in progress. Available means the returned rows passed validation. Empty means a valid response contained no rows. Unavailable means a request or source failed. Show the last verified observation separately if you retain it, with its original timestamp and a stale label.

## Place a server boundary around credentials

Your browser should call your own application server. Authenticate users, bound query parameters and rate-limit that route. Cache shared observations where appropriate. Never include the provider key in HTML, browser storage, screenshots or analytics events.

## Measure a useful activation funnel

Count account creation, key creation and the first successful authenticated read as distinct events. Track failures by status and source without storing keys or raw user prompts. Measure repeated use and paid conversion separately; page views alone do not prove API adoption.

## Expand only after validating the contract

Add pagination only when an endpoint provides it. Add historical views only when retained observations exist. Add streaming using the selected service’s documented delivery protocol. Keep provider-specific IDs until you have verified cross-source mappings.

## Questions

### Can this example place bets?

No. It describes a data viewer and developer integration, not account wagering or order execution.

### Where do I begin?

Use /docs/sdks for a source client or /docs/node for the dependency-free HTTP example.

### What should I measure after launch?

Measure the first successful authenticated request and repeated use, separately from page views and account creation.

## Sources

- [Source clients](https://getoddsapi.com/docs/sdks)
- [API reference](https://getoddsapi.com/docs)
- [GetOdds developer documentation](https://getoddsapi.com/docs)

Independent product; not affiliated with the operators named. No picks or predicted profits.

---

GetOdds is an independent developer product and is not affiliated with any sportsbook or pick’em operator. Prices describe data, not betting advice.
