API is supplied for educational purposes only.
It isn't intended for general public use and may change or be removed without notice.
Information
This API supplies data on a small selection of about 30 movies, similar to what might be found in a family movie collection. While some effort has been made to ensure the movie data accuracy, it is not guaranteed.
All requests to this API must use the following base URL:
https://teapi.netlify.app/api/movies/{endpoint}
This is a consumption-only API—only the HTTP GET method is available for these resources. Documentation on the available endpoints follows. Throughout the documentation curly braces are used to indicate values that must be substituted.
Resource Lists
Calling any API endpoint without an id will return an array containing the available resources of that type.
Some endpoints support search or filtering. All searches use case-insensitive partial matches on the set of search fields. The set of search fields for each resource is listed in the resource documentation. As the collection is relatively small, this API does not support pagination.
Search is handled using standard query parameters: /{endpoint}?{search-field}={field-value}
.
Root Endpoint: Movies
This returns one or more movies from the API collection.
Endpoints
- GET
/
- list of Movies - GET
/{id}
- single Movie
Example
GET https://teapi.netlify.app/api/movies/102233
{
"id": 102233,
"title": "Metropolis",
"releaseDate": "01-10-1927",
"posterImage": "/images/movies/Metropolis_Poster.jpg",
"directors": [{"id": 302216, "name":"Fritz Lang"}],
"genres": [{"id": 2200, "name": "Foreign"}, {"id": 2212, "name": "Science Fiction"}],
"taglines": ["There can be no understanding between the hands and the brain unless the heart acts as mediator."],
"summary": "In a futuristic city sharply divided between the working class and the city planners, elites frolic…"
}
Resource: Movie
Name | Description | Type |
id | The id for this resource. | number |
title | The movie title. | string |
releaseDate | The date when the movie was first released. The date is in month-day-year format. If the only the year is known, January 1st is used for the unknown month and day. | date (mm-dd-yyyy) |
posterImage | The path to an image of the movie poster cover. | string |
directors | A list of the movies's directors. | list (Director) |
genres | A list of the movie's genres. | list (Genre) |
taglines | A list of taglines for this movie. | list (string) |
summary | A paragraph of text summarizing the movie's plot. | string |
Search Parameters
- title
- genre
Searching by title returns partial matches. Searching by genre requires an exact match.
Searching with both title and genre performs an AND search. Movies must match the title string and a genre.
However, searching with multiple genres does an OR search for the genres, including movies with any of the genres specified.
Endpoint: Genres
This returns one or more movie genres.
Endpoints
- GET
/genres
- list of Genres - GET
/genres/{id}
- single Genre
Example
GET https://teapi.netlify.app/api/movies/genres/2214
{
"id": 2214,
"name": "Mystery",
"movies": []
}
Resource: Genre
Name | Description | Type |
id | The id for this resource. | number |
name | The name of this resource. | string |
movies | A list of movies within this genre. This property is not included in Resource Lists. It is only included for a single genre. | list (Movie) |
Search Parameters
Search is not supported for this resource.
Other Types
This section defines other types used by this API.
Type: Director
Name | Description | Type |
id | The id for this director. | number |
fullName | The director's full name. | string |