Documentation Index
Fetch the complete documentation index at: https://starlight.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Welcome to the third version of The Movie Database (TMDB) API. Our API provides you with vast access to a range of movies, TV shows, actor information, and images.
Shell
Python
Ruby
Node.js
Java
curl -X GET "https://api.themoviedb.org/3/authentication" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
url = "https://api.themoviedb.org/3/authentication"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
require 'net/http'
require 'json'
url = URI("https://api.themoviedb.org/3/authentication")
req = Net::HTTP::Get.new(url)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(url.host, url.port, use_ssl: true) { |http| http.request(req) }
puts res.body
const fetch = require('node-fetch');
const url = "https://api.themoviedb.org/3/authentication";
const options = {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class ApiRequest {
public static void main(String[] args) {
try {
String url = "https://api.themoviedb.org/3/authentication";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Authorization", "Bearer YOUR_API_KEY");
int responseCode = con.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}