TV & Movies API
Description
Search, or get recommendations from, our TV & Movies database with over 600k entries curated from a variety of sources.
Bulk Data Download:
If you need a complete data dump of our entire TV Shows & Movies database, reach out to us. We offer that as a separate service option. Trying to scrape our APIs is not recommended as you'll end up consuming your monthly request allowance.
Endpoint
> GET https://api.jsonrepo.com/v1/knowledge/entertainment/tv_movies
Headers
Field | Description |
---|---|
api_key | Required Your API Key |
Parameters
Field | Type | Description |
---|---|---|
imdb_id | String | Optional IMDB ID |
title | String | Optional The title of the TV show or the movie (case insensitive) |
limit | Integer | Optional Number of results Default: 10 Range: 1 <= limit <= 20 |
Random Recommendations:
If none of the optional search fields
imdb_id
ortitle
is provided, the endpoint will return a set of sizelimit
random TV shows or Movies.
Parameter Interaction:
If multiple optional fields are provided, an
AND
operation will be executed. In most cases this is not helpful. Searching forimdb_id
&title
is the same as searching forimdb_id
without thetitle
as the former is always unique. For best possible matches, use only one of the optional search fields.
Search Strictness:
Our Tv & Movies database is large. It contains 600k+ records with more to come. For search to be effective and return appropriate results rather than unexpected hits that just might happen to match your search term partially, we've decided to implement a
strict search
policy for thetitle
parameter. That means when providing atitle
parameter, only the records that start with your input will be searched for.
Title Encoding:
The
title
parameter is UTF-8 ready. Any non-english characters can be sent as is without any pre-processing or conversions on your end. Example: "U Pana Boga w ogródku
" will be accepted as atitle
by this endpoint as long as the parameter was provided with the correct URL-encoding.
Response
A successful request will result in a populated payload
field with the expected output.
A failed request will result in an error output as detailed in Error Rules. If the endpoint validation fails due to missing, badly formatted or invalid parameters, the endpoint will return HTTP code 400
along with a message
detailing the error.
See the examples section for more information.
Request 1: Random Books
- Curl
// Get 10 random TV Shows or Movies
curl \
https://api.jsonrepo.com/v1/knowledge/entertainment/tv_movies \
-H "api_key: {YOUR_API_KEY_HERE}"
Success Response
{
"http_code": 200,
"http_message": "Ok",
"message": "Successful execution",
"payload": {
"entries": [
{
"id": 589602,
"imdb_id": "tt1848913",
"title": "Goy",
"released": "2007-12-31",
"revenue": "",
"runtime": 79,
"budget": 500000,
"directors": [
"Felix Kersting",
"Marc Schaumburg"
],
"cast": [
"Yvonne Zima",
"Christoph Krisea",
...
],
"language": "en",
"story": "One lie in the past can change the future.",
"genres": [
"Horror",
"Thriller"
],
"production": [
"Meb Entertainment",
"Magnus Entertainment",
"Accomm Entertainment"
],
"keywords": [],
"db_entry_last_updated_at": "2024-07-25 08:46:52"
},
// 9 more entries below
...
]
}
}
Request 2: Search
- Curl
// Search for a entry by `imdb_id`
curl -G \
https://api.jsonrepo.com/v1/knowledge/entertainment/tv_movies \
-H "api_key: {YOUR_API_KEY_HERE}" \
--data-urlencode "imdb_id=tt0470752"
Success Response
{
"http_code": 200,
"http_message": "Ok",
"message": "Successful execution",
"payload": {
"entries": [
{
"id": 174,
"imdb_id": "tt0470752",
"title": "Ex Machina",
"released": "2015-01-21",
"revenue": 36869414,
"runtime": 108,
"budget": 15000000,
"directors": [
"Alex Garland"
],
"cast": [
"Tiffany Pisani",
"Sonoya Mizuno",
...
],
"language": "en",
"story": "Caleb, a coder at the world's largest internet company, wins...",
"genres": [
"Drama",
"Science Fiction"
],
"production": [
"Dna Films",
"Film4 Productions",
"Iac Films",
"Scott Rudin Productions"
],
"keywords": [
"Android",
"Artificial Intelligence (a.i.)",
"Technology",
...
],
"db_entry_last_updated_at": "2024-07-25 08:47:06"
}
]
}
}
Error Response Examples
// Request with invalid `limit` parameter
{
"http_code": 400,
"http_message": "Bad Request",
"message": "Malformed request: `limit` parameter must be between 1 (min) and 20 (max). Default is 10.",
"payload": []
}