GDP API
The GDP API provides current and historical GDP (Gross Domestic Product) data for countries around the world.
From 6,519 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 305ms | 346ms | 384ms | 649ms | 1018ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/gdp GET
https://api.api-ninjas.com/v1/gdp
Get GDP data from given parameters. Returns GDP statistics that satisfy the parameters.
Parameters
At least one of the following parameters must be set: country, year
countryoptionalCountry name (case-insensitive) or 2-letter ISO-3166 alpha-2 code of the country. E.g.
CanadaorCA.yearoptionalYear for which to retrieve GDP data.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
Returns an array of GDP data objects, each containing:
countryThe 3-letter ISO 3166 alpha-3 country code.
yearThe year for which the GDP data is recorded.
gdp_growthGDP growth rate as a percentage.
gdp_nominalNominal GDP in billions of US dollars.
gdp_per_capita_nominalNominal GDP per capita in US dollars.
gdp_pppGDP at purchasing power parity (PPP) in billions of US dollars.
gdp_per_capita_pppGDP per capita at PPP in US dollars.
gdp_ppp_shareCountry's share of world GDP at PPP as a percentage.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/gdp?country=CanadaHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/gdp?country=United%20States" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.