Quickstart

Buy a plan, create a key in your account and send it with your first request to https://api.amodb.dev/3/movie/550. The response is the TMDB v3 JSON you already know. Then build a poster URL on img.amodb.dev from poster_path. If you already use TMDB or OMDb, change only the base URL and the key.

1. Get a key

Pick a plan on the pricing page and pay for a period. Then open Account, then API keys, and create a key. A key is 32 lowercase hex characters, the same shape as a TMDB v3 key.

The full key is shown once. Store it as an environment variable named AMODB_KEY so the samples on this page work as written.

Shell
export AMODB_KEY="0123456789abcdef0123456789abcdef"

2. Request movie details

Call GET /3/movie/{movie_id}. Send the key as a Bearer token or as api_key in the query. Both are accepted on every endpoint.

A 200 response has the TMDB v3 fields. A short part of it:

curl "https://api.amodb.dev/3/movie/550?language=en-US" \
  -H "Authorization: Bearer $AMODB_KEY"
const res = await fetch("https://api.amodb.dev/3/movie/550?language=en-US", {
  headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` },
});
if (!res.ok) throw new Error(`amodb ${res.status}`);
const movie = await res.json();
console.log(movie.title, movie.runtime);
import os
import requests

res = requests.get(
    "https://api.amodb.dev/3/movie/550",
    params={"language": "en-US"},
    headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
    timeout=10,
)
res.raise_for_status()
movie = res.json()
print(movie["title"], movie["runtime"])
<?php
$ch = curl_init("https://api.amodb.dev/3/movie/550?language=en-US");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("AMODB_KEY")],
]);
$movie = json_decode(curl_exec($ch), true);
echo $movie["title"] . " " . $movie["runtime"];
package main

import (
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.amodb.dev/3/movie/550?language=en-US", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("AMODB_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()

	var movie struct {
		Title   string `json:"title"`
		Runtime int    `json:"runtime"`
	}
	json.NewDecoder(res.Body).Decode(&movie)
	fmt.Println(movie.Title, movie.Runtime)
}
JSON
{
  "id": 550,
  "imdb_id": "tt0137523",
  "title": "Fight Club",
  "release_date": "1999-10-15",
  "runtime": 139,
  "poster_path": "/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg"
}

3. Load the poster

Join the image base URL, a size and poster_path. Images need no key and stay cached for 30 days.

See images for every size and for building URLs from /3/configuration.

curl -o poster.jpg "https://img.amodb.dev/t/p/w500/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg"
const poster = `https://img.amodb.dev/t/p/w500${movie.poster_path}`;
poster = f"https://img.amodb.dev/t/p/w500{movie['poster_path']}"

4. Move an existing client

For a TMDB v3 client, change the base URL from https://api.themoviedb.org/3 to https://api.amodb.dev/3 and use your amodb key. For an OMDb client, change it to https://api.amodb.dev/omdb/ and pass the same key as apikey.

Account, session, rating and list write methods of TMDB are not offered. They return HTTP 405 with status_code 37, so a read only client needs no other change.

5. Handle limits and errors

Each key has a rate per minute set by its plan. Read X-RateLimit-Remaining and wait for Retry-After seconds after a 429. Errors use the TMDB body with success, status_code and status_message.

Read rate limits and errors before you go to production.