# Worlddata — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Explore global statistics and compare countries across population, economy, demographics, quality of life, education, and health metrics. Search worldwide data on everything from life expectancy and languages to religions and regional breakdowns to gain comprehensive insights into how nations rank against each other.

**Category:** Government & Public Data | **Website:** [worlddata.info/](https://worlddata.info/) | **Docs:** [parse.bot/marketplace/199791d0-dc7f-490a-b324-671849562c15/worlddata-info-api](https://parse.bot/marketplace/199791d0-dc7f-490a-b324-671849562c15/worlddata-info-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### Compare countries

Side-by-side comparison of two countries across population, economy, infrastructure, healthcare, education, climate, and more. Sections vary by country pair.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country1` | string | Yes | ISO 3166-1 alpha-3 code for the first country (e.g. 'USA', 'DEU', 'FRA', 'JPN'). |
| `country2` | string | Yes | ISO 3166-1 alpha-3 code for the second country (e.g. 'DEU', 'GBR', 'CHN', 'IND'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/compare_countries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country1":"<string>","country2":"<string>"}'
```

### Get average body height

Countries ranked by average body height, including weight and BMI.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_average_body_height \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get countries by region

Countries and statistics grouped by sub-region for a continent, including most spoken languages and country listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region` | string | Yes | Continent/region name: 'europe', 'asia', 'africa', 'america', 'oceania'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_countries_by_region \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region":"<string>"}'
```

### Get country codes

International country codes for all countries: ISO 3166-1 alpha-2, alpha-3, numeric, IOC, FIPS 10, license plate, and internet domain codes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_country_codes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get country economy

Economic statistics for a country including top companies, imports/exports, and budget data, organized by section.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country_path` | string | Yes | Country path as 'continent/country' (e.g. 'europe/germany', 'america/usa', 'asia/japan'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_country_economy \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country_path":"<string>"}'
```

### Get country overview

Detailed overview of a single country covering languages, religions, economy, transport, land use, and political indicators. Data is organized into named sections.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country_path` | string | Yes | Country path as 'continent/country' (e.g. 'europe/germany', 'asia/japan', 'america/usa', 'africa/nigeria'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_country_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country_path":"<string>"}'
```

### Get country population history

Year-by-year historical population growth for a country, including birth/death rates compared to world averages. May include sub-national regional data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country_path` | string | Yes | Country path as 'continent/country' (e.g. 'europe/germany', 'asia/japan', 'america/usa'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_country_population_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country_path":"<string>"}'
```

### Get education by country

Countries ranked by educational attainment from elementary through doctoral levels, with an overall ranking score.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_education_by_country \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get iq by country

Countries ranked by average IQ score, with average income, education expenditure per inhabitant, and average daily maximum temperature.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_iq_by_country \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get languages worldwide

Global ranking of languages by number of native speakers, including how many countries each is spoken in and used as an official language.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_languages_worldwide \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get largest countries

Countries ranked by total population, including area and population density per km².

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_largest_countries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get life expectancy worldwide

Countries ranked by life expectancy, including male and female life expectancy, birth rate, and death rate.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_life_expectancy_worldwide \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get population density worldwide

Countries ranked by population density (inhabitants per km²). Each record includes country name, area, population, and density.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_population_density_worldwide \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get population growth worldwide

Ranked list of countries by average annual population growth rate for a given period. Each record includes country name, average yearly growth percentage, and total growth over the period. Defaults to 2015-2024 when no period is specified.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `period` | string | No | Time period in 'YYYY-YYYY' format. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_population_growth_worldwide \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"period":"<string>"}'
```

### Get quality of life

Countries ranked by composite quality of life index with sub-scores for stability, rights, health, safety, climate, costs, and popularity.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_quality_of_life \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get refugees data

Refugee statistics: top countries of origin and top destination countries with asylum application counts per year.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_refugees_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get religions worldwide

Global distribution of religions ranked by worldwide percentage of followers, including regional distribution details.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/get_religions_worldwide \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search site

Full-text search across all worlddata.info content. Returns matching page titles, URLs, and description snippets.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase (e.g. 'population', 'climate France', 'GDP'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-worlddata-info-api-199791d0/search_site \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
