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?, source, other_frequencies?, longer_history?, note?, projections_available?}. gaps lists periods the source did not publish. 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. Free and Builder plans receive 60 points: the latest ones, or the first ones from "from" when you pass it. truncated says when history was cut.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional last period, inclusive. | |
| from | No | Optional first period, inclusive. Same formats as period. | |
| 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). | |
| 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". | |
| include_projections | No | Also return the publisher projections after the last observed period, kept apart from points. Default false. |