71

Does anyone know of any (preferrably free) supported api's for accessing movie showtimes by zip code?

I don't believe any existing api's, such as netflix or imdb, provide this information.

  • 2
    Does anyone publish an actual api for this, like a web service? I'd hate to do screen scraping. I'd really love to write a phone or ipad app that had a timeline which showed what movies play nearby in the next 2 hours. No web page shows it this way,and it's typically how I want to see it. "What shows can I see in the next couple of hours?" I'd love to write the app if I can get the data. Any leads? JR –  Feb 07 '11 at 12:30

13 Answers13

14

when "allow_url_fopen" is disabled then use

    <?php
/**
 * Google Showtime grabber
 * 
 * This file will grab the last showtimes of theatres nearby your zipcode.
 * Please make the URL your own! You can also add parameters to this URL: 
 * &date=0|1|2|3 => today|1 day|2 days|etc.. 
 * &start=10 gets the second page etc...
 * 
 * Please download the latest version of simple_html_dom.php on sourceForge:
 * http://sourceforge.net/projects/simplehtmldom/files/
 * 
 * @author Bas van Dorst <info@basvandorst.nl>
 * @version 0.1 
 * @package GoogleShowtime
 *
 * @modifyed by stephen byrne <gold.mine.labs@gmail.com>
 * @GoldMinelabs.com 
 */

require_once('simple_html_dom.php');

$curl = curl_init(); 
curl_setopt($curl, CURLOPT_URL, 'http://www.google.ie/movies?near=dublin');  
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);  
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);  
$str = curl_exec($curl);  
curl_close($curl);  

$html = str_get_html($str);

print '<pre>';
foreach($html->find('#movie_results .theater') as $div) {
    // print theater and address info
    print "Theate:  ".$div->find('h2 a',0)->innertext."\n";
    //print "Address: ". $div->find('.info',0)->innertext."\n";

    // print all the movies with showtimes
    foreach($div->find('.movie') as $movie) {
        print "Movie:    ".$movie->find('.name a',0)->innertext.'<br />';
        print "Time:    ".$movie->find('.times',0)->innertext.'<br />';
    }
    print "\n\n";
}

// clean up memory
$html->clear();
?>
ste_burn
  • 157
  • 1
  • 2
8

Yep, Yahoo apparently removed their secret movie API in November 2009.
It seems everyone gets their data from TMS Data Direct: http://www.tmsdatadirect.com/

