grinchenkoedu / scopus-search-api
Scopus API for PHP (Unofficial)
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^7.15.2 || ^8.0.1
Requires (Dev)
- phpunit/phpunit: ^9.5 || ^10.0 || ^11.0
This package is auto-updated.
Last update: 2026-09-02 21:48:45 UTC
README
A third party PHP SDK for Scopus APIs.
Currently supported APIs:
- Scopus Search API
- Abstract Retrieval API
- Author Retrieval API
- Affiliation Retrieval API
- Search Author API
- Citation Overview API
- Abstract Citations Count API
Requirements
- PHP 7.4 – 8.x
guzzlehttp/guzzle^7.15.2 || ^8.0.1
Installation
Install the package via Composer:
composer require grinchenkoedu/scopus-search-api
Usage
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); } }
API Docs
Official API documentation: https://grinchenkoedu.github.io/scopus-api-php/
Development
Install the development dependencies and run the test suite:
composer install vendor/bin/phpunit
Coverage is not configured in phpunit.xml.dist, because the source filter is
spelled differently in PHPUnit 9 and PHPUnit 10+ and this package supports both.
Request it on the command line instead:
vendor/bin/phpunit --coverage-text --coverage-filter src # PHPUnit 10 and 11 vendor/bin/phpunit --coverage-text --whitelist src # PHPUnit 8.5 and 9
Regenerating the API docs
docs/ is generated output, published at the API Docs link above via GitHub Pages
(master branch, /docs folder). Regenerate it after changing anything under src/:
curl -sL -o apigen.phar https://github.com/ApiGen/ApiGen/releases/download/v7.0.0-alpha.6/apigen.phar php apigen.phar --workers 1 --output docs \ --title "Scopus API for PHP" \ --base-url "https://grinchenkoedu.github.io/scopus-api-php/" \ src
--workers 1 is required: the parallel scheduler crashes when ApiGen runs from a PHAR.
Changelog
See CHANGELOG.md for a list of changes.
Contributors
Thanks to all the contributors who have helped build and maintain this package:
License
This project is licensed under the MIT License.