Getting Started

OS Dev

Last Update 5 maanden geleden

The OpenSubtitles API is a powerful RESTful service that allows developers to access a vast database of movie and TV show subtitles. This guide will walk you through the steps required to start using the API and integrate it into your applications.


Step 1: Register for an Account
To begin using the OpenSubtitles API, you'll need to create an account on the OpenSubtitles website. If you don’t already have an account, you can sign up here. If you had an account on the old OpenSubtitles.org site, you can easily import your account details here.

more information in this article

Step 2: Create an API Key
Once your account is set up, navigate to the API Consumers section of your profile to create an API key. This key is essential for authenticating your API requests and tracking your usage. It must be included in every request made to the API.
Step 3: Explore the API Documentation
Familiarize yourself with the OpenSubtitles API documentation available here. This documentation details the available endpoints, required parameters, and response formats, helping you understand how to interact with the API effectively.
Step 4: Experiment with the API

You can use tools like Postman or Insomnia to test the OpenSubtitles API. For easier integration, export the API endpoints directly from the documentation and import them into your REST client.

For example, to search for English subtitles for the movie "The Matrix", use the following cURL command:

Step 5: Follow Best Practices

To ensure smooth integration, adhere to the best practices outlined in the API documentation. Key points include:

  • Handle HTTP Redirects: Always use the --location parameter in cURL to follow redirects.
  • Set a Valid User-Agent: Include your application name and version in the User-Agent header.
  • Optimize API Requests: Send GET parameters in alphabetical order and use + instead of %20 for spaces.
Step 6: Understand Quotas and Limits

While there is no limit on searching for subtitles, downloading is restricted:

  • Anonymous Users: 5 downloads per 24 hours per IP.
  • Authenticated Users: Depending on their rank, users can download more subtitles—from 10 for regular users to 1000 for VIP users.

To request more downloads or premium API keys, you can purchase a pro package

Was this article helpful?

0 out of 0 liked this article