Sample Queries
FreshThe following pages contain ready-to-run GraphQL query examples for the IMDb API, organized by category. Each example includes the full query and representative response data.
Query Categories
Title and Name Queries
Ten examples covering the most common data retrieval patterns:
- Ratings and vote counts
- Plot summaries and genres
- Technical specs (runtime, release date, color)
- Full credits by category
- Multiple credit categories in one request using aliases
- Nested queries (cast member's known-for titles)
- Keywords with vote data
- Awards (nominations and wins)
- Episode lists
- Cursor-based pagination
Box Office Queries
Five examples for retrieving box office financial data (requires the IMDb and Box Office Mojo product subscription):
- International opening gross
- International lifetime gross
- Production budget
- Ranked lifetime gross with position
- Ranked lifetime grosses by multiple areas in one query
Search Queries
Three examples using IMDb's built-in search capabilities:
- Text search for movie titles
- Text search for people by name
- Advanced search with multiple filters (genre, awards, date range, title type)
Before Running These Queries
All queries require your API credentials in the request headers:
Content-Type: application/graphql
x-api-key: YOUR_API_KEY
x-amzn-dataexchange-data-set-id: YOUR_DATA_SET_ID
revision-id: YOUR_REVISION_ID
asset-id: YOUR_ASSET_IDSee the Calling the API page for complete setup instructions for AWS CLI, Postman, TypeScript, Java, and Python.