broox
  • 3,538
  • 33
  • 25
  • 1
    @Brook While signing up for http://www.tmsdatadirect.com/ it asks for certificate code, What value should be given while signing up? –  Feb 07 '11 at 12:30
  • That undocumented YAHOO api referenced above has been great... I've been using it for a while... unfortunately YAHOO has just made it disappear (after 11/4/09)... without some YAHOO authorization... and it doesn't look like they are giving that out! :( (I hope another idea above works out for me) -- Thomas – derks Feb 07 '11 at 12:31
  • Did Yahoo just remove their undocumented APIs? I can't access it anymore but I can't find anybody talking about it (the removal) either. –  Feb 07 '11 at 12:31
  • The link is dead now. – TheCarver Sep 14 '15 at 02:23
  • US and Canada only :-( – lrkwz Feb 06 '16 at 15:38
5

Don't know if Google exposes it as an api but this looks a lot like what you want. http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1

toad
  • 1,351
  • 8
  • 14
  • thanks for the suggestion. i've already implemented a screen scrape from this with python's beautifulsoup. but i'd like to avoid using this in the long term, as it's explicitly against their terms of service. hence the search for a supported/documented api. –  Jan 13 '09 at 18:23
  • 1
    This link as been discontinued by Google. Sorry. – Russell Hankins Jan 20 '20 at 03:56
1

After looking around a little bit, I found Dapper (open.dapper.net) to be a great solution for creating this type of feed...

Here is the feed I made, which takes a movie title and a zip code as parameters. (most others available only searched by ZIP)

http://www.dapper.net/dapp-howto-use.php?dappName=GoogleMoviesbynameANDzip

took about 5 minutes to set up...

bitless
  • 418
  • 4
  • 7
1

I too am looking for showtimes I can legitimately scrape and republish. Yahoo's sound like if you don't do it for commercial purposes, it's not prohibited... or maybe that's wishful thinking on my part.

You agree not to reproduce, duplicate, copy, sell, trade, resell or exploit for any commercial purposes, any portion or use of, or access to, the Yahoo! Services

MM.
  • 1,966
  • 4
  • 20
  • 24
1

sorry, should've searched a bit more before posting the question.

some creative searching on del.icio.us has revealed an undocumented yahoo! movies api (sample api call).

looks nice.

1

Fandango seems to have RSS feeds that allow you to search for movies near you.

They can be found here:

https://www.fandango.com/rss/moviefeed

Samg
  • 638
  • 1
  • 5
  • 17
1

Not sure if it's legal to scrape the html from this, but, it's the cleanest pseudo-API I've found. http://opensocial.flixster.com/igoogle/showtimes?date=20111025&postal=23226 - just scrape the html with something like...

$('div.showtime', response).each(function() {
   // ... process each showtime div
});
Ian Davis
  • 19,091
  • 30
  • 85
  • 133
0

I was also looking for a showtime API, and like you, I have not found a good API for the movie showtimes. I decided to write my own "showtime API", based on the Google Showtimes. Please check it out.

It is a simple PHP-script, but "it does what it should do":

    <?php
/**
 * Google Showtime grabber
 * 
 * This file will grab the last showtimes of theatres nearby your zipcode.
 * Please make the URL your own! You can also add parameters to this URL: 
 * &date=0|1|2|3 => today|1 day|2 days|etc.. 
 * 
 * Please download the latest version of simple_html_dom.php on sourceForge:
 * http://sourceforge.net/projects/simplehtmldom/files/
 * 
 * @author Bas van Dorst <info@basvandorst.nl>
 * @version 0.1 
 * @package GoogleShowtime
 */

require_once('simple_html_dom.phps');

$html = new simple_html_dom();
$html->load_file('http://www.google.nl/movies?mid=&hl=en&near=1400AB');

print '<pre>';
foreach($html->find('#movie_results .theater') as $div) {
    // print theater and address info
    print "Theate:  ".$div->find('h2 a',0)->innertext."\n";
    print "Address: ". $div->find('.info',0)->innertext."\n";

    // print all the movies with showtimes
    foreach($div->find('.movie') as $movie) {
        print "\tMovie:    ".$movie->find('.name a',0)->innertext.'<br />';
        print "\tTime:    ".$movie->find('.times',0)->innertext.'<br />';
    }
    print "\n\n";
}

// clean up memory
$html->clear();

?> 

Example: http:// code.basvd.nl/showtime_grabber_0.1/Google_showtime.php

Download simple_html_dom.php: http:// code.basvd.nl/showtime_grabber_0.1/

  • 9
    Be aware that although it does extract Google's content properly, it is completely against Google's Terms of Service. Use with caution. – Gabriel S. Feb 02 '11 at 11:02
0

My guess is that your best bet on that (unless these guys have RSS feeds) would be to scrape the HTML with a language that supports regular expressions.

Mind you, that's ugly and every time they change their code, yours -could- break.

user54650
  • 4,388
  • 2
  • 24
  • 27
  • 1
    unfortunately none of them have rss. the scraping isn't bad with a decent html parser. but i'm more worried about violating terms of service than having to update code every once in a while. –  Jan 13 '09 at 18:24
0

I can't find one.

You could try screen-scraping from Yahoo Movies: http://movies.yahoo.com/showtimes/movie?z=60630&date=20090113&mid=1810038822

z    = zip code
date = year + month + day (as a string)
mid  = movieID, which you will have to grab from Yahoo Movies
EndangeredMassa
  • 17,208
  • 8
  • 55
  • 79
-1

I know this is a bit old. I don't think there is an api for this yet but some providers do offer this service. I suggest you look at West World Media.

Tunde Dev
  • 163
  • 1
  • 1
  • 10
-3
http://www.google.com/ig/api?movies=YOUR_ZIP_HERE

Thanks to Nick. that's the link I will be using.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Geek Devigner
  • 349
  • 2
  • 12
  • view source on your browser after you paste it (mod it) and hit enter. an xml object is there with children and your movie list. if you see nothing, check for errors. – Geek Devigner Feb 26 '11 at 06:59
  • 2
    This doesn't work. It's the same listing every time with just the zipcode changed. I'm guessing it's used for testing purposes internally by Google. – henry74 May 17 '11 at 01:04
  • @henry74, it's an iGoogle API. It's paged showing 3 at a time, that's why it's always the same response. – bzlm Oct 21 '13 at 20:00