Skip to content

API documentation

The Trailerix Open API is a free, JSON-over-HTTPS feed of movie & TV trailer metadata. Records are keyed by IMDb ID — drop your existing IMDb references in and pull our editorial summaries, posters, cast, genre tags and the primary YouTube trailer for each title.

Required: link back to Trailerix

The API key is activated and stays active only while a visible “Fresh trailers by Trailerix” link is present on the page where you display the data (the URL you supply during registration). Drop the snippet below into your template — that's all we ask in exchange for the feed.

<a href="https://trailerix.com" rel="noopener" class="trailerix-credit">
  Fresh trailers by Trailerix
</a>

The wording is up to you (e.g. "Trailery: Trailerix", "Movie data via Trailerix") — what matters is the visible link to https://trailerix.com.

Register an API key

Email + the URL where you'll be using the API. We send a confirmation link; once clicked, the key activates immediately.

Base URL

https://trailerix.com/api/v1/

Authentication

Pass your key as ?api_key=… or as Authorization: Bearer ….

curl -H "Authorization: Bearer YOUR_KEY" \
  "https://trailerix.com/api/v1/movie/imdb/tt6320628"

Localization

Add ?lang=<code> to any endpoint that returns titles, summaries or category names. Supported codes: en, de, pl, cz, sk, es, pt, it, fr, nl. EN is the default and the fallback when a translation is missing.

Rate limits

Default: 1 000 requests / day per key. Need more? Drop us a line at [email protected]. Each call is logged for fair-use enforcement and abuse prevention.

Endpoints

GET /trailers

Newest published trailers, paginated.

ParamTypeDefault
langstringen
pageinteger1
per_pageinteger (≤50)20

GET /trailer/{slug}

Single record looked up by URL slug. Returns the verbose shape (with body_html, poster + backdrop URLs).

GET /movie/imdb/{tt…}

Primary lookup. If your dataset already carries IMDb IDs, this is the fastest path. Returns the same record shape as /trailer/{slug}.

curl -H "Authorization: Bearer KEY" \
  "https://trailerix.com/api/v1/movie/imdb/tt6320628?lang=cz"

GET /movie/tmdb/{id}

Secondary lookup by numeric TMDB ID. Useful when migrating from a TMDB-keyed dataset.

Fulltext search over titles + editorial copy in the requested language.

GET /categories

List of formats + genres with localized names and the count of movies tagged in each.

GET /health

Unauthenticated quick liveness probe — returns {"ok": true, "time": "…", "version": "v1"}.

Response shape

Movie records are returned with the IMDb ID first; everything else is keyed off it.

{
  "id": 42,
  "imdb_id": "tt6320628",
  "tmdb_id": 429617,
  "slug": "spider-man-far-from-home-2019-1",
  "title": "Spider-Man: Far From Home",
  "type": "movie",
  "release_date": "2019-07-02",
  "rating": 7.4,
  "rating_count": 14583,
  "summary": "Following the events of Endgame…",
  "trailer": {
    "youtube_id": "Nt9L1jCKGnE",
    "embed_url": "https://www.youtube.com/embed/Nt9L1jCKGnE",
    "thumbnail":  "https://img.youtube.com/vi/Nt9L1jCKGnE/maxresdefault.jpg"
  },
  "categories": [
    { "slug": "akcni",    "kind": "genre", "name": "Akční", "canonical_slug": "action" },
    { "slug": "filmy",    "kind": "format","name": "Filmy", "canonical_slug": "movies" }
  ],
  "cast": [
    { "name": "Tom Holland",    "slug": "tom-holland",    "imdb_id": "nm4043618",
      "tmdb_id": 1136406, "character": "Peter Parker / Spider-Man",
      "profile": "https://image.tmdb.org/t/p/w185/…jpg" }
  ],
  "staff": [
    { "name": "Jon Watts", "slug": "jon-watts", "imdb_id": "nm2585816",
      "tmdb_id": 1399344, "roles": ["director"], "jobs": ["Director"],
      "jobs_localized": ["Režie"], "profile": "https://image.tmdb.org/t/p/w185/…jpg" }
  ],
  "attribution": {
    "required": "Fresh trailers by Trailerix",
    "url": "https://trailerix.com",
    "note": "Display a \"Fresh trailers by Trailerix\" link on the page where this data is shown."
  }
}

Client examples

JavaScript (fetch)

const KEY = 'YOUR_KEY';
const r = await fetch(
  'https://trailerix.com/api/v1/movie/imdb/tt6320628?lang=en',
  { headers: { Authorization: 'Bearer ' + KEY } }
);
const data = await r.json();
console.log(data.title, data.trailer.embed_url);

PHP (curl)

$ch = curl_init('https://trailerix.com/api/v1/movie/imdb/tt6320628?lang=cz');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . $KEY],
]);
$movie = json_decode(curl_exec($ch), true);
echo $movie['title'], ' — ', $movie['trailer']['embed_url'];

Python (requests)

import requests
r = requests.get(
    'https://trailerix.com/api/v1/movie/imdb/tt6320628',
    headers={'Authorization': f'Bearer {KEY}'},
    params={'lang': 'de'},
    timeout=15,
).json()
print(r['title'], r['trailer']['embed_url'])

Embed the trailer in HTML

<iframe width="560" height="315"
        src="{{ data.trailer.embed_url }}"
        title="{{ data.title }} — Trailer"
        allowfullscreen
        allow="autoplay; encrypted-media; picture-in-picture"></iframe>
<p><a href="https://trailerix.com" rel="noopener">Fresh trailers by Trailerix</a></p>

Error responses

StatusMeaning
400Bad input — missing param, malformed IMDb ID, etc.
401Missing or invalid API key.
404Unknown endpoint, or the requested IMDb ID isn't in our catalogue.
409Email already registered (during registration).
429Daily rate limit exceeded.

Terms

By using the API you accept the Terms of Use. Keys may be revoked without notice for breach of these terms — including a missing or removed attribution link.