PHP code example of grinchenkoedu / scopus-search-api
1. Go to this page and download the library: Download grinchenkoedu/scopus-search-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
grinchenkoedu / scopus-search-api example snippets
use Scopus\ScopusApi;
use Scopus\ScopusApiFactory;
// replace with your API key
$apiKey = "your-api-key-here";
$api = (new ScopusApiFactory($apiKey))->createApiClient();
// Scopus Search API
$results = $api
->query("af-id(60071066)")
->start(0)
->count(5)
->viewComplete()
->search();
var_dump($results);
foreach ($results->getEntries() as $entry) {
$abstractUrl = $entry->getLinks()->getSelf();
// Abstract Retrieval API
$abstract = $api->retrieve($abstractUrl);
var_dump($abstract);
$authors = $entry->getAuthors();
foreach ($authors as $author) {
$authorUrl = $author->getUrl();
// Author Retrieval API
$author = $api->retrieve($authorUrl);
var_dump($author);
}
}