Documentation
Invokely exposes the same five operations through an MCP server and a REST API. Every figure comes with its period, unit and source. Claude.ai and ChatGPT connect with OAuth; other clients use an API key.
Quick start
- Create an account and copy your API key from the dashboard. /login
- Add the MCP server to your client with one of the configurations below.
- Ask a question such as: what is the unemployment rate in Texas and how does it compare with California and the United States?
Endpoints
https://invokely.ai/mcp. MCP server (Streamable HTTP). Requires an API key or OAuth.https://invokely.ai/mcp/trial. MCP server without an account, 25 calls a day per IP address.https://invokely.ai/api/v1. REST API. Same operations, same metering.
Authentication
Send the API key as Authorization: Bearer ivk_... or as an x-api-key header. Clients that cannot set headers, such as Claude.ai and ChatGPT connectors, use OAuth: add the server URL and sign in when asked.
Client configuration
Claude Code
claude mcp add --transport http invokely https://invokely.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"Claude Desktop and Claude.ai
In Claude.ai or Claude Desktop, open Settings, Connectors, Add custom connector, and paste the URL. You will be asked to sign in to Invokely.
https://invokely.ai/mcpChatGPT
In ChatGPT, enable developer mode, create a connector with the URL below and choose OAuth. Sign in to Invokely when prompted.
https://invokely.ai/mcpCursor
{
"mcpServers": {
"invokely": {
"url": "https://invokely.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}VS Code
{
"servers": {
"invokely": {
"type": "http",
"url": "https://invokely.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Tools
search_indicators
Find official statistical indicators by natural language, in English or Spanish. Use this first when you do not know the exact indicator id.
Coverage: Spain (municipalities, provinces, regions, national), EU countries, and the United States (nation, states, counties). Topics: population and demography, unemployment and employment, prices and inflation, income, GDP, housing, companies, tourism, interest rates, public finance.
Pass geography when the question is about a specific place: indicators not published at that place's level are ranked lower.
Example: {"query": "tasa de paro", "geography": "Mataró"}.
Returns {indicators: [{id, name, unit, frequency, levels, definition, note?}]}. Read note: it explains common confusions, such as survey unemployment rate versus registered unemployment.| Argument | Required | Description |
|---|---|---|
query | yes | What you are looking for, for example "inflation", "paro registrado", "average income per person". |
geography | no | Optional place the data is for. Same format as place in the other tools. |
resolve_place
Turn a place name into the normalized entity Invokely uses, with its official codes (INE, Idescat, NUTS, ISO, US FIPS) and parent.
Use it when a name is ambiguous or you want to confirm which entity a number refers to. The other tools accept names directly, so this call is optional.
Ambiguous names prefer the municipality ("Barcelona" is the city); the province and region come back in alternatives. Ask for "provincia de Barcelona" to get the province.
US states are regions and US counties are provinces. Names shared by several places of the same level, such as "Washington County", return an AMBIGUOUS_PLACE error with suggestions; add the state ("Washington County, Oregon") or pass a suggested id.
Example: {"name": "Mataró"}. Returns {match: {id, name, level, country, population, parent, codes}, alternatives: [{id, name, level}]}.| Argument | Required | Description |
|---|---|---|
name | yes | Place name or id. Examples: "Mataró", "Barcelona", "provincia de Barcelona", "Cataluña", "España", "Germany", "EU", "es-mun-08121", "08121" (INE code), "ES51" (NUTS), "Texas", "Travis County, Texas", "us-county-48453", "fips:48453" (US county FIPS). |
country | no | Optional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US". |
level | no | Optional preferred level. |
get_value
Get one official figure for an indicator and place: the latest by default, or a given period.
Use it for questions like "population of Mataró", "inflation in Spain in 2024-09", "unemployment rate in Cataluña", "unemployment rate in Texas".
Example: {"indicator": "population", "place": "Mataró"}.
Returns {indicator: {id, name, unit}, place: {id, name, level}, period, value, status?, source: {name, title, url, retrieved, published?, citation, inputs?}, note?}.
Always cite source.citation or source.url when you answer. status "provisional" or "estimated" means the figure may be revised; say so.
If the indicator is not published for that place you get an error that names the levels where it exists and related indicators that do have data.| Argument | Required | Description |
|---|---|---|
indicator | yes | Indicator id from search_indicators, for example "population", "registered_unemployment_rate", "unemployment_rate", "cpi_annual_change", "net_income_per_person". |
place | yes | Place name or id. Examples: "Mataró", "Barcelona", "provincia de Barcelona", "Cataluña", "España", "Germany", "EU", "es-mun-08121", "08121" (INE code), "ES51" (NUTS), "Texas", "Travis County, Texas", "us-county-48453", "fips:48453" (US county FIPS). |
period | no | Optional. "2024" (year), "2024-Q3" (quarter), "2024-S1" (half year) or "2024-09" (month). Omit for the latest value. |
frequency | no | Optional. Force a frequency when the indicator exists in several (for example monthly and annual unemployment). |
country | no | Optional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US". |
get_series
Get the time series of an indicator for one place, oldest to newest, from one source so the points are comparable.
Use it for trends: "evolution of the CPI by month", "population of Mataró since 2015".
Example: {"indicator": "cpi_annual_change", "place": "España", "from": "2023-01"}.
Returns {indicator, place, frequency, points: [[period, value], ...], total_points, truncated?, flags?: {period: status}, source, other_frequencies?}.
Free and Builder plans receive the latest 60 points; truncated says when history was cut.| Argument | Required | Description |
|---|---|---|
indicator | yes | Indicator id from search_indicators, for example "population", "registered_unemployment_rate", "unemployment_rate", "cpi_annual_change", "net_income_per_person". |
place | yes | Place name or id. Examples: "Mataró", "Barcelona", "provincia de Barcelona", "Cataluña", "España", "Germany", "EU", "es-mun-08121", "08121" (INE code), "ES51" (NUTS), "Texas", "Travis County, Texas", "us-county-48453", "fips:48453" (US county FIPS). |
from | no | Optional first period, inclusive. Same formats as period. |
to | no | Optional last period, inclusive. |
frequency | no | Optional. Force a frequency when the indicator exists in several (for example monthly and annual unemployment). |
country | no | Optional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US". |
compare
Compare one indicator across 2 to 10 places for the same period, using one shared source and definition whenever possible.
Use it for "how does X compare with Y and Z". Places can mix levels, for example a city, a larger city and its region.
Example: {"indicator": "registered_unemployment_rate", "places": ["Mataró", "Barcelona", "Cataluña"]}.
Returns {indicator, period, comparable, values: [{place, value, status?}], source, notes?}. When comparable is false the values come from different sources or periods and notes explain why; mention it in your answer.
For unemployment in municipalities use registered_unemployment_rate: the survey unemployment_rate is not published below province level.| Argument | Required | Description |
|---|---|---|
indicator | yes | Indicator id from search_indicators, for example "population", "registered_unemployment_rate", "unemployment_rate", "cpi_annual_change", "net_income_per_person". |
places | yes | Place names or ids. |
period | no | Optional. "2024" (year), "2024-Q3" (quarter), "2024-S1" (half year) or "2024-09" (month). Omit for the latest value. |
country | no | Optional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US". |
REST API
All data endpoints use GET and return {"data": ...} or {"error": {code, message, hint?}}. The remaining allowance is sent in the x-invokely-remaining header.
GET /api/v1/indicators?q=unemployment&geography=Texas | Search indicators |
GET /api/v1/places/resolve?name=Travis County | Resolve a place name to official codes |
GET /api/v1/value?indicator=population&place=California | Latest or dated value |
GET /api/v1/series?indicator=cpi_annual_change&place=United States&from=2023-01 | Time series |
GET /api/v1/compare?indicator=unemployment_rate&place=Texas&place=California&place=United States | Compare places |
GET /api/v1/export.csv?indicator=population&place=California | CSV export (Pro or credits) |
GET /api/v1/catalog | Full indicator catalog (free) |
GET /api/v1/sources | Sources and their status (free) |
GET /api/v1/usage | Your usage this month (free) |
curl -H "Authorization: Bearer YOUR_API_KEY" "https://invokely.ai/api/v1/value?indicator=population&place=California"
Response format
Responses are compact JSON. Every value carries a source block with the publisher, dataset title, URL, retrieval date and a ready-made citation. Derived indicators list their inputs.
Citation rules for agents
Quote the period and cite source.citation or source.url. Mention status when a figure is provisional or estimated. When compare returns comparable false, say that the values come from different sources or periods.
Errors
Errors carry a code (INVALID_ARGUMENT, INDICATOR_NOT_FOUND, PLACE_NOT_FOUND, NO_DATA, QUOTA_EXHAUSTED, RATE_LIMITED), a message, and often a hint and suggestions the agent can act on.
Limits
Free 500, Builder 10,000 and Pro 60,000 calls a month, plus prepaid credits. Burst limits are 30, 120 and 300 requests a minute. Free and Builder series return the latest 60 points.