The following is composed from answers kindly supplied by Hank Bromley, Karen Coyle, George Oates, and Alexis Rossi from the archive.org team. I have mixed together various helpful replies and retro-fitted them to a howto/faq style summary.
I asked about APIs and data access for descriptions of the many and varied videos in Archive.org. This guide should help you get started with building things that use archive.org videos. Since the content up there is pretty much unencumbered, it is perfect for researchers looking for content to use in demos. Or something to watch in the evening.
To paraphrase their answer, it was roughly along these lines:
- you can do automated lookups of the search engine using a simple HTTP/JSON API
- downloading a lot or everything is ok if you need or prefer to work locally, but please write careful scripts
- hopefully the search interface is useful and can avoid you needing to do this
Short API overview: each archive entry that is a movie, video or tv file should have a type ‘movie’. Everything in the archive has a short textual ID, and an XML description at a predictable URL. You can find those by using the JSON flavour of the archive’s search engine, then download the XML (and content itself) at your leisure. Please cache where possible!
I was also pointed to http://deweymusic.org/ which is an example of a site that provides a new front-end for archive.org audio content – their live music collection. My hope in posting these notes here is to help people working on new interfaces to Web-connected TV explore archive.org materials in their work.
JSON API to archive.org services
We have been moving the majority of our services from formats like XML, OAI and other to the more modern JSON format and method of client/server interaction.
How to … play well with others
As we do not have unlimited resources behind our services, we request that users try to cache results where they can for the more high traffic and popular installations/uses. 8-)
TV content in the archive
The archive contains a lot of video files; old movies, educational clips, all sorts of fun stuff. There is also some work on reflecting broadcast TV into the system:
First off, we do have some television content available on the site right now:
http://www.archive.org/details/tvarchive – It’s just a couple of SF gov channels, so the content itself is not terribly exciting. But what IS cool is that this being recorded directly off air and then thrown into publicly available items on archive.org automatically. We’re recording other channels as well, but we currently aren’t sure what we can make public and how.
How to… get all metadata
If you really would rather download all the metadata and put it in their own search engine or database, it’s simple to do: get a list of the identifiers of all video items from the search engine (mediatype:movies), and for each one, fetch this file:
So it’s a bit of work since you have to retrieve each metadata record separately, but perhaps it is easily programmable.
However, once you have the identifier for an item, you can automatically find the meta.xml for it (or the files.xml if that’s what you want). So if the item is at:
the meta.xml is at
and the files.xml is at
This is true for every single item in the archive.
How to… get a list of all IDs
Basically, you put in a query, choose the metadata you want returned, then choose the format you’d like it delivered in (rss, csv, json, etc.).
Downsides to this method – you can only get about 10,000 items at once (you might be able to push it to 20,000) before it crashes on you, and you can only get the metadata fields listed.
How to… monitor updates with RSS?
Once you have a full dump, you can monitor incoming items via the RSS feed on this page:
Subtitles / closed captions
For the live TV collection, there should be extracted subtitles. Maybe I just found bad examples. (e.g
Todo: more info here!
What does the Archive search engine index?
In general *everything* in the meta.xml files is indexed in the IA search engine, and accessible for scripted queries at http://www.archive.org/advancedsearch.php.
But it may be that the search engine will support whatever queries you want to make, without your having to copy all the metadata to your own site.
How many “movies” are in the database?
Currently 314,624 “movies” items in the search engine. All tv and video items are supposed to be have “movies” for their mediatype, although there has been some leakage now and then.
Should I expect a valid XML file for each id?
eg. “identifier”:”mosaic20031001″ seemed problematic.
There are definitely items on the archive that have extremely minimally filled outmeta.xml files.
Response from a trouble report:
“I looked at a couple of your examples, i.e. http://www.archive.org/details/HomeElec, and they do have a meta.xml file in our system… but it ONLY contains a mediatype (movies) and identifier and nothing else. That seems to be making our site freak out. There are at least 800 items in movies that do not have a title. There might be other minimal metadata that is required for us to think it’s a real item, but my guess is that if you did a search like this one you’d see fewer of those errors:
The other error you might see is “The item is not available due to issues with the item’s content.” This is an item that has been taken down but for some reason it did not get taken out of the SE – it’s not super common, but it does happen.
I don’t think we’ve done anything with autocomplete on the Archive search engine, although one can use wildcards to find all possible completions by doing a query. For example, the query:
will match all items whose titles contain any words that start with “open” – that sample result of ten items shows titles containing “open,” “opening,” and “opener.”
How can I autocomplete against archive.org metadata?
Not at the moment.
“I believe autocomplete *has* been explored with the search engine on our “Open Library” sister site, openlibrary.org.”