OpenAlex Adapter

The OpenAlex adapter implements ScholarlyDataSource over the OpenAlex REST API with cursor pagination and rich normalization.

Highlights

Search works

$results = $openAlex->searchWorks(Query::from([
    'q' => 'graph neural networks',
    'year' => '2019-2024',
    'openAccess' => true,
    'limit' => 50,
    'fields' => ['id','title','year','authors','counts'],
]));

foreach ($results as $work) {
    // normalized work
}

Lookup

$openAlex->getWorkById('openalex:W123');
$openAlex->getAuthorById('openalex:A123');

Citations & references

$openAlex->listCitations('openalex:W1', Query::from(['limit' => 200]));
$openAlex->listReferences('openalex:W1', Query::from(['limit' => 200]));

Batch

// yields normalized works lazily
foreach ($openAlex->batchWorksByIds(['openalex:W1','openalex:W2'], Query::from([])) as $work) {}

Configuration

Notes