Get a time 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}, 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.
Request
- Base URL: https://invokely.ai
- URL: https://invokely.ai/api/v1/series
- 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.
Place name or id, for example Mataró, Texas, Japan, "Austin, TX", es-mun-08121, ES51 (NUTS), fips:48453 (US county) or fips:4805000 (US city).
First period, inclusive. Same formats as period.
Last period, inclusive. Same formats as period.
Force a frequency when the indicator exists in several.
ISO 3166-1 alpha-2 code that disambiguates the place, for example ES or US.
Language of names and definitions. Default en.
Also return the publisher projections after the last observed period, in a separate projections block. Not combinable with transform.
Calculation done by the server, with every input cited: pct_change, yoy, diff, yoy_diff, index (needs base), rolling_mean (window), per_capita, per_1000, per_100k, real (inflation adjusted, base is the price year) or share_of_parent. See the get_value tool description and /docs#transforms.
index: the period equal to 100, for example 2015 or 2020-01. real: the year whose prices values are in, for example 2024.
rolling_mean: number of periods averaged.
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.
Point in time, UTC: a date (the end of that day) or a date and time with a zone. Returns the figures as Invokely held them then, with version, known_since, revised_later and the current value when it changed since. Not in the future.
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.