Screenpick

Screenpick API Documentation

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

Introduction

The AI Movie Recommender is a web application that uses AI to help you discover your next favorite movie. The application is built with Next.js, React, and Tailwind CSS. It uses the TMDB API to fetch movie data and the OpenAI API to generate movie recommendations based on your preferences. To get started with the application, simply type in the search bar and press enter. The application will then display a list of movies that match your search query. You can click on a movie to view its details, including its title, release year, genres, and a short summary.

Our API is RESTful and returns responses in JSON format. All API requests must be made over HTTPS.

Base URL

https://screenpick.fun/api/

Authentication

All API requests require authentication using an API key. You can obtain an API key by signing up for a developer account on the Screenpick platform.

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

Security Note

Keep your API key secure and never expose it in client-side code. Always make API requests from your server.

Rate Limits

To ensure fair usage and service stability, the Screenpick API implements rate limiting.

PlanRate Limit
Free15 requests per day
Basic2,500 requests per day
Pro10,000 requests per day
EnterpriseCustom limits

Rate limit information is included in the response headers:

  • X-RateLimit-Limit: The maximum number of requests allowed per day
  • X-RateLimit-Remaining: The number of requests remaining in the current period
  • X-RateLimit-Reset: The time at which the current rate limit window resets (Unix timestamp)

Endpoints

POST/api/search

Get Movie Recommendations

Get personalized movie recommendations based on a text prompt.

Parameters

NameTypeRequiredDescription
promptstringYesThe text prompt describing the type of movies the user is looking for.

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 nephe...",
      "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 POST https://screenpick.fun/api/search?q=sad+movies+with+time+travel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Sci-fi movies with time travel",
    "limit": 4,
    "include_details": true
  }'
GET/api/getID

GET Movie ID (TMDB/IMDb)

Get detailed information about a specific movie.

Parameters

NameTypeRequiredDescription
titlestringYesTitle of the movie.

Response

{
  "title": "La La Land (2016)",
  "imdb": "tt126361",
  "tmdb": "34661"
}

Code Examples

curl -X GET https://screenpick.fun/api/getID?title=La+La+Land',
 \
  -H "Authorization: Bearer YOUR_API_KEY"

Error Handling

The Screenpick API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g., a required parameter was missing), and codes in the 5xx range indicate an error with our servers.

CodeDescription
200 - OKThe request was successful.
400 - Bad RequestThe request was invalid or cannot be otherwise served.
401 - UnauthorizedAuthentication credentials were missing or incorrect.
403 - ForbiddenThe request is understood, but it has been refused or access is not allowed.
404 - Not FoundThe requested resource could not be found.
429 - Too Many RequestsYou have exceeded the rate limit.
500 - Internal Server ErrorSomething went wrong on our end.

Error Response Format

When an error occurs, the API will return a JSON object with the following structure:

{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid. Please check your parameters.",
    "details": "The 'prompt' parameter is required."
  }
}

Ready to integrate Screenpick into your application?

Sign up for a free API key and start building with Screenpick today.