> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# 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.

## 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`

[Complete OpenAPI definition](https://aisa.one/docs/openapi/worldhappiness-report.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "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.


## OpenAPI

````yaml openapi/worldhappiness-report.json POST /apis/v1/worldhappiness-report/happiness/rankings
openapi: 3.1.0
info:
  description: ''
  title: World Happiness Report
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    worldhappiness-report:
      description: ''
      title: World Happiness Report
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 2fb19c5af6fe777f2310ed64daddbfb463ccb8cc87263a3a3890d60f68a8224d
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/worldhappiness-report/happiness/countries
    - /apis/v1/worldhappiness-report/happiness/editions
    - /apis/v1/worldhappiness-report/happiness/panel
    - /apis/v1/worldhappiness-report/happiness/rankings
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:b74666e402eca9c9a658ad6b418b511beb6a6ce85ffaa7db78f7be50ef2b8fe2
    facts_hash: 2fb19c5af6fe777f2310ed64daddbfb463ccb8cc87263a3a3890d60f68a8224d
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: worldhappiness-report
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/worldhappiness-report/happiness/rankings:
    post:
      tags:
        - World Happiness Report
      summary: Rankings
      description: >-
        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.
      operationId: worldhappiness-report.happiness.rankings
      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.


                    Provider 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

                    Provider reference: minimum 1; maximum 50; default 20.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 50
                    min: 1
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-09-12T02:01:58Z.
                  summary: Official provider example
                  value:
                    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: []
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            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.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.