movies

media

Film or motion picture with director, cast information, genre, release year, duration, ratings, financial data, and poster. Used for movie databases, streaming platforms, and cinema management systems.

Request Builder

https://api.mockly.codes/movies?page=1&limit=10&count=10

Configure your request and click Send Request to see the response here.

Endpoints

GET/movies

Get a collection of movies

Alternative: /media/movies
GET/movies/:id

Get a single movie by ID

Alternative: /media/movies/:id
GET/movies/meta

Get resource metadata and schema

Alternative: /media/movies/meta

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/movies?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/movies?q=laptop&search_fields=name,description

Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

JavaScript

Fetch Collection
// Get 10 movies
fetch('https://api.mockly.codes/movies?count=10')
  .then(res => res.json())
  .then(data => console.log(data));

Python

Fetch with Requests
import requests

response = requests.get(
    'https://api.mockly.codes/movies?count=10'
)
data = response.json()

cURL

Command Line
curl "https://api.mockly.codes/movies?count=10"

Bypass Cache

Get Fresh Data
fetch('https://api.mockly.codes/movies?nocache=true')

Schema Properties

idinteger

Unique identifier for the movie

Gen:random_int
titlestring

Title of the movie

Gen:movie_title
descriptionstring

Plot summary or synopsis of the movie

Gen:paragraph
directorstring

Full name of the movie director

Gen:name
genrestring

Movie genre (e.g., Action, Drama, Comedy, Horror, Sci-Fi, Thriller)

Gen:movie_genre
yearinteger

Year when the movie was released

Gen:movie_year
durationinteger

Movie runtime in minutes

Gen:movie_duration
ratingnumber

Average rating from critics or audiences, typically on a scale of 1-10

Gen:rating
languagestring

Primary language code of the movie (e.g., en, es, fr)

Gen:language
countrystring

Country of origin or primary production country

Gen:country
budgetnumber

Production budget in USD

Gen:movie_budget
revenuenumber

Total box office revenue or gross earnings in USD

Gen:movie_revenue
posterstring

URL to the movie poster image

Gen:image_urluri
released_atstring

Official release date of the movie

Gen:past_datedate

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request