Login
Trailer Addict





Not what your were hoping for? Check out the film database or browse past featured trailers.
TRAILER ADDICT API
The TrailerAddict API was created for website publishers looking to easily embed trailers from TrailerAddict with variables under their control.

The TrailerAddict API currently allows for easy embedding of trailers with variables such as width, offset, trailer count, trailers by which film and more. Not only does this page provide web publishers with links and variables to use the API, but coding examples as well.

The TrailerAddict API delivers content in XML, so some type of XML parser will be necessary to use the results provided.

At this point in time, the API does NOT require an API_KEY to work. If the API were to receive too much abuse, an API_KEY requirement will be instated.
API SOURCE
http://api.traileraddict.com/

API VARIABLES
Width: In pixels. Provide a width and the height will be created dynamically. If no width variable is provided, the player will default to 450px. Example: width=480

Count: Choose between one to eight trailers to list in the XML. The default number of trailers depends on other variables provided. Eight is the max allowed. Example: count=5

Featured: Yes or No. If featured variable does not exist, the API will default to yes. This will list all trailers TrailerAddict deems popular or important. If featured is set to 'no', then the most recent trailer additions will be listed. Example: featured=yes

Film: Want to list trailers by a particular film? Then you need the film keyword. To find this, just go to the film's page on TrailerAddict. Assuming you want all the trailers for Max Payne, you'd go to the film's page and, in the URL, you'll see: traileraddict.com/tags/max-payne. The keyword for Max Payne is max-payne. Example: film=max-payne

Actor: Want to list trailers only by a particular actor? Then you need the actor's keyword. To find this, go to the actor's page on TrailerAddict. Assuming you want all the trailers with Brad Pitt in them, you'd go to his page and, in the URL, you'll see: traileraddict.com/tags/brad-pitt. The keyword for Brad Pitt is brad-pitt.

Please note that while the variables WIDTH and COUNT work with all API requests, FEATURED, ACTOR and FILM are their very own functions and cannot be combined.
EXAMPLES
You want a single featured trailer that rotates on your site dynamically:

http://api.traileraddict.com/?featured=yes

You want an XML to list the last 6 featured trailers on TrailerAddict:

http://api.traileraddict.com/?featured=yes&count=6

You want an XML to list the last 4 featured trailers on TrailerAddict, but you want the embed width to be 720px:

http://api.traileraddict.com/?featured=yes&count=4&width=720

You want the last three trailers released for The Curious Case of Benjamin Button.

http://api.traileraddict.com/?film=curious-case-benjamin-button&count=3

You want the most recent trailer featuring Gerard Butler:

http://api.traileraddict.com/?actor=gerard-butler

You want eight of the most recent trailers featuring Kate Beckinsale. But you also want the trailer to be 640px wide:

http://api.traileraddict.com/?actor=kate-beckinsale&count=8&width=640
PARSING THE API (PHP 5)
Once you have decided on which option(s) to choose, you can parse the API easily through PHP*:

<?php
$upcoming 
simplexml_load_file("http://api.traileraddict.com/?featured=yes&count=2");

foreach(
$upcoming->trailer as $x => $updates)
{
   echo 
$updates->title;
   echo 
'<br>';
   echo 
'<span style="font-size:x-small">Source: <a href="'$updates->link .'">TrailerAddict</a></span>';
   echo 
'<br>';
   
//now echo the embedded trailer
   
echo $updates->embed;
   echo 
'<br><br>';    
    
    }
    
?>
See what this creates by going here.

*The XML can be parsed with options other than PHP. If you have PHP 4, there is a great parsing function here with instructions.

More examples can be seen below.
LATEST FEATURE TRAILER
If you want to feature the latest featured trailer from TrailerAddict (embed code only), you can do so by using the following code:

<?php
$upcoming 
simplexml_load_file("http://api.traileraddict.com/?featured=yes");

foreach(
$upcoming->trailer as $x => $updates)
{
   
   
//embed trailer
   
echo $updates->embed;
    
    }
    
?>
See what this creates by going here.
LIST 8 LINKS TO TRAILERS FOR THE DARK KNIGHT
If you were looking to create a list of links to trailers for a given film, this would be one way to do it:

<?php
$upcoming 
simplexml_load_file("http://api.traileraddict.com/?film=the-dark-knight&count=8");

foreach(
$upcoming->trailer as $x => $updates)
{
   
    echo 
'<a href="'$updates->link .'">'$updates->title .'</a><br />';
    }
    
    
?>
See what this creates by going here.
LIST 4 OF THE LATEST TRAILERS W/PHILIP SEYMOUR HOFFMAN
Not only do you want the four latest trailers featuring Philip Seymour Hoffman, but your page can handle video widths up to 740px:

<?php
$upcoming 
simplexml_load_file("http://api.traileraddict.com/?actor=philip-seymour-hoffman&count=4&width=740");

foreach(
$upcoming->trailer as $x => $updates)
{
   
   echo 
$updates->embed;
   echo 
'<br><br>';    
    }
    
?>
See what this creates by going here.
Clash of the Titans - Trailer
Worth Watching

Nine - Feature Trailer
Extraordinary Measures - Trailer
Kick-Ass - Teaser Trailer
Sponsors Like Trailers!

Watching Now


Were the World Mine


Trailer
Rating:
Runtime: 2m21s | Views: 2,867

Wanted


Superbowl TV Spot - 'Choice'
Rating:
Runtime: 0m31s | Views: 4,982

Watchmen


TV Spot #4
Rating:
Runtime: 0m31s | Views: 5,370

Love Happens


Interview - Martin Sheen
Rating:
Runtime: 2m1s | Views: 801

The Incredible Hulk


Behind the Scenes
Rating:
Runtime: 2m35s | Views: 2,655

Up in the Air


Interview - Eric Steelberg
Rating:
Runtime: 0m51s | Views: 160

The Stepfather


TV Spot - Protect
Rating:
Runtime: 0m34s | Views: 916
Trailer Feed
RSS
 
Are You a Trailer Addict?


Trailer Addict has setup TA, Trailers Anoymous. Feel free to contact us at with your scoops, comments or advertising inquiries at the following email address.

TA Email