Documentation
PulseScore API Docs
Everything you need to integrate real-time Bet365 odds into your application. REST API, WebSocket, and code examples for every major language.
Quick Start
Get live odds data in 3 steps:
- Create an account — Sign up at pulsescore.net (free BASIC plan: 100 requests/month)
- Generate an API key — Go to Dashboard → Generate API Key
- Make your first call — Use the key in the
X-Secretheader
curl -X GET "https://api.pulsescore.net/api/v2/bet365/live-events?sport=soccer" \
-H "X-Secret: YOUR_API_KEY"Authentication
All API requests require an API key passed in the request header:
| Header | Value |
|---|---|
| X-Secret | Your API key from the dashboard |
API keys can be generated and revoked from your dashboard. Keep your keys secret — do not expose them in client-side code.
REST API
The REST API returns JSON responses. All endpoints use the base URL:
https://api.pulsescore.net/api/v2/bet365Standard HTTP status codes indicate success or failure. Responses are returned as JSON arrays or objects.
Endpoints
Live Events
Fetch all currently live events with real-time odds and market groups.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| sport | string | No | Filter by sport: soccer (default), tennis, basketball, ice-hockey, volleyball, handball, table-tennis, e-sports, american-football, baseball, rugby-league, rugby-union |
Response
[
{
"fi": "98734521",
"sport": "Soccer",
"league": "Premier League",
"home": "Liverpool",
"away": "Man City",
"live": 1,
"tab": "Popular",
"mg": [
{
"name": "Fulltime Result",
"ma": [
{ "name": "Liverpool", "pa": [{ "decimal": "2.10" }] },
{ "name": "Draw", "pa": [{ "decimal": "3.40" }] },
{ "name": "Man City", "pa": [{ "decimal": "3.25" }] }
]
},
{
"name": "Over/Under 2.5 Goals",
"ma": [
{ "name": "Over 2.5", "pa": [{ "decimal": "1.75" }] },
{ "name": "Under 2.5", "pa": [{ "decimal": "2.05" }] }
]
}
]
}
]Get a list of all sports that currently have live events.
Response
[
{ "sport": "Soccer", "count": 42 },
{ "sport": "Tennis", "count": 18 },
{ "sport": "Basketball", "count": 8 }
]Fetch a single live event by its ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Event ID from /live-events response |
Response
{
"fi": "98734521",
"sport": "Soccer",
"league": "Premier League",
"home": "Liverpool",
"away": "Man City",
"live": 1,
"mg": [ ... ]
}Pre-Match (by Sport)
Pre-match data is organized by sport. Replace {sport} with: soccer (root), tennis, basketball, ice-hockey, american-football, horse-racing, volleyball, handball, table-tennis, e-sports, baseball, greyhounds. Soccer uses the root path (no sport prefix).
Get all available leagues for a sport. For soccer, use /leagues (no prefix).
Response
[
{
"league": "Premier League",
"sport": "Soccer",
"live": 0,
"events": [
{ "home": "Arsenal", "away": "Chelsea", "fi": "45921003" },
{ "home": "Liverpool", "away": "Tottenham", "fi": "45921004" }
]
}
]Get events for a specific league. For soccer, use /events (no prefix).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| league | string | Yes | League name from /leagues response |
| tab | string | No | Market tab filter (e.g., Popular) |
Response
[
{
"fi": "45921003",
"sport": "Soccer",
"league": "Premier League",
"home": "Arsenal",
"away": "Chelsea",
"live": 0,
"tab": "Popular",
"mg": [
{
"name": "Fulltime Result",
"ma": [
{ "name": "Arsenal", "pa": [{ "decimal": "2.30" }] },
{ "name": "Draw", "pa": [{ "decimal": "3.20" }] },
{ "name": "Chelsea", "pa": [{ "decimal": "3.10" }] }
]
}
]
}
]Fetch a single pre-match event by fixture ID. For soccer, use /events/:fi.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| fi | string | Yes | Fixture ID from /leagues or /events response |
Response
{
"fi": "45921003",
"sport": "Soccer",
"league": "Premier League",
"home": "Arsenal",
"away": "Chelsea",
"live": 0,
"mg": [ ... ]
}WebSocket
The WebSocket feed provides real-time streaming updates. Available on PRO and MAX plans.
Connection URL
wss://api.pulsescore.net/api/v2/bet365/ws/live?key=YOUR_API_KEY&sport=soccerQuery Parameters
| Param | Required | Description |
|---|---|---|
| key | Yes | Your API key |
| sport | Yes | Sport to stream (soccer, tennis, etc.) |
Message Format
The server sends broadcast messages containing all live events for the subscribed sport:
{
"type": "data",
"timestamp": 1709474521000,
"events": [
{
"fi": "98734521",
"sport": "Soccer",
"league": "Premier League",
"home": "Liverpool",
"away": "Man City",
"live": 1,
"mg": [
{
"name": "Fulltime Result",
"ma": [
{ "name": "Liverpool", "pa": [{ "decimal": "2.10" }] },
{ "name": "Draw", "pa": [{ "decimal": "3.40" }] },
{ "name": "Man City", "pa": [{ "decimal": "3.25" }] }
]
}
]
}
]
}Connection Limits
| Plan | Max Connections |
|---|---|
| BASIC (Free) | 0 (REST only) |
| PRO | 1 concurrent |
| MAX | 3 concurrent |
Code Examples
cURL
# Fetch live soccer events
curl -X GET "https://api.pulsescore.net/api/v2/bet365/live-events?sport=soccer" \
-H "X-Secret: YOUR_API_KEY"
# Fetch soccer leagues (pre-match)
curl -X GET "https://api.pulsescore.net/api/v2/bet365/leagues" \
-H "X-Secret: YOUR_API_KEY"
# Fetch events for a league
curl -X GET "https://api.pulsescore.net/api/v2/bet365/events?league=Premier%20League" \
-H "X-Secret: YOUR_API_KEY"
# Fetch tennis leagues
curl -X GET "https://api.pulsescore.net/api/v2/bet365/tennis/leagues" \
-H "X-Secret: YOUR_API_KEY"
# Fetch a single event by fixture ID
curl -X GET "https://api.pulsescore.net/api/v2/bet365/events/98734521" \
-H "X-Secret: YOUR_API_KEY"Python
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.pulsescore.net/api/v2/bet365"
# Fetch live events
response = requests.get(
f"{BASE_URL}/live-events",
headers={"X-Secret": API_KEY},
params={"sport": "soccer"}
)
events = response.json()
for event in events:
home = event["home"]
away = event["away"]
for mg in event["mg"]:
print(f"{home} vs {away} — {mg['name']}")
for ma in mg["ma"]:
odds = ma["pa"][0]["decimal"]
print(f" {ma['name']}: {odds}")Node.js
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://api.pulsescore.net/api/v2/bet365";
// Fetch live events
const response = await fetch(`${BASE_URL}/live-events?sport=soccer`, {
headers: { "X-Secret": API_KEY },
});
const events = await response.json();
for (const event of events) {
console.log(`${event.home} vs ${event.away}`);
for (const mg of event.mg) {
console.log(` ${mg.name}:`);
for (const ma of mg.ma) {
console.log(` ${ma.name}: ${ma.pa[0].decimal}`);
}
}
}WebSocket (Node.js)
const WebSocket = require("ws");
const API_KEY = "YOUR_API_KEY";
const ws = new WebSocket(
`wss://api.pulsescore.net/api/v2/bet365/ws/live?key=${API_KEY}&sport=soccer`
);
ws.on("open", () => {
console.log("Connected to PulseScore WebSocket");
});
ws.on("message", (data) => {
const msg = JSON.parse(data);
if (msg.type === "data") {
console.log(`Received ${msg.events.length} live events`);
for (const event of msg.events) {
console.log(` ${event.home} vs ${event.away}`);
}
}
});
ws.on("close", (code, reason) => {
console.log(`Disconnected: ${code} ${reason}`);
});WebSocket (Python)
import asyncio
import json
import websockets
API_KEY = "YOUR_API_KEY"
URL = f"wss://api.pulsescore.net/api/v2/bet365/ws/live?key={API_KEY}&sport=soccer"
async def stream():
async with websockets.connect(URL) as ws:
print("Connected")
async for message in ws:
data = json.loads(message)
if data.get("type") == "data":
for event in data["events"]:
print(f"{event['home']} vs {event['away']}")
asyncio.run(stream())Error Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Invalid or missing API key |
| 403 | Access denied (plan restriction) |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
WebSocket Close Codes
| Code | Meaning | Retry? |
|---|---|---|
| 4001 | Authentication failed | No |
| 4003 | Plan limit reached | No |
| 4004 | Invalid sport | No |
| 4005 | Bookmaker access denied | No |
| 4010 | API key expired | No |
| 4011 | Plan downgrade — reconnect required | Yes |
| 4012 | Session replaced by new connection | Yes |
| 4029 | Connection limit reached | No |
Rate Limits
| Plan | Requests | Rate | WebSocket | Price |
|---|---|---|---|---|
| BASIC | 100/month | 3 req/sec | None | Free |
| PRO | Unlimited | 3 req/sec | 1 connection | €79/mo |
| MAX | Unlimited | 3 req/sec | 3 connections | €149/mo |
Rate-limited requests return HTTP 429. Implement exponential backoff for retries. WebSocket connections automatically receive updates — no polling needed.