Limit restricted to 99

65 views
Skip to first unread message

Thibaut Soufflet

unread,
Feb 3, 2023, 2:34:56 PM2/3/23
to zotero-dev
Hello,

I made a call to the Zotero API through :

But even if I change the "limit" there is still only 99 results displaying.
How can I get more like 500 for example ?

Thank you very much!

Regards

Dan Stillman

unread,
Feb 3, 2023, 2:36:38 PM2/3/23
to zoter...@googlegroups.com
On 2/3/23 8:14 AM, Thibaut Soufflet wrote:
> I made a call to the Zotero API through :
> https://api.zotero.org/groups/2105996/items?sort=title&limit=500
>
> But even if I change the "limit" there is still only 99 results
> displaying.
> How can I get more like 500 for example ?

The limit is 100 objects per request. You can use pagination to get
additional results.

https://www.zotero.org/support/dev/web_api/v3/basics#sorting_and_pagination

Thibaut Soufflet

unread,
Feb 6, 2023, 4:03:53 AM2/6/23
to zotero-dev
Thank you for the quick answer.

You mean there is no way to get more than 99 anyway?

Should I use various sorting (named "sort" in the documentation) to get all the datas?

Kinda sad

Thibaut Soufflet

unread,
Feb 9, 2023, 6:20:29 AM2/9/23
to zotero-dev
Up

I still not found a way to get the 2009 items from the group (https://www.zotero.org/groups/2105996/anaee_france/library) with my API request.
I'm still limited to 99 results.

Please tell me how to get all of them.
Regards

Dan Stillman

unread,
Feb 9, 2023, 6:26:03 AM2/9/23
to zoter...@googlegroups.com
Again, the maximum limit per request is 100.

For pagination, read the documentation I linked to.

Thibaut Soufflet

unread,
Feb 9, 2023, 6:34:35 AM2/9/23
to zotero-dev
I already read the documentation and tried various request with the "SORT" parameter.
There is something that I do'nt understand.

It would be nice if you can give me an example of how to get pagination to work to get all the results needed.

Regards

Thibaut Soufflet

unread,
Feb 9, 2023, 6:43:53 AM2/9/23
to zotero-dev
Ok I found a solution with the start parameter.

I post the example for other people:

Get the first 100 results :

Get the next 100 results :

It's quite laborious if you have thousands of items to get but the only solution I found.
Thx

Dan Stillman

unread,
Feb 9, 2023, 6:49:38 AM2/9/23
to zoter...@googlegroups.com
Read the Link Header section in the documentation I linked to. You shouldn't be generating these links yourself (and your example is wrong). This should all be automated by your code and shouldn't be laborious in any way. This is an entirely standard approach to requesting many results from an API.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/632c5cd3-f725-417c-8a49-59856cbd308cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages