Get one value
get_valueGet 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?}. note is a caveat about the source series served. Always cite source.citation or source.url when you answer. When source.via is present (Data Commons), the publisher is still the original agency; the citation already names both. status "provisional" or "estimated" means the figure may be revised; say so. status "low_reliability" means the publisher flags the figure as of low reliability (usually a small survey sample); say so and treat it as a rough indication. 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| 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". |