# UN Sustainable Development Goals Data Intelligence (`wakey7dev/un-sdg-data-intelligence`) Actor

Fetches and normalizes UN SDG indicator data across all 17 goals. Provides clean JSON for NGOs, governments, and researchers tracking global development progress.

- **URL**: https://apify.com/wakey7dev/un-sdg-data-intelligence.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## UN Sustainable Development Goals Data Intelligence

Fetches and normalizes UN SDG indicator data across all 17 Sustainable Development Goals. Provides clean, structured JSON output for NGOs, governments, researchers, and analysts tracking global development progress.

### Features

- **All 17 SDG Goals**: Access data for any goal (1=No Poverty through 17=Partnerships)
- **Granular Filtering**: Filter by specific targets (e.g. 1.1) or indicators (e.g. 1.1.1)
- **Country/Region Filter**: Narrow results to specific countries or regions
- **Year Range Filter**: Focus on specific time periods (1960-2030)
- **Normalized Output**: Clean JSON with country names, series descriptions, units, and metadata
- **Human-Readable Summary**: ASCII table showing series breakdown and sample data points

### Data Source

United Nations Statistics Division (UNSD) SDG API:

- **17 Goals** covering poverty, hunger, health, education, gender equality, water, energy, work, industry, inequalities, cities, consumption, climate, oceans, land, peace, and partnerships
- **230+ Indicators** tracked globally
- **200+ Countries and Regions** with historical data
- **Regular Updates**: Data refreshed as countries report to UN

### Use Cases

- **NGOs & Development Organizations**: Track progress on specific goals in target regions
- **Government Agencies**: Benchmark national performance against global indicators
- **Academic Research**: Access standardized development data for cross-country analysis
- **Corporate ESG Reporting**: Source UN-aligned sustainability metrics
- **Policy Analysis**: Monitor trends in poverty, health, education, climate, and inequality

### Example Input

```json
{
  "goal": 1,
  "target": "1.1",
  "indicator": "1.1.1",
  "country": "Kenya",
  "maxResults": 100,
  "yearFrom": 2010,
  "yearTo": 2025
}
```

### Example Output

Each record in the dataset includes:

- `goal`, `goalTitle`: SDG goal number and title
- `target`, `indicator`: Target and indicator codes
- `series`, `seriesDescription`: Data series ID and description
- `country`, `countryCode`: Country/region name and code
- `year`, `value`: Time period and measured value
- `units`: Measurement units (percent, count, index, etc.)
- `source`: Data source (World Bank, WHO, UNESCO, etc.)
- `sex`, `age`, `locationType`: Demographic breakdowns
- `footnotes`: Additional metadata

### API Access

The actor uses the official UN SDG API at `unstats.un.org/SDGAPI/v1/sdg/`. No API key required.

### Pricing

$1.00 per 1,000 data points returned. Each data point represents one country/region × one year × one indicator measurement.

### Rate Limits

The UN SDG API has no strict rate limits, but the actor includes polite delays between paginated requests to avoid overloading the service.

### Support

For issues or questions, contact via the Apify platform.

# Actor input Schema

## `goal` (type: `integer`):

SDG goal number (1-17). 1=No Poverty, 2=Zero Hunger, 3=Good Health, 4=Quality Education, 5=Gender Equality, 6=Clean Water, 7=Affordable Energy, 8=Decent Work, 9=Industry/Innovation, 10=Reduced Inequalities, 11=Sustainable Cities, 12=Responsible Consumption, 13=Climate Action, 14=Life Below Water, 15=Life on Land, 16=Peace/Justice, 17=Partnerships

## `target` (type: `string`):

Specific target within the goal (e.g. '1.1', '1.2'). Leave empty for all targets in the goal.

## `indicator` (type: `string`):

Specific indicator code (e.g. '1.1.1'). Leave empty for all indicators under the target/goal.

## `country` (type: `string`):

Filter results by country name (partial match, case-insensitive). Leave empty for all countries/regions.

## `maxResults` (type: `integer`):

Maximum number of data points to return. Use higher values for comprehensive datasets.

## `yearFrom` (type: `integer`):

Filter to data from this year onwards.

## `yearTo` (type: `integer`):

Filter to data up to this year.

## Actor input object example

```json
{
  "goal": 1,
  "maxResults": 100,
  "yearFrom": 2015,
  "yearTo": 2026
}
```

# Actor output Schema

## `results` (type: `string`):

All normalized data points as JSON array.

## `summary` (type: `string`):

Human-readable summary of results.

## `stats` (type: `string`):

Machine-readable run statistics.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "goal": 1,
    "target": "",
    "indicator": "",
    "country": "",
    "maxResults": 100,
    "yearFrom": 2015,
    "yearTo": 2026
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakey7dev/un-sdg-data-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "goal": 1,
    "target": "",
    "indicator": "",
    "country": "",
    "maxResults": 100,
    "yearFrom": 2015,
    "yearTo": 2026,
}

# Run the Actor and wait for it to finish
run = client.actor("wakey7dev/un-sdg-data-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "goal": 1,
  "target": "",
  "indicator": "",
  "country": "",
  "maxResults": 100,
  "yearFrom": 2015,
  "yearTo": 2026
}' |
apify call wakey7dev/un-sdg-data-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wakey7dev/un-sdg-data-intelligence"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KRQLMeXhW7h4B1sjN/builds/q6JZkjz23xBvje0gH/openapi.json
