jamalex / notion-py

Unofficial Python API client for Notion.so
MIT License
4.3k stars 474 forks source link

Pagination support #317

Open ashdavies opened 3 years ago

ashdavies commented 3 years ago

Hey I'm fairly certain somebody has mentioned this before but I can't find the issue, Since the Notion pseudo "API" requests restrict this API to 100 results it's difficult to use pages with more than so many entries, is it possible to add pagination support, for example, an offset, and/or limit parameters.

Limit is already applied to alleviate http errors, but offset is a bit unclear. I'd be happy to contribute to solve this, but I need a few pointers as to where to look, I'm not so familiar with the Notion requests.

philippkeller commented 10 months ago

I searched through the source code, even started to inspect the network calls on notion directly and couldn't find offset.

Instead I now worked around the issue with using get_rows(search="category") I have like 10 categories which only take me 10 calls to have the whole list.

Not ideal, but maybe a workaround?