

Global Population & Demographics Data
Data
Available ActionsEach successful request consumes credits as outlined below.
query_population_data10cr
Details
Access detailed population and demographic data for every country on earth. Look up total population counts, growth rates, age distributions, fertility trends, migration patterns, and urban-rural splits. Build age pyramids, calculate dependency ratios, and compare demographic profiles across countries and regions — all from a comprehensive global data set.
Use Cases
Look up a country's total population and growth rate, Compare age distributions across countries, Analyze fertility rate trends over time, Research migration patterns by country, Calculate dependency ratios from age structure, Compare urban vs rural population splits, Build demographic profiles for market research, Study population aging trends, Support academic demographic research, Track population projections and forecasts
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupActions(1)
query_population_data10cr5 params(1 required)Query World Bank population and demographic indicators by country/region and demographic aspect. Returns data on population size, growth rates, age structure, fertility/mortality, urban-rural splits, migration, dependency ratios, and demographic transition analysis.
query_population_data10cr5 params(1 required)Query World Bank population and demographic indicators by country/region and demographic aspect. Returns data on population size, growth rates, age structure, fertility/mortality, urban-rural splits, migration, dependency ratios, and demographic transition analysis.
country_or_regionrequiredstringCountry name, ISO3 code (e.g., 'USA', 'JPN'), or region (e.g., 'East Asia')
demographic_aspectstringDemographic category to query: 'population' (total, growth, density), 'growth' (birth/death rates, migration), 'age' (age groups, dependency ratios), 'fertility' (fertility/birth rates), 'migration' (net migration), 'all' (all indicators)
Values:
populationgrowthagefertilitymigrationall
Default:
allcalculate_dependency_ratiosbooleanAutomatically calculate dependency ratios from age structure data when aspect is 'all' or 'age'
Default:
trueinclude_urban_ruralbooleanInclude urban vs rural population percentage breakdown
Default:
falsetime_periodstringTime period for data: 'latest', a year like '2022', a range like '2010:2023', or shorthand 'last5'/'last10'
Default:
latestcurl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "6980e0f571cad8f61bf5b1fb",
"parameters": {
"action": "query_population_data",
"country_or_region": "example_country_or_region",
"demographic_aspect": "all",
"calculate_dependency_ratios": true,
"include_urban_rural": false,
"time_period": "latest"
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "6980e0f571cad8f61bf5b1fb",
"parameters": {
"action": "query_population_data",
"country_or_region": "example_country_or_region",
"demographic_aspect": "all",
"calculate_dependency_ratios": true,
"include_urban_rural": false,
"time_period": "latest"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980e0f571cad8f61bf5b1fb",
parameters: {
"action": "query_population_data",
"country_or_region": "example_country_or_region",
"demographic_aspect": "all",
"calculate_dependency_ratios": true,
"include_urban_rural": false,
"time_period": "latest"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980e0f571cad8f61bf5b1fb",
parameters: {
"action": "query_population_data",
"country_or_region": "example_country_or_region",
"demographic_aspect": "all",
"calculate_dependency_ratios": true,
"include_urban_rural": false,
"time_period": "latest"
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# method:POST
# path:/external/tools/population-demographics/actions/<actionSlug>/invoke
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/population-demographics/actions/<actionSlug>/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"your_param": "value"
}
}'Usage Instructions
Usage guidance provided directly by the developer for this product.
Population & Demographics Data
Overview
Query World Bank population and demographic indicators for any country or region. Access data on population size, growth rates, age structure, fertility and mortality, urban/rural splits, migration, dependency ratios, and demographic transition analysis. All data sourced from the World Bank Data360 API (World Development Indicators).
Actions
query_population_data
Query demographic indicators by country/region and demographic aspect.
Required Parameters:
| Parameter | Type | Description |
|---|---|---|
action | string | Must be "query_population_data" |
country_or_region | string | Country name, ISO3 code, or region. Examples: "United States", "USA", "JPN", "Kenya", "India" |
Optional Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
demographic_aspect | string | "all" | Category of indicators to return. One of: "population", "growth", "age", "fertility", "migration", "all" |
calculate_dependency_ratios | boolean | true | Automatically calculate dependency ratios from age structure data when aspect is "all" or "age" |
include_urban_rural | boolean | false | Include urban vs rural population percentage breakdown |
time_period | string | "latest" | Time period for data. Accepts: "latest", a single year like "2022", a range like "2010:2023", or shorthand "last5" / "last10" |
Demographic Aspects:
population-- Total population, population growth rate (annual %), population density (people per sq. km)growth-- Population growth rate, birth rate (per 1,000), death rate (per 1,000), net migrationage-- Age groups (0-14, 15-64, 65+ as % of total), age dependency ratio, youth dependency, elderly dependencyfertility-- Fertility rate (births per woman), birth rate (per 1,000)migration-- Net migration (number of people)all-- All available indicators combined
Example: Basic country population data
{
"action": "query_population_data",
"country_or_region": "Japan"
}
Example: Age structure with dependency ratios
{
"action": "query_population_data",
"country_or_region": "Germany",
"demographic_aspect": "age",
"calculate_dependency_ratios": true
}
Example: Growth indicators for a specific year
{
"action": "query_population_data",
"country_or_region": "Nigeria",
"demographic_aspect": "growth",
"time_period": "2020"
}
Example: Full profile with urban/rural breakdown
{
"action": "query_population_data",
"country_or_region": "Brazil",
"demographic_aspect": "all",
"include_urban_rural": true,
"calculate_dependency_ratios": true,
"time_period": "latest"
}
Example: Historical fertility data over a range
{
"action": "query_population_data",
"country_or_region": "India",
"demographic_aspect": "fertility",
"time_period": "2000:2023"
}
Example: Migration data using ISO3 code
{
"action": "query_population_data",
"country_or_region": "MEX",
"demographic_aspect": "migration",
"time_period": "last5"
}
Workflows
Demographic Profile Report
- Call
query_population_datawithdemographic_aspect: "all",include_urban_rural: true, andcalculate_dependency_ratios: trueto get a full country profile. - The response includes indicators, dependency ratios, urban/rural split, demographic transition stage analysis, and age structure interpretation.
Country Comparison
- Call
query_population_datafor each country with the samedemographic_aspectandtime_period. - Compare the returned indicator values, dependency ratios, and transition stages side by side.
Trend Analysis
- Call
query_population_datawith atime_periodrange (e.g.,"2000:2023") and a specificdemographic_aspect. - The response contains data points across the range for tracking changes over time.
Aging Population Assessment
- Call
query_population_datawithdemographic_aspect: "age"andcalculate_dependency_ratios: true. - Review the age structure interpretation (young, balanced, mature, aging), estimated median age range, and policy implications in the response.
Notes
- Country input: Accepts common country names (e.g.,
"United States","South Korea"), short forms (e.g.,"USA","UK"), and ISO3 codes (e.g.,"GBR","JPN"). If no country is provided, defaults to world ("WLD"). - Supported countries: Major economies, African nations (Kenya, Nigeria, South Africa, Ethiopia, etc.), Asian countries (Indonesia, Pakistan, Bangladesh, etc.), European countries (Netherlands, Poland, Sweden, etc.), Latin America (Argentina, Colombia, Chile, etc.), and Middle East (Saudi Arabia, UAE, Israel, etc.).
- Supported regions: Use ISO3 codes or common names. No separate region aggregation endpoint; individual country queries only.
- Demographic transition analysis: Automatically included when aspect is
"all","growth", or"fertility". Classifies countries into 5 stages: Stage 1 (High Stationary), Stage 2 (Early Expanding), Stage 3 (Late Expanding), Stage 4 (Low Stationary), Stage 5 (Declining). - Dependency ratios: When
calculate_dependency_ratiosis true and aspect is"all"or"age", the tool returns age dependency ratio, youth dependency ratio, and elderly dependency ratio (dependents per 100 working-age persons). If API-provided ratios are unavailable, they are calculated from age structure percentages. - Urban/rural split: When
include_urban_ruralis true, returns urban and rural percentages plus an urbanization level classification (Highly urbanized >= 80%, Moderately urbanized >= 60%, Partially urbanized >= 40%, Predominantly rural < 40%). - Age structure interpretation: Included when aspect is
"all"or"age". Categorizes population as "Very young" (youth > 40%), "Young" (youth > 30%), "Aging" (elderly > 20%), "Mature" (elderly > 14%), or "Balanced", with estimated median age range and policy implications. - Replacement fertility: The tool flags whether the fertility rate is below the replacement level of 2.1 births per woman.
- Data availability: World Bank data may lag 1-3 years behind the current year. Some indicators may not be available for all countries or years.
- Values are rounded to 2 decimal places where applicable.
- time_period validation: Accepts
"latest","last5","last10", a 4-digit year, or aYYYY:YYYYrange. Invalid formats return a validation error. - Unrecognized countries return a descriptive error suggesting valid country names or ISO3 codes.
- Data source: World Bank Data360 API (World Development Indicators), updated regularly.






