Skip to Content
API ReferenceObservationsLatest observation

Latest Observation

GET /v1/observations/latest returns the latest row for an indicator and optional region. This endpoint requires an API key or x402 payment.

Request

curl "https://api.creativeforesight.io/v1/observations/latest?indicator=UNRATE&region=US" \ -H "Authorization: Bearer $CF_API_KEY"

Query parameters

ParameterTypeRequiredDescription
indicatorstringYesIndicator code, such as UNRATE or cf:labor_composite.
sourcestringNoSource slug for duplicate provider codes.
regionstringNoRegion code. Uses the indicator default region when omitted.

Latest observation object

FieldTypeDescription
indicatorstringIndicator code.
regionstringRegion code.
period_startdateStart of the observation period.
period_enddate or nullEnd of the observation period when available.
period_typestring or nullPeriod type, such as month.
valuenumberLatest value.
revisionintegerRevision number.
is_preliminarybooleanWhether the latest value is preliminary.
source_updated_atdate-time or nullProvider update timestamp.
unitstring or nullUnit label.

Response

{ "data": { "indicator": "UNRATE", "region": "US", "period_start": "2026-05-01", "period_end": null, "period_type": "month", "value": 4.2, "revision": 0, "is_preliminary": false, "source_updated_at": "2026-06-06T12:00:00.000Z", "unit": "percent" }, "meta": { "indicator": "UNRATE", "region": "US", "unit": "percent", "total": 1, "limit": 1, "offset": 0 } }

If no row exists for a valid indicator and region, data can be null and meta.total is 0.

Errors

StatusCodeMeaning
400INVALID_PARAMETERRequired or optional query parameters are invalid.
401INVALID_API_KEYThe request did not include a valid API key and was not a settled x402 request.
404RESOURCE_NOT_FOUNDThe requested indicator or region was not found.
429RATE_LIMIT_EXCEEDEDThe API key exceeded its one-minute request limit.
500INTERNAL_SERVER_ERRORLatest observation data could not be loaded.
Last updated on