Finding the right development indicator starts with a code, not just a label such as GDP. By the end of this guide, you can search an indicators list, read the returned codes and names, and use the documented endpoints to investigate an indicator or retrieve country data.
What the indicators list returns
The World Bank Development Indicators API provides a searchable list of indicators and their codes. Those codes help an application distinguish between measures that sound similar but represent different concepts, such as trade in services and foreign direct investment as percentages of GDP.
The list response includes a total, page information, and an items array containing indicator codes and names. The API also offers endpoints for indicator details and country-specific indicator data. Together, these are useful for building an indicator picker, checking the meaning of a selected measure, and displaying a country series.
For the documented list request, the required q parameter is a string. The example below searches for GDP; it does not assume that every match measures GDP itself. Several returned names describe other measures expressed as a percentage of GDP.
Getting started on Zyla API Hub
Open the World Bank Development Indicators API listing on Zyla API Hub, create a free account if needed, and click Subscribe or Start Free Trial when available. You will get an API key to use in the bearer authorization header.
Zyla uses subscriptions and quotas rather than pay-per-call billing. The first API may offer a 7-day trial or 50 requests; check the API page for current access options and pricing. The Hub catalog contains more than 10,000 public APIs, with one account and API key across the marketplace.
Search for indicator codes
Get Indicators List uses GET and requires the q string parameter. This complete request searches for GDP. Replace YOUR_API_KEY with your key before running it.
curl -s -X GET "https://zylalabs.com/api/953/world-bank-development-indicators-api/774/get-indicators-list?q=GDP" \
-H "Authorization: Bearer YOUR_API_KEY"
The following is the published response excerpt. It ends partway through the final item, so the excerpt itself is not a complete JSON document.
{
"total": 85,
"page": 1,
"pageSize": 50,
"items": [
{
"indicatorCode": "BG.GSR.NFSV.GD.ZS",
"indicatorName": "Trade in services (% of GDP)"
},
{
"indicatorCode": "BM.KLT.DINV.WD.GD.ZS",
"indicatorName": "Foreign direct investment, net outflows (% of GDP)"
},
{
"indicatorCode": "BN.CAB.XOKA.GD.ZS",
"indicatorName": "Current account balance (% of GDP)"
},
{
"indicatorCode": "BX.KLT.DINV.WD.GD.ZS",
"indicatorName": "Foreign direct investment, net inflows (% of GDP)"
},
{
"indicatorCode": "BX.TRF.PWKR.DT.GD.ZS",
"indicatorName": "Personal remittances, received (% of GDP)"
},
{
"indicatorCode": "CM.MKT.LCAP.GD.ZS",
"indicatorName": "Market capitalization of listed domestic companies (% of GDP)"
},
{
"indicatorCode": "CM.MKT.TRAD.GD.ZS",
"indicatorName": "Stocks traded, total value (% of GDP)"
},
{
"indicatorCode": "EG.EGY.PRIM.PP.KD",
"indicatorName": "Energy intensity level of primary energy (MJ/$2021 PPP GDP)"
},
{
"indicatorCode": "EG.GDP.PUSE.KO.PP",
"indicatorName": "GDP per unit of energy use (PPP $ per kg of oil equivalent)"
},
{
"indicatorCode": "EG.GDP.PUSE.KO.PP.KD",
"indicatorName": "GDP per unit of energy use (constant 2021 PPP $ per kg of oil equivalent)"
},
{
"indicatorCode": "EG.USE.COMM.GD.PP.KD",
"indicatorName": "Energy use (kg of oil equivalent) per $1,000 GDP (constant 2021 PPP)"
},
{
"indicatorCode": "EN.GHG.CO2.RT.GDP.KD",
"indicatorName": "Carbon intensity of GDP (kg CO2e per constant 2021 US$ of GDP)"
},
{
"indicatorCode": "EN.GHG.CO2.RT.GDP.PP.KD",
"indicatorName": "Carbon intensity of GDP (kg CO2e per 2021 PPP $)"
},
{
"indicatorCode": "ER.GDP.FWTL.M3.KD",
"indicatorName": "Water productivity, total (constant 2015 US$ GDP per cubic meter of total freshwater withdrawal)"
},
{
"indicatorCode": "FD.AST.PRVT.GD.ZS",
"indicatorName": "Domestic credit to private sector by banks (% of GDP)"
},
{
"indicatorCode": "FM.A…
Use indicatorName for the label shown to a user and indicatorCode to identify the selected measure. Preserve the full name: the units and qualifiers matter. For example, a percentage of GDP is different from GDP per unit of energy use.
In this example, total is 85, page is 1, and pageSize is 50. These fields tell your interface that the reported result set is larger than one page. Check the API listing for available pagination controls before implementing a next-page request.
Read the list in Python
This example calls the same endpoint and reads the response from the service, rather than attempting to parse the truncated excerpt above. It uses only Python’s standard library.
import json
from urllib.request import Request, urlopen
url = "https://zylalabs.com/api/953/world-bank-development-indicators-api/774/get-indicators-list?q=GDP"
request = Request(
url,
headers={"Authorization": "Bearer YOUR_API_KEY"},
method="GET",
)
with urlopen(request) as response:
result = json.load(response)
print("Total:", result["total"])
print("Page:", result["page"])
print("Page size:", result["pageSize"])
for item in result["items"]:
print(item["indicatorCode"], item["indicatorName"])
Keep the key out of committed source code in a deployed application. If the request fails, check that the key is valid for your account and that the API subscription has access and remaining quota before changing the query.
Get details and country data
Get Indicators Details
Get Indicators Details uses GET to retrieve information related to an indicator. Its documented request URL is:
https://zylalabs.com/api/953/world-bank-development-indicators-api/775/get-indicators-details
The supplied example does not define request parameters for selecting an indicator. The example response contains indicatorCode, indicatorName, topic, shortDescription, and longDescription; the short description can be null. Check the listing before implementing indicator selection for this endpoint.
Details are useful when a label alone is not enough. For instance, the documented GDP deflator example explains the measure in its long description, giving a dashboard a way to show users what the indicator represents rather than only displaying its name.
Get Indicator Data
Get Indicator Data uses GET to query data for an indicator and a country. The documented request URL, including its two required string parameters, is:
https://zylalabs.com/api/953/world-bank-development-indicators-api/776/get-indicator-data?country=ARG&indicator=NE.TRD.GNFS.ZS
Here, country is ARG and indicator is NE.TRD.GNFS.ZS. The documented response identifies Argentina and “Trade (% of GDP),” then presents values in a data object keyed by year. Treat those keys as years when rendering a series; do not treat them as timestamps with a timezone.
The list and data examples demonstrate different indicator codes. Use the code for the measure a user actually selected, and verify its name and units before labeling a chart. The country-data example does not establish that every indicator has a value for every year.
Build an indicator workflow
For a research dashboard, start with the list response and show each name alongside its code. If a search returns several GDP-related measures, let the user choose between them instead of selecting the first match automatically. Store the chosen code with the full displayed name so the choice remains understandable when it is revisited.
For an economic-data tool, use the details endpoint to help users interpret a measure and the country-data endpoint to display a series. Keep the indicator’s unit visible beside the series: “% of GDP” describes a ratio, while the energy-related results in the list use different units. Handle a nullable short description without displaying the literal text null.
For a form or internal catalog, cache list results according to your application’s freshness needs and subscription quota. Show the returned total and page information accurately; the documented response fields alone do not specify how to request another page.
Call the API from an AI agent
Zyla also exposes its APIs through MCP. Configure an MCP-compatible client, such as Claude Code, Cursor, or Windsurf, with the following endpoint, replacing YOUR_API_KEY with your key:
https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
Ask the agent to find GDP-related indicators and return both names and codes. Review the selected measure and its units before using it in a downstream analysis, especially when several names contain the same search term.
FAQ
How do I get a list of GDP-related indicators?
Call Get Indicators List with the required string parameter q=GDP. Read the returned items array for indicator names and codes.
Can I retrieve a country series using an indicator code?
Yes. Get Indicator Data accepts the required country and indicator parameters. The documented example retrieves Argentina’s trade-as-a-percentage-of-GDP series.
Does the list response include every matching result?
The example reports 85 total matches and a page size of 50. Use the returned page information to recognize that the reported set exceeds one page, and check the listing for pagination controls.
How do I authenticate?
Send your Zyla API key in the Authorization: Bearer YOUR_API_KEY header. The API uses a subscription and quota; check the listing for current access options and pricing.
Ready to integrate the indicator search? Create a free Zyla account, get an API key, and Start 7-day trial on World Bank Development Indicators API when available.