API JSON Request with include=bib not returning data array

Dear all,

i am writing a small php script to show all the bibliographies on the team websites of our department.

It all seems to work pretty well, however, I have run into one issue that hinders me to have less api requests:

If I use this:
https://api.zotero.org/users/.../collections/.../items/top?format=json&key=...
The returned data includes the subset "data" with itemType, authors etc.

However, I would prefer to use this to have a formatted bibliography in the array:
https://api.zotero.org/users/.../collections/.../items/top?format=json&include=bib&style=mis-quarterly&key=...

But doing the latter one does not include the subset "data" in the returned results anymore, so I cannot easily filter by authors or itemType, which I need.
The workaround is to do many different API requests for each itemType and Author, which is rather slow.

Any ideas or suggestions?

Thank you,
Dennis
  • edited August 6, 2017
    From the docs:
    Multiple formats can be specified by using a comma as the delimiter (include=data,bib).
    But depending on what you're doing you might be able to search by itemType (and creator, though a bit more imprecisely) rather than filtering.

    (Also, it's better to use the `Zotero-API-Key` header rather than the `key` parameter.)

    You can post further API questions to zotero-dev — we try to keep technical discussion there.
  • Great, thank you so much for the quick response.

    Sorry, it seems that I was just to stupid to find this in the doc even though I was searching and browsing a lot.



Sign In or Register to comment.