What you can do with our API and how to use it

An API is an interface to communicate with other programs or services. In our case, it lets you access your Datawrapper data without using the Datawrapper web app you’re used to. Data like: When was a visualization created? What data does it show? Which colors does it use? Which chart type? Annotations? Line width? Marker size? Every setting in the Datawrapper app is also a data point in our database, saved somewhere on a server in Frankfurt, Germany.

And now you have control over it! With our API, you can read this data, and you can write new data points in there – for example creating a new chart, or overwriting the settings of an old one.

What can you do with our API? 

Thanks to the Datawrapper API, you will be able to

  • (batch-) create, edit & (un)publish charts, maps & tables
  • (batch-) move charts to other folders
  • (batch-) add members to a team
  • get a list of all your team members, visualizations, folders, etc.

…with a few lines of code, like so:

curl --request POST \
     --url https://api.datawrapper.de/v3/charts \
     --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
     --header 'content-type: application/json' \
     --data '{ "title": "Where do people live?", "type": "d3-bars-stacked" }'<br>

For example, you could write a script that automatically updates the data of a chart & changes the description of the chart so that it states  when the chart was updated. Find a tutorial for this use case here.

(How) can you use the API?

The API is available for free for every Datawrapper user. All you need is a (free) Datawrapper account and an API Access Token you can get (for free) in your Datawrapper settings.

You can find tutorials on how to get started, how to create a chart, and how to integrate the API in our Developer Docs; among other guides. That’s where you will also find the API reference.

If you’re curious to see the underlying code, visit our API Github repo. And to see the official announcement blog post, visit the blog post "Automate your chart creation with our new API" from November 2019.