You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAlex offers two methods for paging: [basic paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#basic-paging) and [cursor paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#cursor-paging). Both methods are supported by
264
-
PyAlex, although cursor paging seems to be easier to implement and less error-prone.
263
+
OpenAlex offers two methods for paging: [basic (offset) paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#basic-paging) and [cursor paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#cursor-paging). Both methods are supported by PyAlex.
265
264
266
-
##### Basic paging
267
-
268
-
See limitations of [basic paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#basic-paging) in the OpenAlex documentation.
269
-
It's relatively easy to implement basic paging with PyAlex, however it is
270
-
advised to use the built-in pager based on cursor paging.
271
-
272
-
##### Cursor paging
265
+
##### Cursor paging (default)
273
266
274
-
Use `paginate()` for paging results. Each page is a list of records, with a
275
-
maximum of `per_page` (default 25). By default, `paginate`s argument `n_max`
276
-
is set to 10000. Use `None` to retrieve all results.
267
+
Use the method `paginate()` to paginate results. Each returned page is a list
268
+
of records, with a maximum of `per_page` (default 25). By default,
269
+
`paginate`s argument `n_max` is set to 10000. Use `None` to retrieve all
270
+
results.
277
271
278
272
```python
279
273
from pyalex import Authors
@@ -296,6 +290,19 @@ for record in chain(*query.paginate(per_page=200)):
296
290
print(record["id"])
297
291
```
298
292
293
+
##### Basic paging
294
+
295
+
See limitations of [basic paging](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/paging#basic-paging) in the OpenAlex documentation.
0 commit comments