Sports Betting API
Documentation Hub
Complete reference for Tech Magnetics REST and WebSocket APIs. Live scores, odds, player statistics, fixtures, and historical data across 30+ sports.
- Developer-first documentation
- REST & WebSocket APIs
- Fast integration
- Real-time sports data
- Enterprise-grade reliability
First API Call in Under
5 Minutes
Pick your language, copy the snippet, and you're pulling live sports data before your coffee gets cold. Full SDK docs follow below.
// npm install @techmagnetics/sdk import { TechMagnetics } from '@techmagnetics/sdk'; const tm = new TechMagnetics({ apiKey: 'YOUR_API_KEY' }); // Fetch all live football matches const scores = await tm.livescores.list({ sport: 'football', status: 'live' }); console.log(scores.data); // Array of live fixtures // Subscribe to real-time events via WebSocket tm.ws.subscribe('livescores:football', (event) => { console.log(`Goal! ${event.team} scored`); });
// Connect to live event push stream const ws = new WebSocket( 'wss://live.techmagnetics.io/v3/stream' ); ws.onopen = () => { ws.send(JSON.stringify({ type: 'auth', api_key: 'YOUR_API_KEY' })); ws.send(JSON.stringify({ type: 'subscribe', channels: ['livescores:cricket', 'odds:tennis'] })); }; ws.onmessage = ({ data }) => { const event = JSON.parse(data); // { type:'wicket', player:'Kohli'... } };
# pip install techmagnetics from techmagnetics import TechMagnetics tm = TechMagnetics(api_key="YOUR_API_KEY") # Fetch live cricket scores scores = tm.livescores.list( sport="cricket", status="live" ) for match in scores["data"]: print( match["home"], "vs", match["away"], "—", match["score"] )
use TechMagnetics\Client;
$tm = new Client([
'api_key' => 'YOUR_API_KEY'
]);
// Get prematch odds for football
$odds = $tm->prematch->odds([
'sport' => 'football',
'market' => '1x2',
'date_from'=> '2026-06-28'
]);
foreach ($odds['data'] as $fixture) {
echo $fixture['home'] .' vs ' .
$fixture['away'] . PHP_EOL;
}
# Get player stats for a specific fixture curl -X GET \ "https://api.techmagnetics.io/v3/stats \ /players?fixture_id=EPL-2026-38847 \ &include=shots,passes,tackles" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Accept: application/json" # Example Response: # { # "data": [{ # "player_id": "p-10834", # "name": "Bukayo Saka", # "shots": 4, "on_target": 2, # "key_passes": 3, "rating": 8.4 # }] # }
Everything a Developer
Needs. Nothing They Don't.
Clean REST endpoints, predictable response shapes, comprehensive error codes, and SDKs in six languages. Our documentation is built by engineers who have integrated sports data APIs and know exactly where the friction points are.
340+ Endpoints Across
Every Sports Data Domain
Organised by resource type. Every endpoint includes request parameters, response schema, code examples, and live sandbox testing.
Livescores & Live Events
Real-time match scores, event timelines, and in-play statistics
- GET /v3/livescores All live matches across selected sports & competitions
- GET /v3/livescores/{fixture_id} Detailed live data for a single fixture
- WS /v3/stream/livescores WebSocket — real-time push stream for goals, cards, wickets, substitutions
- GET /v3/livescores/{fixture_id}/timeline Full in-match event timeline with timestamps New
- GET /v3/livescores/{fixture_id}/lineups Starting XIs, formation, and live substitutions
Prematch Odds
Pre-game markets, odds movements, and fixture odds across all major bookmakers
- GET /v3/odds/prematch All available prematch markets for upcoming fixtures
- GET /v3/odds/prematch/{fixture_id} Full odds card for a specific fixture including all markets
- GET /v3/odds/prematch/{fixture_id}/movement Odds movement history from opening line to current
- GET /v3/odds/markets List of all supported market types per sport
In-Play (Live) Odds
Sub-second live odds updates via REST polling or WebSocket push
- GET /v3/odds/inplay All live odds across active matches right now
- WS /v3/stream/odds WebSocket push — odds updates as they happen (<250ms)
- GET /v3/odds/inplay/{fixture_id} All in-play markets for a specific active fixture
- GET /v3/odds/inplay/{fixture_id}/suspended Currently suspended markets with reason codes New
Player & Team Statistics
Deep performance data — player profiles, season stats, head-to-head, team form
- GET /v3/stats/players/{player_id} Full player profile with career and season statistics
- GET /v3/stats/teams/{team_id} Team statistics, form, and season performance breakdown
- GET /v3/stats/h2h/{team_a}/{team_b} Head-to-head history, results, and goals data
- GET /v3/stats/fixture/{fixture_id} Post-match player ratings, xG, and full match stats
Fixtures, Schedules & Standings
Upcoming and past fixtures, league tables, tournament brackets
- GET /v3/fixtures Upcoming fixtures with filters for sport, league, date range
- GET /v3/standings/{league_id} Current league standings with points, GD, form
- GET /v3/fixtures/{fixture_id} Fixture detail — venue, referee, weather, broadcast info
Historical Data & Results
Archive of past matches, results, and odds across 10+ years of data
- GET /v3/results Historical match results with filters by sport, league, date
- GET /v3/results/{fixture_id} Full result detail including scorers, bookings, and stats
- GET /v3/results/export Bulk CSV/JSON export for model training datasets New
Webhooks & Event Subscriptions
Configure push notifications to your server for any event type
- POST /v3/webhooks Register a new webhook endpoint with event filter
- GET /v3/webhooks List all active webhook subscriptions on your account
- GET /v3/webhooks/{id}/deliveries Delivery log with status codes and retry history
One API Key. Every Sport.
Uniform Data Structure.
Whether you're building for football or Formula 1, the same predictable JSON response structure applies — reducing integration effort across every sport you add.
Ice Hockey (NHL)
Period scores, power play, shots on goal, penalty minutesCycling & Endurance Sport
Stage times, GC standings, sprint points, KOM classificationsGolf (PGA / DP World Tour)
Hole-by-hole scoring, leaderboard, strokes gained, cut linesSwimming & Aquatics
Split times, world record margins, heat results, medal standings — real-time event by eventMMA & Combat Sports
Fight card data, round-by-round scoring, method of victory, fighter records & stats99.98% Uptime SLA.
Globally Distributed.
Our API infrastructure runs across multiple regions with automatic failover, CDN-cached static endpoints, and dedicated WebSocket nodes for live streaming. Your integration stays online even on World Cup final day.
Predictable Schemas.
Consistent JSON. Every Time.
Every endpoint returns the same meta envelope. Only the data field changes shape depending on the resource.
football, cricket, tennis
required
live, upcoming, finished
2026-06-28. Defaults to today.
lineups,events,odds
Six Languages. Zero
Boilerplate.
Our officially maintained SDKs handle authentication, retries, rate limiting, WebSocket reconnection, and response parsing so your team can focus on building features.
JavaScript / TypeScript
Works in Node.js, browser, React, Vue, and Next.js. Full TypeScript types included.
Python
Supports sync and async usage. Compatible with Django, Flask, FastAPI and data science workflows.
PHP
Composer-compatible. Integrates cleanly with Laravel, Symfony, and WordPress environments.
Java / Kotlin
Maven and Gradle compatible. Ideal for Android apps and enterprise backend systems.
Go
Lightweight, performant Go module for high-throughput data pipelines and microservices.
Ruby
RubyGem for Rails and Sinatra applications. Clean DSL for querying odds and scores.
From First Request
to Production. Together.
Our developer relations team answers questions, reviews integration code, and runs monthly office hours for teams building on the API. No forums, no ticket queues — real engineers helping you ship.
What's New in
the API
We ship API improvements every two weeks. All changes are backwards-compatible within a major version.
NewBulk Historical Export Endpoint
GET /v3/results/export now supports CSV and JSON bulk download with date-range filters. Max 100,000 rows per request. Ideal for model training datasets.
NewLive Event Timeline Endpoint
GET /v3/livescores/{id}/timeline returns a full chronological match event log with millisecond timestamps for all in-play incident types.
ImprovedWebSocket Reconnection Logic
All WebSocket stream channels now implement exponential backoff with jitter on disconnect, reducing duplicate message delivery during reconnect windows.
ImprovedOdds Response Latency
In-play odds REST polling latency reduced from avg 310ms to 98ms following infrastructure migration to regional edge nodes in APAC and EMEA.
FixCricket Over Count Off-By-One
Fixed an edge-case where over count incremented one delivery early on wide balls that ended an over, affecting the current_over field on livescores.
Everything You Need
to Ship Fast
Common Questions from
Developers Integrating Sports APIs.
Your API Key is
30 Seconds Away.
Register, grab a key, and hit your first live endpoint before your next meeting. Full sandbox access, 5,000 free calls/month, no credit card required.