Document blocks limited to 25 via Monday API without possibility to extend this limit

I use the Document Blocks API (Monday API version 2023-10) to retrieve all the blocks of a Monday Doc.

Here is the request:

My Monday Doc contains many more blocks than what is returned by the API.
But I noticed that the number of blocks returned by the API request was limited to 25.

How to get all blocks of a Monday Doc? I am stuck in my work because of this limitation.

First of all, I see in the documentation that there are some arguments (page, limit) that can be used but none of these values are returned by the api!

Moreover there is no info about the limit max value in the documentation.
However I think that most users would like to retrieve all blocks of a Doc, so there should not be any limit by default.

Last comment: in the docs it’s written “Limit: The number of docs to get. The default is 25.”; I guess that in this case it should be “… the number blocks…”. See Document blocks

blocks has its own set of arguments including its own limit. You’re not using it in your query. You are using the limit argument on docs though - yet its needless since you’re specifying a single doc id, so only one doc will be returned anyway.

query { docs(ids:123123){blocks(limit:1000 page:1){id doc_id type content }}}

That example has the limit and page on the blocks object not the docs. Now you can return, and paginate them. The default limit of 25 is standard API wide, not just on blocks. My guess is the limit is 1000 which seems to be the standard limit in the API (though I haven’t tested since I’d need a document with 1000 blocks to test.)

But yes the documentation seems incorrect stating “docs to get” when it should be “blocks to get” for the limit argument on that page.

1 Like