Skip to content
Advertisement

How to call the CITES species+ api in python?

I am trying to access the cites species api to get information on a input species name.

Reference document: http://api.speciesplus.net/documentation/v1/references.html

I tried to use the api with the provided API Key.

I get error code 401.

Here is the code

JavaScript

Advertisement

Answer

As @jonrsharpe said in comment:

JavaScript

You have to set APIKEY as header – don’t put it in URL.

You may also put parameters as dictionary and requests will append them to URL – and code will be more readable.

JavaScript

EDIT:

If you skip .xml in URL then you get data as JSON and it can be more useful

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement