Get a time series
get_seriesGet 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}, gaps?, gap_notes?, source, other_frequencies?, longer_history?, note?, projections_available?}. gaps lists periods the source did not publish; gap_notes gives the publisher's reason when known. Projections (for example population to 2050) are never mixed into points. Pass include_projections: true to get them in a separate projections block {label, vintage, points, source}; always say a projected figure is a projection. Every plan gets the full history. One call returns up to 5,000 points: the latest ones, or the first ones from "from" when you pass it. truncated says when the series was cut; pass from and to to page through it. transform works as in get_value, on every point: {"indicator": "registered_unemployment", "place": "España", "from": "2023-01", "transform": "yoy"}, {"indicator": "unemployment_rate", "place": "Texas", "transform": "rolling_mean", "window": 3}. points hold the results; point_inputs[period] lists the [role, period, value] inputs of each point; transform.inputs names the series behind each role with its source; transform.gaps lists the periods that could not be computed and why. Not combinable with include_projections. With as_of the points are the series as Invokely held it then, plus vintages {period: {version, known_since}}, revised_later {period: current value} for points changed since, vintage_coverage_starts and not_on_record (periods whose value then was not kept). Projections are never returned with as_of.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional last period, inclusive. | |
| base | No | index: the period equal to 100, for example "2015" or "2020-01" (a year of a monthly series is the average of its months). real: the year whose prices values are expressed in, for example "2024". | |
| from | No | Optional first period, inclusive. Same formats as period. | |
| as_of | No | Optional point in time, UTC: a date ("2026-10-03", meaning the end of that day) or a date and time with a zone ("2026-10-03T14:30:00Z"). Returns the figures as Invokely held them at that instant, for backtests, audits and reproducible runs. Must not be in the future. | |
| 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), "Austin, TX", "us-place-4805000", "fips:4805000" (US city GEOID). | |
| window | No | rolling_mean only: number of periods averaged, 2 to 12. Default 3. | |
| country | No | Optional ISO 3166-1 alpha-2 code to disambiguate the place, for example "ES" or "US". | |
| frequency | No | Optional. Force a frequency when the indicator exists in several (for example monthly and annual unemployment). | |
| indicator | Yes | Indicator id from search_indicators, for example "population", "registered_unemployment_rate", "unemployment_rate", "cpi_annual_change", "net_income_per_person". | |
| transform | No | Optional calculation done by the server, with every input cited. pct_change: % change from the previous period. yoy: % change from the same period a year earlier (12 months, 4 quarters or 1 year back). diff, yoy_diff: the same changes as differences, in the indicator unit (percentage points for rates). index: value / value in base x 100 (needs base). rolling_mean: average of the last window periods. per_capita, per_1000, per_100k: a total (population, births, GDP, emissions) divided by the population of the same place and year. real: a money amount at current prices adjusted for inflation with the consumer price index of the place's country in the same currency (base: price year, default the latest complete year). share_of_parent: a total as % of the parent place (county of its state, state of the nation, region of its country). Per person and share transforms refuse rates, shares, indices, medians and per person values, and share_of_parent also refuses net balances such as net migration; pct_change, yoy and index refuse percentages. | |
| citation_style | No | Optional. 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. Leave it out to keep the response short. | |
| include_projections | No | Also return the publisher projections after the last observed period, kept apart from points. Default false. |