curl --request POST \
--url https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"countries": [
"FIN"
],
"edition": 2026,
"include_factors": true,
"page_size": 1
}
'import requests
url = "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings"
payload = {
"countries": ["FIN"],
"edition": 2026,
"include_factors": True,
"page_size": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({countries: ['FIN'], edition: 2026, include_factors: true, page_size: 1})
};
fetch('https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'countries' => [
'FIN'
],
'edition' => 2026,
'include_factors' => true,
'page_size' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings"
payload := strings.NewReader("{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"complete": true,
"count": 1,
"next_cursor": null,
"observed_at_ms": 1789178518688,
"records": [
{
"annual_rank": 1,
"annual_score": "7.811",
"change_since_2012": "0.375",
"change_since_2012_rank": 51,
"country": "Finland",
"data_year": 2025,
"dystopia_residual": null,
"edition": 2026,
"explained_by": {
"freedom": "0.142",
"gdp_per_capita": "0.247",
"generosity": "0.012",
"healthy_life_expectancy": "0.121",
"perceptions_of_corruption": "0.063",
"social_support": "0.211"
},
"explained_by_unit": "Share of the life evaluation score explained by this factor (0–1; dashboard label 'Explains', shown as a percentage)",
"factor_ranks": {
"freedom": 11,
"gdp_per_capita": 17,
"generosity": 46,
"healthy_life_expectancy": 18,
"perceptions_of_corruption": 2,
"social_support": 9
},
"factors": {
"freedom": {
"rank": 11,
"unit": "Percentage",
"value": "94.1"
},
"gdp_per_capita": {
"rank": 17,
"unit": "US Dollars ($), purchasing power parity, constant 2017 international dollars",
"value": "55770"
},
"generosity": {
"rank": 46,
"unit": "Percentage",
"value": "40.6"
},
"healthy_life_expectancy": {
"rank": 18,
"unit": "Years",
"value": "69.9"
},
"negative_affect": {
"rank": 11,
"unit": "Percentage",
"value": "16.5"
},
"perceptions_of_corruption": {
"rank": 2,
"unit": "Percentage",
"value": "21.0"
},
"positive_affect": {
"rank": 39,
"unit": "Percentage",
"value": "72.9"
},
"social_support": {
"rank": 9,
"unit": "Percentage",
"value": "93.4"
}
},
"flags": {
"amended": false,
"source_flag": null
},
"id": "whr:2026:FIN",
"inequality_rank": 2,
"inequality_sd": null,
"iso3": "FIN",
"ladder_score": "7.764",
"ladder_score_unit": "Score (0–10)",
"lower_whisker": null,
"rank": 1,
"region": "Western Europe",
"source_url": "https://data.worldhappiness.report/country/FIN",
"source_vintage": "data.worldhappiness.report dashboard (edition 2026 vintage)",
"table_url": "https://data.worldhappiness.report/table",
"upper_whisker": null,
"years_covered": "2023–2025"
}
],
"retrieved_at": "2026-09-12T02:01:58.688Z",
"schema_version": "1.0.0",
"source_updated_at": null,
"source_url": "https://data.worldhappiness.report",
"warnings": []
}Rankings
One page of a World Happiness Report edition’s ranking table (three-year average Cantril ladder score and rank) with the six explanatory-factor shares and raw factor levels from the dashboard country view. edition N reads dashboard data year N-1. Paginate with next_cursor; filter to ISO3 codes with countries.
curl --request POST \
--url https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"countries": [
"FIN"
],
"edition": 2026,
"include_factors": true,
"page_size": 1
}
'import requests
url = "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings"
payload = {
"countries": ["FIN"],
"edition": 2026,
"include_factors": True,
"page_size": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({countries: ['FIN'], edition: 2026, include_factors: true, page_size: 1})
};
fetch('https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'countries' => [
'FIN'
],
'edition' => 2026,
'include_factors' => true,
'page_size' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings"
payload := strings.NewReader("{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"countries\": [\n \"FIN\"\n ],\n \"edition\": 2026,\n \"include_factors\": true,\n \"page_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"complete": true,
"count": 1,
"next_cursor": null,
"observed_at_ms": 1789178518688,
"records": [
{
"annual_rank": 1,
"annual_score": "7.811",
"change_since_2012": "0.375",
"change_since_2012_rank": 51,
"country": "Finland",
"data_year": 2025,
"dystopia_residual": null,
"edition": 2026,
"explained_by": {
"freedom": "0.142",
"gdp_per_capita": "0.247",
"generosity": "0.012",
"healthy_life_expectancy": "0.121",
"perceptions_of_corruption": "0.063",
"social_support": "0.211"
},
"explained_by_unit": "Share of the life evaluation score explained by this factor (0–1; dashboard label 'Explains', shown as a percentage)",
"factor_ranks": {
"freedom": 11,
"gdp_per_capita": 17,
"generosity": 46,
"healthy_life_expectancy": 18,
"perceptions_of_corruption": 2,
"social_support": 9
},
"factors": {
"freedom": {
"rank": 11,
"unit": "Percentage",
"value": "94.1"
},
"gdp_per_capita": {
"rank": 17,
"unit": "US Dollars ($), purchasing power parity, constant 2017 international dollars",
"value": "55770"
},
"generosity": {
"rank": 46,
"unit": "Percentage",
"value": "40.6"
},
"healthy_life_expectancy": {
"rank": 18,
"unit": "Years",
"value": "69.9"
},
"negative_affect": {
"rank": 11,
"unit": "Percentage",
"value": "16.5"
},
"perceptions_of_corruption": {
"rank": 2,
"unit": "Percentage",
"value": "21.0"
},
"positive_affect": {
"rank": 39,
"unit": "Percentage",
"value": "72.9"
},
"social_support": {
"rank": 9,
"unit": "Percentage",
"value": "93.4"
}
},
"flags": {
"amended": false,
"source_flag": null
},
"id": "whr:2026:FIN",
"inequality_rank": 2,
"inequality_sd": null,
"iso3": "FIN",
"ladder_score": "7.764",
"ladder_score_unit": "Score (0–10)",
"lower_whisker": null,
"rank": 1,
"region": "Western Europe",
"source_url": "https://data.worldhappiness.report/country/FIN",
"source_vintage": "data.worldhappiness.report dashboard (edition 2026 vintage)",
"table_url": "https://data.worldhappiness.report/table",
"upper_whisker": null,
"years_covered": "2023–2025"
}
],
"retrieved_at": "2026-09-12T02:01:58.688Z",
"schema_version": "1.0.0",
"source_updated_at": null,
"source_url": "https://data.worldhappiness.report",
"warnings": []
}Request contract
- Method and path: POST /apis/v1/worldhappiness-report/happiness/rankings
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/worldhappiness-report/happiness/rankings
{
"operationId": "worldhappiness-report.happiness.rankings",
"method": "POST",
"path": "/apis/v1/worldhappiness-report/happiness/rankings",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"countries": [
"FIN"
],
"edition": 2026,
"include_factors": true,
"page_size": 1
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"countries": {
"description": "Optional ISO3 filter; unranked codes are reported in warnings.",
"items": {
"type": "string"
},
"type": "array",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"cursor": {
"description": "next_cursor from the previous page; encodes the edition. Pattern: ^v1:[0-9]{4}:[0-9]{1,4}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"edition": {
"description": "Report year (2013–2026 published). Required unless cursor is given.\n\nProvider reference: minimum 2013; maximum 2031.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 2031,
"min": 2013
}
},
"include_factors": {
"description": "false skips the per-country detail calls (faster; explained_by and factors are null).",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"page_size": {
"default": 20,
"description": "page_size\n\nProvider reference: minimum 1; maximum 50; default 20.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 50,
"min": 1
}
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
Response
One page of a World Happiness Report edition's ranking table (three-year average Cantril ladder score and rank) with the six explanatory-factor shares and raw factor levels from the dashboard country view. edition N reads dashboard data year N-1. Paginate with next_cursor; filter to ISO3 codes with countries.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
complete | boolean | true when every requested source call succeeded; false when a partial source failure left some fields null (see warnings). Not a statement about remaining pages. |
count | number | |
next_cursor | string | |
observed_at_ms | number | |
records | object[] | |
retrieved_at | string | RFC 3339 UTC, millisecond precision. |
schema_version | string | |
source_updated_at | object | The dashboard exposes no last-modified metadata; always null rather than the retrieval time. |
source_url | string | |
warnings | string[] |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.