Get a value for a place
The quickest way to answer a question like "what was the population of the North West in 2022?". Give a measure and a place name and you get a single number back, with a note of exactly how it was worked out.
/data/{measure-id}/valueGood to know
- Leave out
periodto get the latest one. The answer tells you when it did that, withperiodDefaulted. - If a name could mean several places with different answers, you'll get a
409listing thechoices. Pass one of theirplacereferences to pick. - Already know the area code? Get observations or Get a time series give you more control.
measure-idstringrequiredA measure id from
GET /v1/measures, such aspopulation, or one of itsaliases, such ashouse-prices. An alias is read as the id it names, and the response'sContent-Locationheader gives the request it was read as. Case, spaces and punctuation are set aside, soHouse Pricesishouse-prices.
placestringoptionalA place name, an area code, a unit postcode, or a place reference such as
localAuthority/E08000003orpostcode/SW1A1AAfromGET /v1/places. One ofplaceorpostcodeis required.postcodestringoptionalA full unit postcode, in any case and with or without its space. Refused as
/postcodes/{postcode}refuses it.geographystringoptionalWith
postcode, the geography to answer in, such aslsoaorlocalAuthority. Omit for the finest that answers.boundaryYearstringoptionalWith
postcode, the boundary year of the partition to answer from. Omit for the newest.periodstringoptionalA published period. Omit for the latest.
Returns
EnvelopeThe answer, the place it is for, and the route that gives it.
apiVersionv1requiredatlasReleasestringrequiredThe immutable
/atlas-releasereleaseIdfor the artifacts that produced this response.metaobjectrequiredShowHide1 child field
nextCursorstring | nullrequiredOpaque cursor for the next page, or null at the end.
- 400A query parameter is malformed or its cursor is not valid for this result set.
- 404No published measure has that id, or no place is called or coded that.
- 409The name gives more than one distinct answer.
choiceslists each place with its answer and the request that asks about it alone. - 422The name matches places, but the measure answers none of them.
candidatessays why for each. - 503The referenced build artifact has not been built yet.
Every error has the same shape. See Errors for how to handle them.
Show the precise behaviourHide the precise behaviour
A deliberately narrow convenience for a place-name question, not the primary way to fetch one observation: it resolves the name and dispatches to a route that already serves that kind of place. Ask /data/{measure-id} for observations, or /data/{measure-id}/series for one area's values, when the area is already known.
It answers "what is the population of the North West?" in one call. The place may be a name, an area code or a place reference from /places; the period may be omitted, in which case the latest the chosen partition publishes is used and the answer says so. Where a name may mean several places, GET /v1/places?q=Newport lists them first, and a candidate's place reference asks about that one alone: GET /v1/data/population/value?place=localAuthority/W06000022.
Nothing is computed here. Each place the name could mean is put to the route that already serves that kind of place: series for an area, aggregate for a curated location or a country. The value, its provenance and every refusal are exactly what that route gives, and via names the call that gives the answer directly, for citing or repeating.
The candidate is chosen by what the measure can answer rather than by guessing what was meant. Places matching the name exactly are tried first; names merely beginning with it only when no exact match answers. Answers resting on the same partition, period and area codes are the same ground reached two ways and count once, keeping the publisher's own observation over an aggregate of one member: Manchester the authority and Manchester the curated location of that authority give one answer. The other places the name matched are listed in otherMatches, answered or not.
When the name gives more than one distinct answer, the usual geography tier chooses the most likely match. question.placeDefaulted says this happened and otherMatches lists every alternative with its answer or refusal. "Newport", for example, defaults to the Welsh authority over wards of the same name. When the name matches places but the measure answers none, the response is a 422 with a candidates member saying why for each, such as a median, which cannot be summed over a region.
Give postcode instead of place to answer for where a unit postcode is: GET /v1/data/imd-decile/value?postcode=M1 1AE. The postcode's centroid is placed in the areas the data was published for, as drawn for the data's own boundary year rather than today's, in a boundary release holding that partition's codes; boundaryMatch names it. With no geography, the finest geography the measure is published on is tried first, and a coarser one only where a finer does not cover the postcode's country or has no value there; passedOver says why, and otherGeographies gives the request for each other geography. A centroid on a shared boundary whose areas answer differently is a 409 with choices, and a postcode no geography answers is a 422 with a candidates member saying why for each.