Rank places
Rank every place of one level inside an area by an indicator: all countries of the world, EU countries, US states, the counties or cities of a state, US cities, the regions of a country, the municipalities of a Spanish province. Use it for "which state has the highest unemployment", "top 10 countries by GDP per capita", "poorest counties in Texas", "EU countries with the lowest inflation". level is the level of the ranked places (country, region, province, municipality); within is the area they belong to. US states are regions of "United States"; US counties are provinces of a state; US cities are municipalities of "United States" or of a state; EU NUTS 2 regions are regions of "EU" or of a country. Example: {"indicator": "unemployment_rate", "level": "region", "within": "United States", "limit": 5}. Countries of the world: {"indicator": "population", "level": "country"}. Returns {indicator, level, within, period, comparable, order, total, values: [{rank, place, value, status?}], source, notes?}. Every value comes from one source and one period. order "asc" lists the lowest first. Cite source.citation. For rates across municipalities pass min_population (for example 5000) so very small places, where a few people move the rate, do not top the list. transform ranks a calculated figure: per_capita, per_1000 or per_100k for totals (population from one series for every place), yoy or yoy_diff for change from a year earlier. Example: {"indicator": "gdp_usd", "level": "region", "within": "United States", "transform": "per_capita"}. Each value lists its inputs; places without an input are left out and counted in notes.
Request
- Base URL: https://invokely.ai
- URL: https://invokely.ai/api/v1/rank
- Auth: one of:
- HTTP bearer
- API key in header x-api-key
- none
Query parameters
Indicator id, for example population or registered_unemployment_rate. List them with /api/v1/catalog.
Level of the ranked places. US states are regions, US counties provinces and US cities municipalities.
Area whose places are ranked, for example "United States", "Germany", "Texas". Omit to rank every country.
2024 (year), 2024-Q3 (quarter), 2024-S1 (half year) or 2024-09 (month). Omit for the latest value.
Leave out places with fewer residents, for example 5000.
ISO 3166-1 alpha-2 code that disambiguates the place, for example ES or US.
Language of names and definitions. Default en.
Rank a calculated figure: per_capita, per_1000, per_100k (totals only) or yoy, yoy_diff.
Adds source.citations with the citation in this style (APA 7, MLA 9, Chicago author-date, Harvard, BibTeX or RIS), or in all six with all. The publisher is the author. Omit to keep the response short.
Response
Success. The body is {"data": ...}; the remaining allowance is in the x-invokely-remaining header.
Changes
No recorded changes to this operation across all 1 revision of this API.