API Documentation

Developer
Documentation

Integrate our powerful movie recommendation API into your applications with ease. Get started in minutes with our comprehensive guides and examples.

Screenpick API
Documentation

Integrate AI-powered movie recommendations into your applications with our simple and powerful API.

Introduction

Welcome to the Screenpick API – your gateway to intelligent, AI-powered movie discovery. Our sophisticated recommendation engine leverages advanced machine learning algorithms to understand natural language queries and deliver personalized movie suggestions that match your exact preferences, mood, or specific criteria.

What Makes Screenpick Special

  • Natural Language Processing: Describe what you want in plain English – no complex filters needed
  • Contextual Understanding: Our AI grasps nuanced requests like "uplifting movies for rainy days" or "mind-bending sci-fi without horror elements"
  • Rich Movie Data: Get comprehensive movie information from The Movie Database (TMDb) including ratings, release dates, and plot summaries
  • Cross-Database Integration: Seamlessly retrieve both TMDb and IMDb identifiers for external integrations

Perfect For Developers

Integrate intelligent movie recommendations into your apps, websites, or services. Our RESTful API is designed for easy integration with comprehensive documentation and code examples.

Enterprise Ready

Built with scalability and reliability in mind, featuring rate limiting, comprehensive error handling, and multiple authentication options to meet enterprise requirements.

API Architecture

The Screenpick API follows RESTful principles and returns responses in JSON format. All endpoints support CORS for browser-based applications and require HTTPS for secure communication. Our API is built on a modern, scalable infrastructure ensuring fast response times and high availability.

Base URL

https://screenpick.fun/api/

💡 Pro Tip

Start with our health check endpoint (/api/ping) to verify connectivity, then explore our AI recommendations endpoint with simple queries like "popular comedies" or "award-winning dramas from the 2010s" to see the power of our natural language processing.

Authentication

The Screenpick API uses API key authentication to ensure secure access to our services. All API requests require a valid API key that identifies your application and tracks usage against your plan limits.

Getting Your API Key

  1. Visit RapidAPI Marketplace
  2. Create a free RapidAPI account or sign in
  3. Subscribe to the Screenpick API plan that fits your needs
  4. Copy your unique API key from the dashboard

Authentication Methods

  • Authorization Header: Bearer token (recommended)
  • X-RapidAPI-Key Header: Direct API key
  • Query Parameter: apiKey parameter (for testing only)

Authentication Methods

Method 1: Authorization Header (Recommended)

Include your API key in the Authorization header using the Bearer token format:

Authorization: Bearer YOUR_API_KEY

Method 2: X-RapidAPI-Key Header

For RapidAPI integration, use the X-RapidAPI-Key header:

X-RapidAPI-Key: YOUR_RAPIDAPI_KEY

Method 3: Query Parameter (Testing Only)

For quick testing, you can include the API key as a query parameter:

https://screenpick.fun/api/search?apiKey=YOUR_API_KEY&q=action+movies

⚠️ Not recommended for production use due to potential exposure in logs

🔒 Security Best Practices

  • Never expose API keys in client-side code – Always make API calls from your server
  • Store API keys as environment variables – Don't hardcode them in your source code
  • Implement rate limiting on your end to avoid hitting API limits unexpectedly
  • Monitor your usage regularly through the RapidAPI dashboard
  • Rotate API keys periodically for enhanced security

Example Authentication Headers

cURL:

curl -H "Authorization: Bearer your_api_key_here"

JavaScript (fetch):

headers: { 'Authorization': 'Bearer your_api_key_here' }

Python (requests):

headers = {'Authorization': 'Bearer your_api_key_here'}

Rate Limits

To ensure fair usage and maintain optimal service performance for all users, the Screenpick API implements intelligent rate limiting. Our rate limits are designed to accommodate both casual developers and high-volume enterprise applications.

How Rate Limiting Works

Sliding Window

We use a sliding window approach that provides more flexible usage patterns compared to fixed windows.

Per-Key Tracking

Rate limits are tracked individually for each API key, ensuring your usage doesn't affect others.

Rate Limit Tiers

PlanDaily RequestsPer MinuteFeaturesBest For
Free
15 requests1 requestBasic AI recommendationsTesting & prototyping
Basic
2,500 requests10 requestsAll endpoints + priority supportSmall applications
Pro
10,000 requests50 requestsEnhanced AI + analytics dashboardProduction apps
Enterprise
Custom limitsCustom burstWhite-label + SLA + dedicated supportHigh-volume enterprise

