Pagination

class semanticscholar.PaginatedResults.PaginatedResults

This class abstracts paginated results from API search. You can just iterate over results regardless of the number of pages.

async async_next_page() None

Get next results

next_page() None

Fetches the next page of results from the API and updates the current items list.

property items: list

Accumulated items across all fetched pages of results up to the current page.

Type:

list

property next: int

The position of the first item in the next page.

Type:

int

property offset: int

The position of the first item in the current page.

Type:

int

property raw_data: List[dict]

The data from the current page of results in its original JSON structure, represented as a list of dict.

Type:

List of dict

property total: int

Represents the total number of results in the query across all pages. From the official docs: “Because of the subtleties of finding partial phrase matches in different parts of the document, be cautious about interpreting the total field as a count of documents containing any particular word in the query.”

Type:

int