Search code examples
apidownloaddoirfigshare

How to download all files related to a publication from figshare, based on the doi number?


I want to fetch the whole db of a publication from FigShare, possibly using a script. But could not find how to get the url of the files associate to the DOI citation of the publication.

How to do that?

--

Consider this research:

See that there is a DOI for citing the material, displaying the article ID and version:

So, referring to the API in Figshare, I try:

I try:

but the article is missing.

Trying to download all of the files - wav and the CSV database referring to the DOI:

but no files.

Looking on the webpage I see in the FigShare page that each collection has its own filenumber. But there are 60+ collections, and numbering seems not progressive either.

How can I find all of the url of the materials referring to the DOI publications ?


Solution

  • In Figshare parlance what you are looking at is a collection and the files that you want are the articles in that collection.

    So, what you should try is: https://api.figshare.com/v2/collections/3666502/articles

    You can set the page size to 70 so that you get all 65 entries in one request instead of having to page through them: https://api.figshare.com/v2/collections/3666502/articles?page_size=70

    Then take the url of each article and retrieve it, such as: https://api.figshare.com/v2/articles/5212192

    In that response you will find the download_url which will let you directly retrieve the actual file.