Le API Tivupedia consentono di ottenere l'elenco canali con metadati (loghi, LCN, broadcaster), l'EPG per singolo giorno o range, i programmi serali in evidenza (Highlights, solo oggi) e i dettagli di un singolo programma. Accesso partner tramite X-API-Key.

Base URL: https://tivupedia.it Formato: JSON UTF-8 Timezone: Europe/Rome

1) Autenticazione & Sicurezza

X-API-Key • HTTPS

Header

X-API-Key: YOUR_KEY
  • HTTPS obbligatorio
  • Rate limit/quote per piano
  • 429 se superi i limiti

Risposte d'errore

{
  "error": "unauthorized"
}
{
  "error": "too_many_requests"
}

2) Endpoints

2.1 Channels – Elenco canali

GET /api/channels.php

Restituisce tutti i canali (nessuna paginazione) con filtri base.

Parametri

  • q — ricerca su name

Esempio richiesta

                        curl -H "X-API-Key: YOUR_KEY" \
  "https://tivupedia.it/api/channels.php?q=Rai%201"

Esempio risposta 200

{
  "count": 1,
  "data": [
    {
      "id": 38,
      "name": "Rai 1",
      "position": 1,
      "broadcaster": null,
      "logo_url": "https://tivupedia.it/assets/img/loghi/rai-1.png",
      "lcn_dtt": null,
      "lcn_sat": null
    }
  ]
}

2.2 EPG – Programmazione

GET /api/epg.php

Programmazione per giorno (compatibilità) o per range (con limiti per piano).

(A) Single day

  • date — YYYY-MM-DD (default oggi Europe/Rome)
  • channel — filtro LIKE sul nome canale
curl -H "X-API-Key: YOUR_KEY" \
  "https://tivupedia.it/api/epg.php?date=2025-08-14&channel=Rai%201"

Esempio risposta 200 (estratto)

{
  "date": "2025-08-14",
  "count": 1,
  "channels": [
    {
      "id": 38,
      "name": "Rai 1",
      "logo": "assets\\/img\\/loghi\\/rai-1.png",
      "programs": [
        { "id": 11684,  "start": "00:00", "end": "00:09", "title": "Il mondo con gli occhi di Overland" },
        { "id": 11683,  "start": "00:00", "end": "00:09", "title": "TG1 Sera" },
        { "id": 11719,  "start": "20:30", "end": "21:30", "title": "Techetechetè" },
        { "id": 11720,  "start": "21:30", "end": null,   "title": "Un Professore 2 - Heidegger: L'esistenza" },
        { "id": 11722,  "start": "23:55", "end": null,   "title": "TG1 Sera" }
      ]
    }
  ]
}

(B) Range

  • start, end — YYYY-MM-DD
  • channel — filtro LIKE sul nome canale
curl -H "X-API-Key: YOUR_KEY" \
  "https://tivupedia.it/api/epg.php?start=2025-08-14&end=2025-08-16&channel=rai"

2.3 Highlights – Programmi serali in evidenza (oggi)

GET /api/highlights.php

Restituisce gli highlight della fascia serale solo per il giorno corrente (oggi). Il parametro date è opzionale e, se presente, deve corrispondere alla data odierna.

Esempio richiesta

curl -H "X-API-Key: YOUR_KEY" \
  "https://tivupedia.it/api/highlights.php?date=2025-08-14"

Esempio risposta 200 (estratto)

{
  "date": "2025-08-14",
  "tonight": false,
  "event_only": false,
  "count": 12,
  "items": [
    {
      "id": 25,
      "channel_id": 38,
      "event_id": 11720,
      "channel_name": "Rai 1",
      "channel_logo": "assets\\/img\\/loghi\\/rai-1.png",
      "poster": "tivupedia.it\\/assets\\/img\\/events\\/event_11720.jpeg",
      "start_local": "2025-08-14 21:30:00",
      "end_local": "2025-08-14 23:45:00",
      "start_utc": "2025-08-14 19:30:00",
      "end_utc": "2025-08-14 21:45:00",
      "time": "21:30",
      "title": "UN PROFESSORE 2: Ep.3-4",
      "description": "FICTIO (120') Italia, 2021. ...",
      "image_url": "/assets/img/events/event_11720.jpeg",
      "site_url": "https://www.raiplay.it/programmi/unprofessore",
      "live_url": "http://www.rai.tv/dl/RaiTV/dirette/PublishingBlock-6420.html"
    },
    {
      "id": 29,
      "channel_id": 39,
      "event_id": 11763,
      "channel_name": "Rai 2",
      "channel_logo": "assets\\/img\\/loghi\\/rai-2.png",
      "time": "21:00",
      "title": "DELITTI IN PARADISO XII: Ep.5-6",
      "image_url": "/assets/img/events/event_11763.jpeg",
      "site_url": "https://www.raiplay.it/programmi/delittiinparadiso",
      "live_url": "http://www.rai.tv/dl/RaiTV/dirette/PublishingBlock-5735.html?channel=Rai%202"
    }
  ]
}

Nota: l'array items è stato abbreviato nell'esempio.

2.4 Program Details – Dettaglio programma

GET /api/program_details.php

Restituisce i dettagli di un singolo programma. I parametri si ottengono da EPG o Highlights.

Parametri (obbligatori)

  • cidchannel_id
  • eidprograms_id

Esempio richiesta

curl -H "X-API-Key: YOUR_KEY" \
  "https://tivupedia.it/api/program_details.php?cid=40&eid=11797"

Esempio risposta 200

{
  "ok": true,
  "title": "Vacanze Romane",
  "description": "FILM - La principessa Anna ...",
  "poster_url": "/assets/img/posters/75e6a851b61f503c927d8df9c3a5cfe6e0cce83c.png",
  "channel_name": "Rai 3",
  "channel_logo": "assets/img/loghi/rai-3.png",
  "site_url": null,
  "video_url": null,
  "live_url": null
}

3) Errori

Codici

  • 400 bad_request / range_limit
  • 401 unauthorized
  • 429 too_many_requests
  • 500 internal_error

Esempi

{"error":"bad_request","message":"Invalid date"}
{"error":"too_many_requests"}

Serve aiuto con l'integrazione?

Scrivici: support@tivupedia.it – rispondiamo velocemente.