Docs › First call
Your first API call
One request, three ways. It returns the latest NFL game from https://www.realtimesportsapi.com/api/v1/sports/football/leagues/nfl/events?limit=1. Replace YOUR_API_KEY with the key from your dashboard.
1. Get a free key
Sign up free (no card). Your key is on the dashboard right away, and the dashboard shows these same snippets with your key already filled in.
2. Send the request
curl
curl "https://www.realtimesportsapi.com/api/v1/sports/football/leagues/nfl/events?limit=1" \
-H "Authorization: Bearer YOUR_API_KEY"Python
import requests
r = requests.get(
"https://www.realtimesportsapi.com/api/v1/sports/football/leagues/nfl/events?limit=1",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(r.status_code, r.json())JavaScript (Node 18+ or your server)
const r = await fetch("https://www.realtimesportsapi.com/api/v1/sports/football/leagues/nfl/events?limit=1", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(r.status, await r.json());Call the API from your server, not from public browser code: anyone can read a key shipped to the browser.
3. Read the JSON
A real response (shortened):
{
"success": true,
"data": [
{
"id": "401873037",
"name": "Jacksonville Jaguars at Baltimore Ravens",
"shortName": "JAX @ BAL",
"date": "2026-11-06T01:15Z",
"status": {
"state": "post",
"completed": true,
"period": 4,
"clock": "0:00",
"detail": "Final",
"halftime": false,
"firstHalfEnded": true
},
"homeTeam": {
"id": "33",
"name": "Baltimore Ravens",
"abbreviation": "BAL",
"score": 10
},
"awayTeam": {
"id": "30",
"name": "Jacksonville Jaguars",
"abbreviation": "JAX",
"score": 33
}
}
]
}If it didn’t work
401 MISSING_TOKEN, "Authorization required"
No key reached us. Send Authorization: Bearer YOUR_API_KEY (or X-API-Key: YOUR_API_KEY). If a proxy sits in between, make sure it forwards the header.
401 MISSING_TOKEN, "Invalid Authorization header format"
The word Bearer and a space are missing before the key.
401 USER_NOT_FOUND, "API key not recognized"
The key is wrong or cut off. Keys are 64 characters (letters a–f and digits); copy the whole key from your dashboard, with no quotes or line breaks.
429 rate_limit_exceeded
You hit your monthly allowance or the per-second rate. The response says which, and how to continue.
200 with an empty data list
The league is between seasons. Try one that is in season, or ask for a specific date.
Next
- The 10 most-used endpoints
- Try any endpoint in the playground
- Step-by-step guides (Python, Node, Discord bots, Home Assistant and more)
- Connect Claude, Cursor or ChatGPT (MCP)