SCENECONTEXT — PARTNER INTEGRATION
Enrichment API Handbook
Most CTV and OTT bid requests carry weak content signals — a bundle id, sometimes a title, rarely both correct — so you can't target, price or brand-safety-screen with confidence.
This API closes that gap without changing your request. Send the bid request as-is; get back a verified title match or live-channel read — contextual segments, IAB subcategories, normalised genres and a persistent content id — in the same response, inside your bid timeout.
API reference
POST /v1/enrich
Auth: Authorization: Bearer sc_dsp_… or ?api_key=sc_dsp_…. Body: the bid request as received from the exchange, unmodified. Everything outside content/app/site/device is ignored.
Your key's resolve_mode decides how a request for unseen content behaves: sync (default) resolves inline; cache_only never waits, answering 204 with Retry-After: 1 on a miss while it resolves in the background; fast never waits either but returns classifier-tier segments immediately. Whichever mode you're on, read Cache-Control on every response rather than branching on the status code — it always says how long the answer is good for.
Fields we read
| Field | What it does |
|---|---|
content.id | Platform, publisher or SceneContext SC… id. Exact match, highest priority. |
content.channel.id | Best signal for live TV. Exact key into the schedule. |
content.channel.name | Channel by name — matched strictly, ids resolve better. |
content.livestream | 1 routes to the schedule; absent/0 routes to title resolution. |
content.title, .series | Resolved against the title catalogue. |
content.genre, .cat, .cattax | Your declared genre and IAB categories. |
app.bundle, .id, .name | App identity and platform detection. |
device.geo.country | Scopes channel identity to the viewer's market — a channel name shared across countries needs it. |
Where content sits matters. Most keys read it forgivingly — top-level content or nested under app/site, either works. A key set to strict OpenRTB parsing only reads content nested under app.content or site.content, exactly as the spec defines it — a top-level content object is silently ignored, not rejected. If a request you're sure should resolve keeps coming back empty, check where content lives in your payload before anything else.
On-demand title
Request
curl -s -X POST https://rtd.scenecontext.io/v1/enrich \
-H "Authorization: Bearer $SC_KEY" -H "Content-Type: application/json" \
-d '{"app":{"bundle":"com.example.ctvapp"},
"content":{"title":"Mord mit Aussicht","series":"Mord mit Aussicht","genre":"krimi"}}'
Response — 200, resolved
Cache-Control: max-age=86400
{
"scid": "SC4mNpQr7xKj2wBv-0",
"segments": ["SC_TOPIC_ENTERTAINMENT_CRIME", "SC_GENRE_CRI_001",
"SC_CTX_SAFE_PREMIUM"],
"iab": ["KHPC5A", "647"],
"genres": ["Crime", "Drama"],
"signal_quality": { "tier": "T2", "score": 0.88 }
}
Live channel — schedule instead of catalogue; adds mood/audience/keywords/epg for what's on air now
Request
curl -s -X POST https://rtd.scenecontext.io/v1/enrich \
-H "Authorization: Bearer $SC_KEY" -H "Content-Type: application/json" \
-d '{"content":{"livestream":1,"channel":{"id":"SPORT1.de"}},"device":{"geo":{"country":"DEU"}}}'
Response — 200, live, max-age=86400
{
"segments": ["SC_CHANNEL_DE_SPORT1", "SC_TOPIC_SPORTS_FOOTBALL"],
"genres": ["Sport"], "iab": ["483"], "signal_quality": { "tier": "cached", "score": 0.91 },
"mood": "energetic", "audience": "sports_fan", "contextual_score": 0.78,
"keywords": "bundesliga,spieltag,analyse",
"epg": { "status": "covered", "slot_end": 1790199000 }
}
No match — read Cache-Control, not the status code, to decide whether to retry
Request → Response, 204, max-age=86400
curl -s -i -X POST https://rtd.scenecontext.io/v1/enrich \
-H "Authorization: Bearer $SC_KEY" -H "Content-Type: application/json" \
-d '{"app":{"bundle":"com.example.ctvapp"}}'
HTTP/1.1 204 No Content
Cache-Control: max-age=86400
Full content object — response_format: "openrtb_content" on your key. The response is a content object: drop it into your outgoing bid request in place and forward the request as it is.
Request — same call, existing content preserved
curl -s -X POST https://rtd.scenecontext.io/v1/enrich \
-H "Authorization: Bearer $SC_KEY" -H "Content-Type: application/json" \
-d '{"app":{"bundle":"com.example.ctvapp"},
"content":{"title":"Mord mit Aussicht","series":"Mord mit Aussicht","genre":"krimi",
"data":[{"id":"otherprovider.com","name":"OtherProvider","segment":[{"id":"OP_123"}]}]}}'
Response — 200, the content object
{
"title": "Mord mit Aussicht", "series": "Mord mit Aussicht", "genre": "krimi",
"data": [
{ "id": "otherprovider.com", "name": "OtherProvider", "segment": [{ "id": "OP_123" }] },
{ "id": "scenecontext.io", "name": "SceneContext", "segment": [
{ "id": "SC_TOPIC_ENTERTAINMENT_CRIME", "ext": { "score": 0.88 } },
{ "id": "SC_GENRE_CRI_001" }
]}
],
"ext": { "scenecontext": {
"scid": "SC4mNpQr7xKj2wBv-0", "iab": ["KHPC5A", "647"], "genres": ["Crime", "Drama"],
"signal_quality": { "tier": "T2", "score": 0.88 }
}}
}
An existing data entry from another provider is kept; ours is upserted by source id, so a repeat call replaces rather than duplicates it. response_format: "openrtb_content_data" returns just the {data, ext} pair instead, for merging yourself.
Response fields
| Field | Meaning |
|---|---|
scid | Persistent content id, stable across publishers — your dedupe key. |
segments | Contextual targeting segments, best match first. |
iab, genres | Programme categories. restoring — empty on the live fleet today, ask for a date. |
signal_quality | tier — which resolution stage answered (T1–T4, or cached); score — confidence in the top segment, 0–1. |
mood, audience, contextual_score, keywords, epg | Live-only, when the channel has an active slot. |
| title | Resolved internally but not part of the response — ask if your integration needs it. |
Status codes
| Code | Meaning |
|---|---|
| 200 | Enriched, or {} for no match on profiles configured that way. Never an error. |
| 204 | No body. Read Cache-Control — see the no-match example above. |
| 400 / 401 | Bad payload, or a missing/invalid key. |
| 429 | Over your rate limit. Back off; ask us to raise it. |
| 500 | Our side. Bid unenriched; tell us if it persists. |
Client integration
Hard 20 ms timeout, treat anything else as a miss, never let a slow or failed call delay a bid.
Go
type Enrichment struct {
SCID string `json:"scid"`
Segments []string `json:"segments"`
Genres []string `json:"genres"`
IAB []string `json:"iab"`
SignalQuality struct {
Tier string `json:"tier"`
Score float64 `json:"score"`
} `json:"signal_quality"`
}
func enrich(ctx context.Context, bidRequest []byte) *Enrichment {
ctx, cancel := context.WithTimeout(ctx, 20*time.Millisecond)
defer cancel()
req, _ := http.NewRequestWithContext(ctx, http.MethodPost,
"https://rtd.scenecontext.io/v1/enrich", bytes.NewReader(bidRequest))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SC_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := httpClient.Do(req) // shared client — reuse connections
if err != nil || resp.StatusCode != http.StatusOK {
return nil // timeout, 204, 429, … → proceed unenriched
}
defer resp.Body.Close()
var e Enrichment
if json.NewDecoder(resp.Body).Decode(&e) != nil {
return nil
}
return &e
}
Java (11+, java.net.http)
private static final HttpClient CLIENT = HttpClient.newBuilder()
.connectTimeout(Duration.ofMillis(200)).build(); // shared — reuses connections
Optional<JsonNode> enrich(String bidRequestJson) {
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://rtd.scenecontext.io/v1/enrich"))
.timeout(Duration.ofMillis(20))
.header("Authorization", "Bearer " + System.getenv("SC_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(bidRequestJson))
.build();
try {
HttpResponse<String> resp = CLIENT.send(req, HttpResponse.BodyHandlers.ofString());
if (resp.statusCode() != 200) return Optional.empty(); // 204, 429, … → proceed unenriched
return Optional.of(MAPPER.readTree(resp.body())); // Jackson ObjectMapper
} catch (Exception timeoutOrIo) {
return Optional.empty(); // slower than budget → ignored by design
}
}
A production integration adds a circuit breaker (stop calling us for 30s after N consecutive timeouts) so an incident on our side never adds latency to yours — full pattern in the DSP integration doc, ask for it.
GET /v1/reference/channels
The schedule's channels, q-filterable. Map your channel ids to these once instead of sending names and hoping.
Request → Response, 200
curl -s "https://rtd.scenecontext.io/v1/reference/channels?q=sport" \
-H "Authorization: Bearer $SC_KEY"
{
"version": "epg-48213", "count": 2,
"items": [
{ "id": "SPORT1.de", "name": "SPORT1", "entries": 812, "country": "DE", "coverage_hours": 168 },
{ "id": "Sport1.ch", "name": "Sport1", "entries": 640, "country": "CH", "coverage_hours": 168 }
]
}
GET /v1/reference/segments
The segment taxonomy — fetch it rather than hard-coding a snapshot. Prefixes: SC_CHANNEL_*, SC_TOPIC_*, SC_GENRE_*/SC_IAB_*, SC_CTX_* (mood, brand safety, time of day), SC_AUD_*/SC_PER_*.
Request → Response, 200 (truncated)
curl -s https://rtd.scenecontext.io/v1/reference/segments \
-H "Authorization: Bearer $SC_KEY"
{
"version": "seg-114", "count": 187,
"items": [
{ "id": "SC_TOPIC_ENTERTAINMENT_CRIME", "match_type": "semantic", "parent": "SC_TOPIC_ENTERTAINMENT" },
{ "id": "SC_CHANNEL_DE_SPORT1", "match_type": "exact", "parent": "" }
]
}
Both send an ETag — poll with If-None-Match for a cheap 304.
Operating it
Timeout: p99 is a hard 20 ms — anything slower is a 204, drop it, bid unenriched. An unenriched bid beats a late one.
Caching: on-demand content caches ~24 hours and scid is stable across publishers, so one resolution serves everyone. Live TV is the exception — the schedule moves, so cache those responses for minutes, not hours.
Freshness: schedule rebuilds every 2 hours, nodes pull it every 15 minutes; catalogue and segments promote on change.
Questions
Do you support plain HTTP? No — every environment is HTTPS-only. That's a one-time cost per connection, not per request: hold a persistent, keep-alive connection and it amortizes to a couple of milliseconds a call, well inside the timeout budget above.
What region do you serve from, and can we get closer? eu-central-1 today. If your bidders sit elsewhere, tell us where — a dedicated node in your region, or one inside your own VPC, is a deployment decision, not a rebuild.
Can we change what the response looks like? Yes. Request shape, response shape (including a ready-to-merge OpenRTB content object — see the example above), which fields you get, segment id mapping, caps and rate limit are all settings on your key. Ask rather than build around the default.
How do we know enrichment is actually happening? Every resolved response carries signal_quality, so you can see confidence per call without guessing. Test keys mark themselves — _env in the body, X-SC-Env: test in the headers — so you can confirm you're hitting the right environment before you're live. Aggregate reporting across your traffic is set up per partner during onboarding — ask.
What happens if SceneContext is slow or unavailable? Nothing waits on us. Treat anything past your timeout exactly like a 204 and bid unenriched — see Timeout above. An unenriched bid beats a late one, always.