Skip to the content.

The Figshare API

Figshare actually has 4 different APIs:

Try it out - retrieve metadata

You can retrieve all the metadata for this item: “Using APIs to customise repositories and engage audiences” available here: https://doi.org/10.6084/m9.figshare.5616445.v2. Notice the DOI takes you to this URL: https://figshare.com/articles/presentation/Using_APIs_to_customise_repositories_and_engage_audiences/5616445

While you can download the citation metadata directly from the user interface, to download all of the metadata you need to use the API. Visit this URL: https://docs.figshare.com/#article_details. In the article_id field enter the number that is at the very end of the URL above: 5616445. Then click the red ‘TRY’ button. A pop up should appear with all the metadata.

You can view this same output in its own browser tab by visiting the API endpoint with the item id appended to it: https://api.figshare.com/v2/articles/5616445

image of figshare api documentation showing how to retrieve all the metadata for item 5616445

Try it out - retrieve views

To retrieve views, you will use a stats endpoint. The documentation site does not provide an interface to add parameters, but you can construct the URL yourself. Try retrieving the views for the item used above by pasting this URL into a browser tab:

https://stats.figshare.com/total/views/article/5616445

Open API and Swagger

API authentication

Credentials are sent to the API server via the Authorization header. Make sure credentials are stored in a secure location!

Try it out - authenticate and send metadata to create a new item

  1. Create a token for your personal account or the sandbox account (sandbox instructions).
  2. Navigate to the documentation site (here for personal accounts or here for sandbox accounts) and paste your token in the upper left field.
  3. On the left panel, click ‘Articles’ and then click ‘Private article’, then ‘Create new article’. This endpoint accepts JSON formatted metadata and creates a draft article in the account linked to the token you used.
  4. Copy the JSON below and paste it into the Parameters box (replace ‘YOUR NAME’ with your name). Click the red ‘Try’ button.
  5. Look in your account to see the item. You can delete the draft as well.
    {
      "title": "YOUR NAME made this using the API"
    }
    

image of figshare api documentation showing how to enter a token and send metadata