TrailerAddict

TrailerAddict

Media

The TrailerAddict API was created for website publishers looking to easily embed trailers from TrailerAddict with variables under their control. Variables such as width, offset, trailer count, trailers by which film and more. The API responds with XML content. So some type of XML parses will be necessary to use the results provided.

Visit API

📚 Documentation & Examples

Everything you need to integrate with TrailerAddict

🚀 Quick Start Examples

TrailerAddict Javascript Examplejavascript
// TrailerAddict API Example
const response = await fetch('https://www.traileraddict.com/trailerapi', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Exploring the TrailerAddict API

TrailerAddict provides a public API for developers to access its movie trailers database. The API allows you to search for movie trailers, get information about movies, and access other related data. In this blog post, we will explore the TrailerAddict API and provide some example code in JavaScript.

Getting Started

Before we begin, you will need to sign up for an API key from TrailerAddict in order to use their API. After you have obtained a key, you can start making requests to the API.

API Endpoints

The TrailerAddict API has several endpoints that allow you to get different types of data about movies. Let's take a look at some of them:

Search for a Movie Trailer

If you want to search for a movie trailer, you can use the following endpoint:

https://api.traileraddict.com/v4/search/movie

To make a request to this endpoint, you will need to pass in a q parameter with the movie name or keyword you want to search for. Here's an example of how you can search for the trailer of the movie "Inception" using JavaScript:

const apiKey = 'your_api_key';
const movieName = 'inception';

fetch(`https://api.traileraddict.com/v4/search/movie?q=${movieName}&count=1&width=460&apikey=${apiKey}`)
  .then(response => response.json())
  .then(data => console.log(data));

Get Movie Information

If you want to get information about a specific movie, you can use the following endpoint:

https://api.traileraddict.com/v4/movie/info

To make a request to this endpoint, you will need to pass in a imdb parameter with the IMDb ID of the movie you want to get information about. Here's an example of how you can get information about the movie "Inception" using JavaScript:

const apiKey = 'your_api_key';
const imdbId = 'tt1375666';

fetch(`https://api.traileraddict.com/v4/movie/info?imdb=${imdbId}&width=460&apikey=${apiKey}`)
  .then(response => response.json())
  .then(data => console.log(data));

Get Movie Trailer Embed Code

If you want to get the embed code for a movie trailer, you can use the following endpoint:

https://api.traileraddict.com/v4/trailer/embed

To make a request to this endpoint, you will need to pass in a movie parameter with the IMDb ID of the movie you want to get the trailer for. Here's an example of how you can get the trailer embed code for the movie "Inception" using JavaScript:

const apiKey = 'your_api_key';
const imdbId = 'tt1375666';

fetch(`https://api.traileraddict.com/v4/trailer/embed?imdb=${imdbId}&width=460&autoplay=y&apikey=${apiKey}`)
  .then(response => response.text())
  .then(data => console.log(data));

Conclusion

In this blog post, we explored the TrailerAddict API and provided some example code in JavaScript. We looked at how to search for a movie trailer, get information about a movie and get the trailer embed code. The TrailerAddict API provides a lot of useful data for developers who are looking to build movie-related applications. Happy coding!

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 504008001440Minutes
Online
Offline

Related APIs in Media