The fastest way to get started with WhereAPI is to create an account. Next, generate your API keys. Your API keys should look something like this
Once you have your keys, you can go ahead to consume the API.
Where implements rate limiting and you can make only 100 requests per day. This is because it's a minimal setup, and this easiest way to keep the server stable and cost-efficient.
Once you have your API keys, you can now make requests by passing them with the
x-api-key header. Here is an example if you're using with a React setup.
Or you could try a postman setup. Try sending a
GET request to
https://whereapis-africa.herokuapp.com/api/ with the
x-api-key header set to your api key. It'll look something like this
curl is a command-line tool for transffering data. It supports HTTP and other protocols. We can test our endpoints with
It should return something like this
You can also try to request a protected endpoint without the
x-api-key set. You'll get an error.
You'll get an error
Then pass the
x-api-key header alongside your key.
You should get something like this
You should use a
bash program as curl doesn't work on all terminals. Try git bash or some other bash.
If any of these works, congratulations 🎉🎉🎉. Let's move on to how you would make use of the API.