Find an API

Search public APIs with auth details & Postman guides

← All APIs

World Bank API

api.worldbank.org · Government

Government No Auth Free & Open Economics Development Open Data

Access World Bank development data — GDP, poverty rates, health indicators, education statistics, and thousands of other metrics across 200+ countries. Free, no API key required.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Get GDP for a country

Get the last 5 years of US GDP data.

https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD?mrv=5&format=json

Hover any highlighted part to learn what it does

curl -X GET "https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD?mrv=5&format=json"
import requests
params = {
    "mrv": "5",
    "format": "json"
}
response = requests.get(
    "https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD",
    params=params,
)
print(response.json())
const url = new URL('https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD');
url.searchParams.set('mrv', '5');
url.searchParams.set('format', 'json');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD")
	q := baseURL.Query()
	q.Set("mrv", "5")
	q.Set("format", "json")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD")
uri.query = URI.encode_www_form({
  "mrv" => "5",
  "format" => "json"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.worldbank.org/v2/country/US/indicator/NY.GDP.MKTP.CD?" . http_build_query([
    "mrv" => "5",
    "format" => "json"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Search indicators

Search available World Development Indicators.

https://api.worldbank.org/v2/indicator?q=poverty&format=json&source=2&per_page=5

Hover any highlighted part to learn what it does

curl -X GET "https://api.worldbank.org/v2/indicator?q=poverty&format=json&source=2&per_page=5"
import requests
params = {
    "q": "poverty",
    "format": "json",
    "source": "2",
    "per_page": "5"
}
response = requests.get(
    "https://api.worldbank.org/v2/indicator",
    params=params,
)
print(response.json())
const url = new URL('https://api.worldbank.org/v2/indicator');
url.searchParams.set('q', 'poverty');
url.searchParams.set('format', 'json');
url.searchParams.set('source', '2');
url.searchParams.set('per_page', '5');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.worldbank.org/v2/indicator")
	q := baseURL.Query()
	q.Set("q", "poverty")
	q.Set("format", "json")
	q.Set("source", "2")
	q.Set("per_page", "5")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.worldbank.org/v2/indicator")
uri.query = URI.encode_www_form({
  "q" => "poverty",
  "format" => "json",
  "source" => "2",
  "per_page" => "5"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.worldbank.org/v2/indicator?" . http_build_query([
    "q" => "poverty",
    "format" => "json",
    "source" => "2",
    "per_page" => "5"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. Always add ?format=json to get JSON instead of XML
  3. Try GET https://api.worldbank.org/v2/country/GB/indicator/SP.POP.TOTL?format=json&mrv=5
  4. Replace GB with any ISO 2-letter country code
  5. indicator codes: NY.GDP.MKTP.CD (GDP), SP.POP.TOTL (population), SI.POV.NAHC (poverty rate)

What can you build with World Bank API?

World Bank API is a Government API. Developers commonly use government APIs for:

  • surfacing public datasets in citizen-facing apps
  • building transparency and civic engagement tools
  • accessing legislation, court records, and official data
  • powering research and journalism tools
  • creating compliance and regulatory monitoring dashboards

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. World Bank API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