Hi @psmku,
For the query:
https://0-api-crossref-org.lib.rivier.edu/works?query.bibliographic=LGBT+LGBTQ+LGBTQI+LGBTQIA&filter=type:book-chapter,type:journal-article&select=DOI,title,subtitle,container-title,type,ISBN,ISSN,publisher,publisher-location,published-print,published-online,is-referenced-by-count,references-count,abstract,subject&rows=1000&offset=0
there are over 10,000 results. Offsets for /works
are limited to 10,000, so using offsets here is not recommended. Instead, you should be using cursor
. See more details on this distinction below.
Offset
The number of returned items is controlled by the rows
parameter, but you can select the offset into the result list by using the offset
parameter. So, for example, to select the second set of 5 results (i.e. results 6 through 10), you would do the following:
https://0-api-crossref-org.lib.rivier.edu/works?query=allen+renear&rows=5&offset=5
Offsets for /works
are limited to 10K. Use cursor
(see below) for larger /works
results sets.
Deep paging with cursors
Using large offset
values can result in extremely long response times. Offsets in the 100,000s and beyond will likely cause a timeout before the API is able to respond. An alternative to paging through very large result sets (like a corpus used for text and data mining) is to use the API’s exposure of Solr’s deep paging cursors. Any combination of query, filters and facets may be used with deep paging cursors. While rows
may be specified along with cursor
, offset
and sample
cannot be used. To use deep paging make a query as normal, but include the cursor
parameter with a value of *
. In this example we will page through all journal-article
works from member 311
:
https://0-api-crossref-org.lib.rivier.edu/members/311/works?filter=type:journal-article&cursor=*
A next-cursor
field will be provided in the JSON response. To get the next page of results, pass the value of next-cursor
as the cursor
parameter. For example:
https://api.crossref.org/members/311/works?filter=type:journal-article&cursor=AoE/CGh0dHA6Ly9keC5kb2kub3JnLzEwLjEwMDIvdGRtX2xpY2Vuc2VfMQ==
Note that the actual cursor value will be different from this illustration.
Clients should check the number of returned items. If the number of returned items is fewer than the number of expected rows then the end of the result set has been reached. Using next-cursor
beyond this point will result in responses with an empty items list.
The cursor
parameter is available on all /works
resources.
My best,
Isaac