Watch It? Track It.

A movie's base.json holds its language-neutral data and credits; its names and descriptions are in the language files.

Files

  • https://api.watchittrackit.com/v1/movie/{id}/base.json
  • https://api.watchittrackit.com/v1/movie/{id}/{lang}.json
  • https://api.watchittrackit.com/v1/movie/slugs/{shard}.json

An image is an object with full and thumb paths.

base.json

FieldTypeDescription
typestringRecord type.
idnumberTheTVDB id.
slugstringURL slug, unique within the type.
popularitynumberTheTVDB popularity score; higher is more popular. Scores are comparable within a type only.
deletedbooleanTrue if the record was removed. Its files stay published.
releasedstringRelease date (YYYY-MM-DD).
runtimenumberLength in minutes.
imageimageMain image: a poster for titles, a photo for people.
images{ [kind]: image }The best image of each kind: poster, background, banner, icon, clearart, clearlogo.
imagesByLang{ [kind]: image[] }Per kind, the best image in each language, with its language code, size and score.
castcredit[]Actors, in billing order.
crewcredit[]Everyone else credited, with their job.
topBilledIdsnumber[]Ids of people to feature first.
genresstring[]Genre slugs, as TheTVDB defines them.
languagesstring[]Languages this record has files for.
remoteIds{ [site]: string }Ids on other sites (imdb, tmdb, wikidata, …), keyed by site.

Example

{
  "type": "movie",
  "id": 16612,
  "slug": "barbie",
  "popularity": 1213687,
  "deleted": false,
  "released": "2023-07-18",
  "runtime": 114,
  "images": {
    "poster": { "full": "/images/movie/16612/poster/64ba61bb1dc73.jpg", "thumb": "/images/movie/16612/poster/64ba61bb1dc73.t.jpg" }
  },
  "imagesByLang": {
    "poster": [{ "full": "/images/movie/16612/poster/64ba61bb1dc73.jpg", "thumb": "…", "lang": "eng", "width": 680, "height": 1000, "score": 100007 }]
  },
  "cast": [
    { "id": 327479, "activityId": 44, "role": "Barbie", "slug": "margot-robbie", "topBilled": true, "deleted": false }
  ],
  "crew": [
    { "id": 569546, "activityId": 93, "job": "producer", "slug": "walter-f-parkes", "topBilled": false, "deleted": false }
  ],
  "topBilledIds": [327479],
  "genres": ["adventure", "comedy", "fantasy"],
  "languages": ["de", "en", "fr"],
  "remoteIds": { "imdb": "tt1517268", "tmdb": "346698" }
}

Credits

Each entry in cast and crew:

FieldTypeDescription
idnumberPerson id.
activityIdnumberCredit id, unique per credit.
rolestringCharacter played (cast).
jobstringJob (crew): director, writer, producer, …
slugstringThe person's slug.
imageimageThe person's photo.
topBilledbooleanA featured credit.
deletedbooleanTrue if the person was removed.

Language files

FieldTypeDescription
typestringRecord type.
idnumberTheTVDB id.
langstringLanguage of this file.
namestringName in this language.
overviewstringDescription in this language.
credits{ [personId]: { name, role } }Per person id: their name in this language and their role.

Example

{
  "type": "movie",
  "id": 16612,
  "lang": "en",
  "name": "Barbie",
  "overview": "Barbie and Ken are having the time of their lives…",
  "credits": { "327479": { "name": "Margot Robbie", "role": "Barbie" } }
}

Finding a title by its slug

Show and movie URLs use slugs (breaking-bad). The slug index maps each slug to its id, split into 256 small files: a slug's file is named by the first two hex characters of the SHA-1 of the slug.

// Node.js
import { createHash } from "node:crypto"

const slug = "barbie"
const shard = createHash("sha1").update(slug, "utf8").digest("hex").slice(0, 2)
const index = await fetch(`https://api.watchittrackit.com/v1/movie/slugs/${shard}.json`).then((r) => r.json())
const id = index[slug]
const record = await fetch(`https://api.watchittrackit.com/v1/movie/${id}/base.json`).then((r) => r.json())