Internet Archive API
, (*1)
A library to call archive.org's search API.
Please use GitHub to raise any issues and suggest any improvements., (*2)
Install
composer require votemike/internetarchiveapi, (*3)
Usage
Create a new instance of Api
passing in a Guzzle Client with the base_uri set as 'https://archive.org/'., (*4)
$client = new Client(['base_uri' => 'https://archive.org/']);
$api = new Api($client);
For a list of items, call $api->search()
with your query. For information about the valid query strings, see the advancedsearch page
Optional you can page in extra arguments:
* Page - By default this library paginates 50 items at a time. Get additional pages by changing this page.
* Rows - The number of items you would like returned as part of each call
* Fields - By default, all fields are returned. Limit them by passing through an array of fields as mentioned on advancedsearch page
* Sort - Send through an array of sort parameters, (*5)
If you would like a specific item populated with extra metadata, pass an Item
object in to $api->getMetaDataForItem()
.
A second parameter can be added to only return sub-items of the metadata, (*6)
Credits
License
The MIT License (MIT). Please see License File for more information., (*7)