OMDb API
www.omdbapi.com · Media
Movie and TV metadata including IMDb ratings, Rotten Tomatoes scores, Metacritic, poster URLs, plots, and full cast lists. Search by title or IMDb ID. Free tier: 1,000 requests/day.
Authentication
API Key
Free API key at omdbapi.com. Pass as ?apikey= query parameter.
Sample Requests
GET
Search by title
Get full details for the movie Inception.
https://www.omdbapi.com?t=Inception&apikey=YOUR_KEY
Hover any highlighted part to learn what it does
curl -X GET "https://www.omdbapi.com/?t=Inception&apikey=YOUR_KEY"
import requests
params = {
"t": "Inception",
"apikey": "YOUR_KEY"
}
response = requests.get(
"https://www.omdbapi.com/",
params=params,
)
print(response.json())const url = new URL('https://www.omdbapi.com/');
url.searchParams.set('t', 'Inception');
url.searchParams.set('apikey', 'YOUR_KEY');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://www.omdbapi.com/")
q := baseURL.Query()
q.Set("t", "Inception")
q.Set("apikey", "YOUR_KEY")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.omdbapi.com/")
uri.query = URI.encode_www_form({
"t" => "Inception",
"apikey" => "YOUR_KEY"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.omdbapi.com/?" . http_build_query([
"t" => "Inception",
"apikey" => "YOUR_KEY"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Search by IMDb ID
Get details for The Shawshank Redemption by IMDb ID.
https://www.omdbapi.com?i=tt0111161&apikey=YOUR_KEY
Hover any highlighted part to learn what it does
curl -X GET "https://www.omdbapi.com/?i=tt0111161&apikey=YOUR_KEY"
import requests
params = {
"i": "tt0111161",
"apikey": "YOUR_KEY"
}
response = requests.get(
"https://www.omdbapi.com/",
params=params,
)
print(response.json())const url = new URL('https://www.omdbapi.com/');
url.searchParams.set('i', 'tt0111161');
url.searchParams.set('apikey', 'YOUR_KEY');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://www.omdbapi.com/")
q := baseURL.Query()
q.Set("i", "tt0111161")
q.Set("apikey", "YOUR_KEY")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://www.omdbapi.com/")
uri.query = URI.encode_www_form({
"i" => "tt0111161",
"apikey" => "YOUR_KEY"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://www.omdbapi.com/?" . http_build_query([
"i" => "tt0111161",
"apikey" => "YOUR_KEY"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Get a free API key at omdbapi.com (1,000 req/day)
- By title: GET /?t=The+Matrix&apikey=KEY
- By IMDb ID: GET /?i=tt0133093&apikey=KEY
- Search: GET /?s=Batman&type=movie&apikey=KEY (returns list)
- Add &plot=full for full plot or &plot=short (default) for synopsis