Monitoring Data Changes
This scenario keeps a local store consistent with the API without re-pulling everything: detect what changed, re-pull only that, prune what was removed, and reconcile identifiers. It is the backbone under every other scenario once your integration stores data.
This scenario is commonly used to:
- Keep cached schedules, results, and statistics in sync
- Detect postponements, reschedules, and late corrections
- Align Global Baseball IDs with other Sportradar ID spaces
Relevant Feeds
| Feed | Purpose |
|---|---|
| Sport Events Updated | IDs of games whose data changed in the last 24 hours |
| Sport Events Created | Games added in the last 24 hours |
| Sport Events Removed | Games taken out of the system |
| Competitor Mappings | Team URNs paired with their MLB API GUIDs |
| Player Mappings | Player URNs paired with their MLB API GUIDs |
| Competitor / Player Merge Mappings | Merged IDs with the retained ID to keep |
High-Level Workflow
Integration Steps
1. Poll Sport Events Updated
Sport Events Updated lists the IDs of games whose data changed in the last 24 hours, newest first, paged at up to 200:
GET https://api.sportradar.com/baseball/trial/v2/en/sport_events/updated.json
x-api-key: YOUR_API_KEY{
"generated_at": "2026-07-21T17:50:29+00:00",
"sport_events_updated": [
{
"id": "sr:sport_event:71686128",
"updated_at": "2026-07-21T17:47:41+00:00"
},
{
"id": "sr:sport_event:71755404",
"updated_at": "2026-07-21T17:47:03+00:00"
},
{
"id": "sr:sport_event:69049154",
"updated_at": "2026-07-21T16:34:47+00:00"
}
]
}Compare updated_at against your last sync time and re-pull the summary (or timeline) of only those games. Changes include score corrections, statistics settling after the final out, and schedule moves, so this feed also catches postponements and reschedules.
2. Pick up new games
Sport Events Created lists games added in the last 24 hours (also paged at up to 200), which matters for leagues that publish or adjust their calendars in-season:
{
"generated_at": "2026-07-21T17:50:33+00:00",
"sport_events_created": [
{
"id": "sr:sport_event:73016880",
"active_season": true,
"created_at": "2026-07-20T20:44:15+00:00"
},
{
"id": "sr:sport_event:73016888",
"active_season": true,
"created_at": "2026-07-20T20:46:28+00:00"
}
]
}3. Prune removed games
Sport Events Removed lists games taken out of the system, typically entry corrections:
{
"generated_at": "2026-07-21T17:50:09+00:00",
"sport_events_removed": [
{
"id": "sr:sport_event:71700772"
},
{
"id": "sr:sport_event:71700804"
},
{
"id": "sr:sport_event:71700806"
}
]
}Deleting local records is destructive: apply removals only after confirming the ID is in this feed.
4. Reconcile identifiers
Two mapping families keep IDs aligned:
- Competitor Mappings and Player Mappings pair each
sr:URN with itsexternal_id, the matching GUID in Sportradar's MLB API, so you can join Global Baseball data with an MLB API integration. Trimmed to three rows (paged at up to 1,000):
{
"generated_at": "2026-07-21T17:52:51+00:00",
"mappings": [
{
"external_id": "4c61669c-148d-44be-b71e-ddeab97278e1",
"id": "sr:competitor:981175"
},
{
"external_id": "f5614d2a-9974-4c07-816b-42f7a6941fab",
"id": "sr:competitor:981173"
},
{
"external_id": "035c8443-d4c5-46c3-98e3-e6d352ebe605",
"id": "sr:competitor:981171"
}
]
}- Competitor Merge Mappings and Player Merge Mappings list IDs that were merged after duplicates were found, with the retained ID to keep. Merged entries are retained for one week, so both lists are empty whenever no merge has occurred in the past week; poll them on a slow cadence and apply merges when entries appear:
{
"generated_at": "2026-07-21T17:56:33+00:00",
"mappings": []
}Common Use Cases
Typical builds on this workflow include:
- Keeping a results database consistent through late corrections
- Detecting postponements and reschedules without full re-pulls
- Powering backend ingestion pipelines with change-driven triggers
- Joining Global Baseball records to an MLB API integration
Best Practices
- Use the change feeds as triggers, not data sources; re-pull the affected feed for the full record
- Poll Sport Events Updated every few minutes on game days (measured cache TTL of 1 minute); hourly is typically enough for Created and Removed outside schedule-release periods
- Poll mappings and merge mappings daily
- The change windows are 24 hours, so any polling gap shorter than a day can be recovered without a full re-sync; after a longer outage, re-pull the affected seasons
Updated about 6 hours ago