Rate Limit Headers

Every API response includes rate limit information in the headers:

  • X-RateLimit-LimitDaily limit
  • X-RateLimit-RemainingRemaining requests
  • X-RateLimit-ResetReset timestamp
  • X-RateLimit-WindowWindow period

Handling Rate Limits

Best practices for rate limit management:

  • Check rate limit headers in responses
  • Implement exponential backoff for 429 errors
  • Cache responses when possible
  • Use batch requests for multiple queries

⚡ Rate Limit Response (HTTP 429)

When you exceed your rate limit, you'll receive a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded",
  "message": "You have exceeded your daily request limit. Please upgrade your plan or try again tomorrow.",
  "limit": 15,
  "remaining": 0,
  "resetTime": "2024-01-01T00:00:00Z"
}

Endpoints

GET/api/search

Get AI Movie Recommendations

Generate personalized movie recommendations using advanced AI. Simply describe what you're looking for, and our intelligent system will suggest movies tailored to your preferences, mood, or specific criteria.

Parameters

NameTypeLocationRequiredDescription
qstringqueryYesNatural language query describing the type of movies you want. Examples: 'romantic comedies from the 90s', 'sci-fi movies with time travel', 'feel-good animated movies for kids'.
AuthorizationstringheaderYesBearer token for API authentication (Authorization: Bearer YOUR_API_KEY) or X-RapidAPI-Key header.

Response Format

JSON Response
{
  "movies": [
    {
      "adult": false,
      "backdrop_path": "/wj2nLa0vfS0SLu2vJ6ABTRhMrok.jpg",
      "genre_ids": [
        18
      ],
      "id": 334541,
      "original_language": "en",
      "original_title": "Manchester by the Sea",
      "overview": "After his older brother passes away, Lee Chandler is forced to return home to care for his 16-year-old nephew...",
      "popularity": 37.713,
      "poster_path": "/o9VXYOuaJxCEKOxbA86xqtwmqYn.jpg",
      "release_date": "2016-11-18",
      "title": "Manchester by the Sea",
      "video": false,
      "vote_average": 7.5,
      "vote_count": 5868
    }
  ]
}

Code Examples

curl -X GET "https://screenpick.fun/api/search?q=romantic%20comedies%20from%20the%2090s" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
GET/api/getID

Get Movie Database IDs

Retrieve TMDb and IMDb identifiers for movies by title. This endpoint searches our comprehensive movie database and returns matching entries with their corresponding database IDs.

Parameters

NameTypeLocationRequiredDescription
titlestringqueryYesThe movie title to search for. Partial matches are supported (e.g., 'La La Land', 'Inception', 'The Dark Knight').
AuthorizationstringheaderYesBearer token for API authentication or X-RapidAPI-Key header.

Response Format

JSON Response
[
  {
    "title": "La La Land (2016)",
    "imdb": "tt3783958",
    "tmdb": "313369"
  },
  {
    "title": "La La Land (Short 2014)",
    "imdb": "tt4282966",
    "tmdb": "285473"
  }
]

Code Examples

curl -X GET "https://screenpick.fun/api/getID?title=La%20La%20Land" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/ping

Health Check

Simple endpoint to check if the API is running and accessible. Returns the current status of the service.

Parameters

No parameters required for this endpoint.

Response Format

JSON Response
{
  "status": "ok"
}

Code Examples

curl -X GET "https://screenpick.fun/api/ping"

Error Handling

The Screenpick API uses conventional HTTP response codes to indicate the success or failure of requests. Our error responses include detailed information to help you quickly identify and resolve issues.

HTTP Status Codes

CodeStatusDescription
200OKRequest completed successfully
400Bad RequestInvalid request parameters or malformed request
401UnauthorizedMissing or invalid API key
403ForbiddenValid API key but insufficient permissions
404Not FoundRequested resource or endpoint doesn't exist
429Too Many RequestsRate limit exceeded - slow down your requests
500Internal Server ErrorSomething went wrong on our servers
503Service UnavailableAPI is temporarily down for maintenance

Error Response Format

When an error occurs, the API returns a structured JSON response with detailed error information to help you understand and resolve the issue quickly:

