How to Use the OpenSubtitles API: The Complete Developer’s Guide for Subtitle Integration

Learn how to integrate the OpenSubtitles API into your applications for automated subtitle search, download, and AI-powered translation. This developer-focused guide covers API setup, authentication, best practices, and how tools like Apidog can streamline your API workflow.

INEZA Felin-Michel

INEZA Felin-Michel

31 January 2026

How to Use the OpenSubtitles API: The Complete Developer’s Guide for Subtitle Integration

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Subtitles are essential for accessibility, breaking language barriers, and enhancing the viewing experience for global audiences. For API developers building media players, language tools, or content platforms, integrating subtitle functionality can make or break user engagement. The OpenSubtitles API stands out as a robust solution, offering direct access to one of the largest subtitle repositories in the world.

This article is a comprehensive, developer-focused guide to the OpenSubtitles API. You’ll learn how to authenticate, search, download, and even translate subtitles—plus best practices for seamless integration. Whether you’re building a new product or upgrading your current workflow, this guide is for you.

💡 Looking for an API platform that makes testing, documentation, and team collaboration effortless? Apidog offers an all-in-one solution—see how it compares to Postman and why it’s trusted by API-focused teams.

Image

button

What Is the OpenSubtitles API?

The OpenSubtitles API is a RESTful interface for programmatic access to the OpenSubtitles subtitle database. Instead of manually downloading subtitle files, you can automate searches, downloads, and even AI-driven translations directly within your application.

Core capabilities include:

This API is purpose-built for developers who want to enrich their platforms with multilingual subtitle support.


Getting Started: Prerequisites and Setup

Before making API calls, ensure you have the following in place:

1. API Endpoint

All requests use the base URL:

https://api.opensubtitles.com/api/v1

Append the specific resource paths (e.g., /subtitles, /download) as needed.

2. Account Registration & API Key

3. Authentication Methods

The API supports two main authentication flows:

4. Required Headers

Every API call should include:

5. Rate Limiting

OpenSubtitles enforces rate limits. Pay close attention to these response headers:

Implement logic to gracefully handle limits—queue requests or back off as needed.


Authenticating with the /login Endpoint

To perform user-specific operations or unlock higher quotas, authenticate with /login:

Endpoint:
POST /login

Request:

{
  "username": "your_opensubtitles_username",
  "password": "your_opensubtitles_password"
}

Headers:

Content-Type: application/json
Accept: application/json
Api-Key: YOUR_API_KEY
User-Agent: YourAppName v1.0

Response (success):

{
  "user": { ... },
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "status": 200
}

Use the token as your JWT in the Authorization header for future requests. JWTs may expire, so be prepared to re-authenticate as needed.


Searching for Subtitles: /subtitles Endpoint

The /subtitles endpoint is your gateway to the subtitle database.

Endpoint:
GET /subtitles

Authentication:
Api-Key (required), plus Authorization: Bearer JWT if needed.

Common Query Parameters:

Parameter Description Example
query Search by movie or episode title query=Inception
imdb_id IMDb ID for exact match imdb_id=tt1375666
tmdb_id TMDb ID for movies tmdb_id=27205
languages Comma-separated ISO 639-2B codes languages=en,es
moviehash Unique hash from video file for highest accuracy moviehash=abc123...
type Filter by media type (movie or episode) type=movie
hearing_impaired Filter for hearing-impaired subtitles hearing_impaired=only
order_by Sort by field (e.g., download_count) order_by=download_count

Example: Find English subtitles for "Inception" using TMDb ID

GET /api/v1/subtitles?tmdb_id=27205&languages=en HTTP/1.1
Host: api.opensubtitles.com
Api-Key: YOUR_API_KEY
User-Agent: MySubtitleApp v1.0
Accept: application/json

Sample Response (truncated):

{
  "data": [
    {
      "id": "1234567",
      "attributes": {
        "language": "en",
        "download_count": 500000,
        "files": [
          { "file_id": 998877, "file_name": "Inception.2010.720p.BluRay.x264-REWARD.srt" }
        ],
        "feature_details": {
          "title": "Inception",
          "imdb_id": "tt1375666"
        }
      }
    }
  ]
}

Tip: The file_id inside the files array is required for downloads.


Downloading Subtitles: /download Endpoint

After identifying the subtitle file, obtain a download link:

Endpoint:
POST /download

Request Body:

{
  "file_id": 998877
}

Headers:
Include your Api-Key, Authorization: Bearer YOUR_JWT_TOKEN (if required), and User-Agent.

Response:

{
  "link": "https://dl.opensubtitles.org/en/download/sub/1234567?...",
  "file_name": "Inception.2010.720p.BluRay.x264-REWARD.srt",
  "remaining": 95,
  "reset_time": "2023-10-27T12:00:00Z"
}

To download the subtitle:
Make an HTTP GET request to the link URL—no additional headers needed. Save the file using the provided file_name.

Note: Download links are temporary. Always request a fresh link before each download.


Translating Subtitles with AI: /ai-translation Endpoint

OpenSubtitles provides AI-powered translation for subtitles, expanding accessibility to more languages.

Endpoint:
POST /ai-translation (Check documentation for latest info)

Request Example:

{
  "file_id": 998877,
  "target_language": "de"
}

Use Cases:


Best Practices for OpenSubtitles API Integration

Follow these guidelines for a robust, user-friendly integration:

Tip: For streamlined API testing, request/response validation, and documentation, consider an integrated platform like Apidog to speed up your development workflow.


Developer Tools, Wrappers, and Community Resources

You don’t have to start from scratch. Explore these resources:

Understanding the underlying REST endpoints is still essential for debugging and advanced scenarios.


API Subscription Tiers and Pricing

OpenSubtitles offers different levels of API access:

Check the official OpenSubtitles API documentation for up-to-date pricing and feature comparisons. Select a plan that fits your projected traffic and use cases.


Conclusion

The OpenSubtitles API is a powerful resource for developers looking to integrate subtitles at scale. By leveraging its REST endpoints for search, download, and translation—and following best practices for authentication, rate limiting, and error handling—you can deliver seamless subtitle experiences to your users.

Combine the OpenSubtitles API with a robust API platform like Apidog for rapid development, automated testing, and collaborative documentation. This approach not only accelerates integration but also ensures reliability across your API-driven products.

button

Explore more

Claude Opus 5 Pricing: The Full Cost Breakdown (2026)

Claude Opus 5 Pricing: The Full Cost Breakdown (2026)

Claude Opus 5 pricing in full: $5/$25 base rates, cache, batch and fast mode, worked cost-per-task math, and the levers that actually cut your bill.

25 July 2026

What Is Claude Opus 5? Specs, Benchmarks, and Pricing

What Is Claude Opus 5? Specs, Benchmarks, and Pricing

Claude Opus 5 explained: the July 2026 launch, model ID, 1M context, May 2026 cutoff, $5/$25 pricing vs Fable 5, Anthropic's benchmark claims, and the honest ceiling.

25 July 2026

Do You Still Need an API Client if You Use Cursor or Copilot?

Do You Still Need an API Client if You Use Cursor or Copilot?

Cursor and Copilot write good first-draft API calls, but they guess your endpoints and cannot run what they wrote. Where an API client still fits in 2026.

23 July 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

How to Use the OpenSubtitles API: The Complete Developer’s Guide for Subtitle Integration