canonical: https://jentic.com/apis/united-nations/united-nations

# United Nations UN World Population Data Portal API

The United Nations Population Division Data Portal API provides access to comprehensive demographic data including population estimates and projections, fertility, mortality, and migration indicators for all countries and areas of the world. Data is sourced from the World Population Prospects and other UN Population Division publications. The API exposes 20 endpoints secured with bearer authentication.

## For AI agents

Programmatically get population data by indicators and locations, get population data by indicators, locations, and year range. Covers 20 operations with bearer authentication.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Get population data by indicators and locations
- List all indicators
- Integrate UN World Population Data Portal API into automated workflows
- Query and filter UN World Population Data Portal API records by parameters
- Monitor UN World Population Data Portal API operational status and events

## Use cases

### Developer Tools Operations

Use the UN World Population Data Portal API to perform developer tools operations programmatically. The API provides 20 endpoints covering core functionality including get population data by indicators and locations, get population data by indicators, locations, and year range, list all indicators.

Example prompt: Call GET `/api/v1/data/indicators/{indicators}/locations/{locations}` to get population data by indicators and locations

### Automated Data Management

Automate data operations by combining multiple UN World Population Data Portal API endpoints. Agents can get population data by indicators, locations, and year range and then list all indicators in a single workflow.

Example prompt: Call GET `/api/v1/data/indicators/{indicators}/locations/{locations}/start/{startYear}/end/{endYear}` to get population data by indicators, locations, and year range, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call UN World Population Data Portal API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle bearer tokens manually.

Example prompt: Search Jentic for 'get population data by indicators and locations', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/v1/data/indicators/{indicators}/locations/{locations}` | Get population data by indicators and locations |
| GET | `/api/v1/data/indicators/{indicators}/locations/{locations}/start/{startYear}/end/{endYear}` | Get population data by indicators, locations, and year range |
| GET | `/api/v1/Indicators` | List all indicators |
| GET | `/api/v1/Indicators/{codes}` | Get indicators by codes |
| GET | `/api/v1/locations` | List all locations |
| GET | `/api/v1/locations/{codes}` | Get locations by codes |
| GET | `/api/v1/locationsWithAggregates` | List all locations with aggregates |
| GET | `/api/v1/dimensions/times/{timeType}` | Get available time periods |

## Key resources

- **Data** — Population data retrieval endpoints for estimates and projections.
- **EmpiricalData** — Empirical (observed/census-based) population data.
- **Indicators** — Demographic indicators (population, fertility, mortality, migration).
- **Locations** — Countries, areas, and aggregate regions.
- **Dimensions** — Time periods and projection variants.

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 71 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 99 / 100
  - Developer Experience & Jentic Compatibility: 68 / 100
  - AI-Readiness & Agent Experience: 51 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 72 / 100
- **View full report:** https://jentic.com/apis/united-nations/united-nations/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the UN World Population Data Portal API by hand means attaching a bearer token on every call, matching each indicator and location operation to its path and query parameters, and handling responses yourself. Through Jentic you install once, import the UN World Population Data Portal API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The Data Portal API exposes read operations over indicators, locations, and dimensions, so scope your agent to the ones it needs, such as fetching population data by indicator and location. You choose the operations it may call, so it is limited to the queries you enable and nothing more.
- **Credential handling:** Your UN Data Portal token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get population data by indicator and location' or 'list indicators', and Jentic returns the matching UN World Population Data Portal API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the UN World Population Data Portal API use?

The UN World Population Data Portal API uses a Bearer token in the Authorization header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get population data by indicators and locations with the UN World Population Data Portal API?

Yes. Use the GET `/api/v1/data/indicators/{indicators}/locations/{locations}` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the UN World Population Data Portal API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get population data by indicators and locations through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get population data by indicators and locations'. Jentic returns the matching UN World Population Data Portal API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the UN World Population Data Portal API have?

The UN World Population Data Portal API exposes 20 endpoints covering data, empiricaldata, indicators operations.

### Can I limit what my agent is allowed to do with the UN World Population Data Portal API?

Yes. Because you run Jentic One yourself, you decide which of the API's read operations your agent can call and which credential it uses, so it only runs the queries you enable. The UN World Population Data Portal API is read-only over indicators, locations, and dimensions, so you can allow just the operations the agent needs, such as fetching population data by indicator and location or listing indicators, and withhold the rest. Anything you do not enable stays outside the agent's reach.
