Skip to end of banner
Go to start of banner

Epg API v4

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Introduction

Users can request programs scheduled on channels. Programs are imported by importers. Programs are returned based on channels and within a window starting from 04:00 AM on the given date until 04:00 AM on the following date. The result is cacheable.

The Epg API v4 spec can be viewed at Schedule

Entities Overview

EntitiesPurpose
Broadcast slotIdentifies a time slot on a channel where a program is aired. Broadcast slots may change or be removed at any time as the broadcast schedule is updated. Each broadcast slot relates to one channel and one program.
Meta programSpecifies detailed information about programs.
ChannelSpecifies detailed information about channels.

Endpoints overview

EndpointHttp methodPurpose
/api/metadata/v1/broadcast_slots/{channel_id}/{date}GETGet a list of broadcast slots based on channel_id within a window starting from 04:00 AM on the given date until 04:00 AM on the following date.

This is a public API that requires no authentication.

Displaying broadcast schedule

The Channel API can be used to fetch all available channels and their IDs. The broadcast schedule for each channel can then be queried by calling the broadcast_slots API with the channel ID.

Each API call returns the broadcast schedule for one channel starting from 04:00 in the morning of the requested day to 04:00 the following day. Clients should query only the data that is displayed on screen or is expected to be displayed soon, asynchronously querying more data as the user scrolls it into view. Data should be cached locally according to the cache control header. ETag should be used for cache validation to save bandwidth.

Each broadcast slot has a related Meta program that contains detailed data about the content aired in that slot. For convenience, some of that metadata is included in the broadcast slot object in the "program" attribute. This data can be used to display content information in the schedule view. If more detailed data is needed, it can be retrieved from the Program Metadata API.

Services

The services provided for each channel can be found in the Channel object in the "services_enabled" attribute. For convenience, the Channel object is included in the response from the broadcast_slots API. These services can be blacklisted for individual broadcast slots, meaning that service is not available for the given broadcast slot, even though it is normally enabled for the channel. For example, if the "npvr" service is enabled for a channel, but blacklisted for a broadcast slot aired on that channel, it means that the user is not allowed to record that broadcast slot. The blacklisting information is included in the broadcast slot object in the "services_blacklisted" attribute.

Language support

If the content data is available in multiple languages, specific languages can be requested from the API by specifying the language query parameter in the request.

  • No labels