StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Custom JSON sports provider
The Custom JSON provider connects one HTTPS JSON API account to the app's provider-neutral sports models. It can map events, scores/status, standings, team and league metadata, broadcasters, artwork references, lineups, and statistics. Its mapping is declarative: the app selects fields from JSON and never runs scripts or follows provider-supplied URLs.
Setup
In Settings, add Custom JSON provider, enter the API base URL, then paste a definition like this into Configuration (JSON) or import a JSON file:
{
"name": "My League API",
"auth": {
"mode": "api_key_header",
"parameterName": "X-API-Key"
},
"events": {
"endpoint": "/events?from={fromDate}&to={toDate}&league={leagueId}",
"items": "data.events",
"id": "id",
"sport": "sport.name",
"leagueName": "league.name",
"leagueId": "league.id",
"title": "name",
"start": "start_time",
"startFormat": "ISO_OFFSET",
"homeName": "home.name",
"homeId": "home.id",
"awayName": "away.name",
"awayId": "away.id",
"competitorKind": "TEAM",
"status": "status",
"clock": "clock",
"period": "period"
},
"scores": {
"endpoint": "/scores?ids={eventIds}",
"items": "data.scores",
"eventId": "event_id",
"homeName": "home.name",
"homeScore": "home.score",
"awayName": "away.name",
"awayScore": "away.score",
"status": "status",
"clock": "clock",
"period": "period",
"updatedAt": "updated_at",
"updatedAtFormat": "ISO_OFFSET"
}
}
The event mapping is required. The score mapping is optional; its presence enables the Live scores capability. The name is shown in Settings so separately configured custom APIs are easy to tell apart. Use a shared API root as the base URL when endpoint templates include sport and league path placeholders.
After entering the definition and any required credentials, use Test to call the first configured event scope for a 24-hour UTC window and validate the event mapping. Then save the account. Optional data mappings are enabled only when their sections are present in the JSON.
Authentication
auth can be omitted for none, or set to one of these modes:
| Mode | Additional field | Credential fields |
|---|---|---|
none |
— | none |
api_key_header |
parameterName |
Secret is sent in the named header |
api_key_query |
parameterName |
Secret is sent as a query parameter |
bearer |
— | Secret is sent as a Bearer token |
basic |
— | Username and secret are sent with HTTP Basic authentication |
Credentials are stored separately from the definition in the encrypted provider store. Query-key mode necessarily places the secret in the request URL, so use it only when the API requires that method. OAuth and arbitrary custom headers are not supported.
Endpoints and selectors
Endpoint templates must start with /. They are appended to the base URL path, so base URL https://example.com/api and endpoint /events request https://example.com/api/events. The final request must remain HTTPS on the same host and port. Placeholder values are percent-encoded. Event endpoints accept {date}, {fromDate}, {toDate}, {fromDateFormatted}, {toDateFormatted}, {leagueId}, and {sport}. The formatted bounds use the configured dateFormat, are UTC, and account for the request's exclusive end boundary; use them for APIs that accept date ranges. A top-level scopes array can declare multiple {sport}/{leagueId} routes in the JSON; when present and the provider's league IDs setting is empty, the app queries each declared scope and combines results. Each scope can also have a leagueName fallback. Specific leagues should come before broad scopes because the first copy of a duplicate event ID is retained. A non-empty provider league IDs setting takes precedence over JSON scopes; for endpoints with both {sport} and {leagueId}, enter those settings as sport/league. {date} is the UTC date at the start of the requested window. Score endpoints must use exactly one of {eventId} or {eventIds}; {eventIds} sends a comma-separated, sorted ID list, with at most 50 requested IDs.
items selects the array of records, or one object record, from the response. It may use $ for the whole response. Other selectors are dot-separated object keys such as data.events or home.name; an optional $. prefix is accepted. Explicit array indexes and wildcards are supported, for example competitions[0].competitors[*]. General JSONPath expressions and scripts are not supported.
Every event needs an ID, start timestamp, and at least one competitor name. Competitors can be mapped from a nested list by setting events.competitors.items, name, and optionally id and role; homeValue and awayValue default to home and away. Existing homeName/awayName configurations remain supported. sportValue, leagueNameValue, and leagueIdValue let an endpoint provide fixed metadata. Event timestamps require startFormat; dateFormat optionally controls {date} and supports ISO_LOCAL_DATE (default) or YYYYMMDD. Score updatedAtFormat defaults to ISO_OFFSET when updatedAt is mapped. Timestamp formats are:
ISO_OFFSET: ISO-8601 timestamp containing its UTC offset, such as2026-10-17T19:30:00Z.UNIX_SECONDS: Unix epoch seconds.UNIX_MILLISECONDS: Unix epoch milliseconds.
Competitor kinds are TEAM, PERSON, and PLAYER. Common status values such as scheduled, in_progress, halftime, postponed, cancelled, and finished map to provider-neutral game states; unrecognized values are retained as status detail.
Optional sports data mappings
The schema also accepts statuses, standings, team, league, artwork, broadcasters, lineups, and statistics blocks. Grouped standings and statistics use nested collection selectors. Artwork references must be absolute HTTPS URLs. Inline events.broadcasters can map broadcaster data from the event response itself. These blocks activate their matching provider capabilities; omit them when the API does not offer that data.
Limits
Definitions are limited to 32 KiB, endpoint templates to 512 characters, selectors to 256 characters and 16 path segments, and mapped scalar values to 512 characters. HTTP responses are capped at 2 MiB by the shared provider client, event feeds at 2,000 rows, and score and detail batches at 1,000 rows. ID-based detail batches are limited to 50 event IDs.
The adapter does not follow pagination links, execute scripts, or support OAuth. See the provider guide for selectors and capability-specific mappings.