I’m working with the Notion API and trying to retrieve all entries from my database since there are over 100 pages. I attempted a request using curl, but the response only returns the first set of results. Below is an updated version of my query that uses different parameter names:
hey, ive tried that too; resetting my next_cursor until it’s null worked. make sure you’re sending the right cursor field from the last req, not a custom param. fyi, docs even have a note on that!
Working with the Notion API for pagination can be tricky at first. My experience showed that the key is to use the actual cursor returned by the API. Instead of using parameter names like ‘cursor_start’, you need to pass the value of ‘next_cursor’ using the correct parameter when making subsequent requests. I resolved this issue by looping my queries until there was no further cursor returned. This method has consistently worked for me, ensuring that I fetch all the available records from the database.