{"openapi":"3.1.0","x-ratings-attribution":{"license":"CC0-1.0","label":"Self-reported: counted from viewers using Broadcast Atlas's players","developers":"https://broadcastatlas.com/developers"},"info":{"title":"Broadcast Atlas open ratings","version":"1.0.0","description":"Self-reported: counted from viewers using Broadcast Atlas's players. No key. UTC dates are inclusive. Cached five minutes, with last-good fallback up to 24 hours.","license":{"name":"CC0-1.0","identifier":"CC0-1.0"}},"servers":[{"url":"https://broadcastatlas.com"}],"externalDocs":{"url":"https://broadcastatlas.com/developers"},"paths":{"/api/v1/ratings":{"get":{"operationId":"topChannels","summary":"Most watched eligible channels","description":"Same eligibility and minimum-plays floors as /ratings. Countries and categories use list_filters values. Device and watched cannot be combined. No authentication. CORS allows all origins.","parameters":[{"in":"query","required":false,"name":"period","description":"day maps to /ratings 24h (today and yesterday), week to 7d, month to 30d, all to all. Use period OR custom dates.","schema":{"type":"string","enum":["day","week","month","all"],"default":"week"}},{"in":"query","required":false,"name":"from","description":"Inclusive UTC day. Missing end, reversed dates and clamping to available history follow /ratings.","schema":{"type":"string","format":"date"}},{"in":"query","required":false,"name":"to","description":"Inclusive UTC day. Missing end, reversed dates and clamping to available history follow /ratings.","schema":{"type":"string","format":"date"}},{"in":"query","required":false,"name":"country","description":"Channel country; available values via MCP list_filters.","schema":{"type":"string"}},{"in":"query","required":false,"name":"watched","description":"Viewer country (ISO alpha-2); below-floor channels omitted. Cannot combine with device.","schema":{"type":"string"}},{"in":"query","required":false,"name":"language","description":"Channel language; available values via MCP list_filters.","schema":{"type":"string"}},{"in":"query","required":false,"name":"category","description":"Channel category; available values via MCP list_filters.","schema":{"type":"string"}},{"in":"query","required":false,"name":"device","schema":{"type":"string","enum":["web-computer","web-mobile","tv-page","google-tv-app","fire-tv-app","other-tv-app","other"]}},{"in":"query","required":false,"name":"official","description":"1 restricts to the site's Official list","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"in":"query","required":false,"name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":24}},{"in":"query","required":false,"name":"offset","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}}],"responses":{"200":{"description":"Ranked aggregate ratings; no personal data. CC0-1.0.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ranking"}}}},"400":{"description":"Unknown, duplicate or invalid parameter (named in the response)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-address budget exceeded; retry after 60 seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Ratings unavailable and no last-good copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data/ratings/daily/index.json":{"get":{"operationId":"dailyRatingsIndex","summary":"Available daily ratings history","description":"Lists the first day with ratings data through yesterday. Yesterday becomes downloadable at 01:00 UTC.","responses":{"200":{"description":"UTC days available","content":{"application/json":{"schema":{"type":"object","required":["license","label","developers","generated_at","days"],"properties":{"license":{"type":"string","const":"CC0-1.0"},"label":{"type":"string","const":"Self-reported: counted from viewers using Broadcast Atlas's players"},"developers":{"type":"string","const":"https://broadcastatlas.com/developers"},"generated_at":{"type":"string","format":"date-time"},"days":{"type":"array","items":{"type":"string","format":"date"}}}}}}},"400":{"description":"Unknown, duplicate or invalid parameter (named in the response)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-address budget exceeded; retry after 60 seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Ratings unavailable and no last-good copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data/ratings/daily/{day}.json":{"get":{"operationId":"dailyRatingsJson","summary":"Immutable worldwide daily full ranking","description":"Built lazily once, after the day ends plus one hour; never rebuilt. All eligible channels, no filters.","parameters":[{"in":"path","name":"day","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Ranked aggregate ratings; no personal data. CC0-1.0.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ranking"}}}},"400":{"description":"Unknown, duplicate or invalid parameter (named in the response)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Invalid, not recorded or not yet completed day"},"429":{"description":"Per-address budget exceeded; retry after 60 seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Ratings unavailable and no last-good copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data/ratings/daily/{day}.csv":{"get":{"operationId":"dailyRatingsCsv","summary":"Immutable daily full ranking as CSV","parameters":[{"in":"path","name":"day","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"UTF-8, CRLF CSV with quoted fields. Initial # comment lines give license, self-report label, developers URL, range and generation time. Column names match JSON rows.","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Unknown, duplicate or invalid parameter (named in the response)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Invalid, not recorded or not yet completed day"},"429":{"description":"Per-address budget exceeded; retry after 60 seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Ratings unavailable and no last-good copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Ranking":{"type":"object","required":["license","label","developers","from","to","generated_at","total","rows"],"properties":{"license":{"type":"string","const":"CC0-1.0"},"label":{"type":"string","const":"Self-reported: counted from viewers using Broadcast Atlas's players"},"developers":{"type":"string","const":"https://broadcastatlas.com/developers"},"from":{"type":["string","null"],"format":"date","description":"Null for all time"},"to":{"type":"string","format":"date"},"generated_at":{"type":"string","format":"date-time"},"total":{"type":"integer"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ChannelRating"}}}},"ChannelRating":{"type":"object","required":["rank","name","slug","page_url","upstream_channel_id","country_code","logo_url","minutes_watched","plays","failed_load_share"],"properties":{"rank":{"type":"integer","minimum":1},"name":{"type":"string"},"slug":{"type":"string"},"page_url":{"type":"string","format":"uri"},"upstream_channel_id":{"type":["string","null"],"description":"iptv-org channel ID, null for other sources"},"country_code":{"type":"string"},"logo_url":{"type":["string","null"]},"minutes_watched":{"type":"integer","minimum":0},"plays":{"type":"integer","minimum":0,"description":"Successful plays"},"failed_load_share":{"type":["number","null"],"minimum":0,"maximum":1,"description":"Failed / (successful + failed) loads; null when unavailable. Web computer/mobile failures combine web devices; other-tv-app failures cover Shield/sideloaded while minutes include LG, exactly as /ratings."}}},"Error":{"type":"object","properties":{"license":{"type":"string","const":"CC0-1.0"},"label":{"type":"string","const":"Self-reported: counted from viewers using Broadcast Atlas's players"},"developers":{"type":"string","const":"https://broadcastatlas.com/developers"},"error":{"type":"string"},"parameter":{"type":"string"}}}}}}