Skip to content

Datasets

client.datasets talks to the /datasets/v1 routes. A release is a dated snapshot of the whole Academic Graph, refreshed weekly, and the routes use snake_case field names. Listing releases and reading a release's dataset summaries works without a key. Later blocks on this page reuse the client created here.

import asyncio

from bibliofabric.semanticscholar import SemanticScholarClient

client = SemanticScholarClient()

List the releases

releases() returns every release id, oldest first:

releases = await client.datasets.releases()
print(len(releases), releases[0], releases[-1])
207 2022-05-10 2026-11-24

Read one release

release(id) returns one release with its dataset summaries; the id is a date string or latest:

release = await client.datasets.release("latest")
print(release.release_id, len(release.datasets), release.datasets[0].name)
2026-11-24 11 abstracts

Each DatasetSummary carries name, description, and the latest documented size.

File URLs and diffs need a key

dataset() returns one dataset of one release with its temporary pre-signed download links, and diffs() returns the files to apply between two releases. Both routes answer HTTP 401 keyless; the client sends the request anyway and raises AuthError for that status:

dataset = await client.datasets.dataset("abstracts")
print(dataset.files[:1])

diffs = await client.datasets.diffs("abstracts", "2026-11-17", "2026-11-24")
print(diffs.diffs[0].from_release)
AuthError 401
AuthError 401

With a working key, dataset.files holds download URLs and diffs.diffs[i] carries update_files and delete_files, which bring a local copy from the start release to the end release in order. Downloading the files themselves is plain HTTP against the pre-signed URLs and is not wrapped.

Point the datasets API elsewhere

The datasets service lives on its own base URL. SemanticScholarClient(datasets_base_url=...) points it at another host, which matters for tests and proxies:

client = SemanticScholarClient(
    datasets_base_url="https://mirror.example.org/datasets/v1"
)

Where to go next