Standard Error Response
{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid. Please check your parameters.",
    "details": "The 'q' parameter is required for movie recommendations.",
    "timestamp": "2024-01-15T10:30:00Z",
    "requestId": "req_abc123def456"
  }
}

Common Error Codes

  • missing_parameter - Required parameter not provided
  • invalid_api_key - API key is malformed or invalid
  • rate_limit_exceeded - Too many requests sent
  • service_unavailable - AI service temporarily down
  • query_too_long - Search query exceeds maximum length

Error Handling Best Practices

  • Always check the HTTP status code first
  • Parse the error response JSON for detailed information
  • Implement exponential backoff for 429 and 5xx errors
  • Log the requestId for support tickets
  • Show user-friendly messages based on error types

Example Error Handling Code

async function handleApiResponse(response) {
  if (!response.ok) {
    const errorData = await response.json();
    
    switch (response.status) {
      case 400:
        throw new Error(`Bad Request: ${errorData.error.message}`);
      case 401:
        throw new Error('Invalid API key. Please check your credentials.');
      case 429:
        const retryAfter = response.headers.get('Retry-After') || 60;
        throw new Error(`Rate limit exceeded. Retry after ${retryAfter} seconds.`);
      case 500:
        throw new Error('Server error. Please try again later.');
      default:
        throw new Error(`API Error: ${errorData.error.message}`);
    }
  }
  
  return await response.json();
}

SDKs & Libraries

While the Screenpick API is simple enough to use with any HTTP library, we've created SDKs and helper libraries to make integration even easier. These libraries handle authentication, error handling, and provide convenient methods for common use cases.

JS

JavaScript SDK

Full-featured SDK for browser and Node.js environments with TypeScript support.

npm install screenpick-js
View on GitHub →
PY

Python SDK

Pythonic SDK with async support, perfect for data science and web applications.

pip install screenpick-python
View on PyPI →
GO

Go SDK

Lightweight and fast Go client with built-in concurrency support.

go get github.com/screenpick/go-sdk
View on GitHub →

Quick Start Examples

screenpick-js SDK
import { ScreenpickClient } from 'screenpick-js';

// Initialize the client
const client = new ScreenpickClient({
  apiKey: 'your_api_key_here',
  timeout: 10000, // 10 seconds
});

// Get movie recommendations
async function getRecommendations() {
  try {
    const movies = await client.recommendations.search({
      query: 'romantic comedies from the 90s',
      limit: 10
    });
    
    console.log(`Found ${movies.length} recommendations:`);
    movies.forEach(movie => {
      console.log(`- ${movie.title} (${movie.release_date?.split('-')[0]})`);
    });
    
    return movies;
  } catch (error) {
    if (error.code === 'RATE_LIMIT_EXCEEDED') {
      console.log('Rate limit hit, waiting before retry...');
      await client.waitForRateLimit();
      return getRecommendations(); // Retry
    }
    throw error;
  }
}

// Get movie IDs
async function getMovieIDs(title) {
  const ids = await client.movies.getIDs(title);
  return ids;
}

// Check API health
const isHealthy = await client.health.check();

🛠️ Community Libraries

Don't see your favorite language? The community has created unofficial libraries:

Ready to Build Something Amazing?

Join thousands of developers who are already using Screenpick to power their movie recommendation features. Get started with our free tier and scale as you grow.

✅ Free Tier Available
15 requests/day to get started
⚡ Fast Integration
RESTful API with SDKs
🧠 AI-Powered
Natural language processing

Need help getting started? Check out our quickstart guide or contact our support team.

Why Choose Our API

Developer-First Movie Recommendation API

Built for developers who need reliable, fast, and intelligent movie recommendations. Our API combines cutting-edge AI with developer-friendly design.

Simple Integration

RESTful API with clear endpoints and comprehensive documentation for quick implementation

Lightning Fast

Sub-second response times with globally distributed infrastructure and optimized caching

Enterprise Security

API key authentication, rate limiting, and HTTPS encryption for secure data transmission

Global CDN

Worldwide availability with 99.9% uptime SLA and automatic failover protection

Advanced AI

Powered by state-of-the-art machine learning models trained on vast movie databases

Rich Metadata

Comprehensive movie information including ratings, genres, cast, and detailed descriptions

Ready to discover your next favorite movie?

Join thousands of movie lovers finding perfect recommendations