China SnapshotDocs
Get a key ↗
Open in AI ↗
Open in ChatGPTOpen in ClaudeView Markdown
API reference

One official indicator, free

getIndicator · GET /api/indicators/{slug}.json

Endpoint#

GET /api/indicators/{slug}.json

Latest value, source, next release, a recent window, and the history charted on /indicators/{slug}. This is one series (or the sub-series that share that page). It is not a bulk download of every indicator. No key.

Authentication#

json
[]

An empty security requirement means this operation does not declare authentication. Read operation notes for entitlement and protocol-method requirements.

Parameters#

NameInRequiredDescription
slugpathYesIndicator slug, for example china-cpi.

Responses and errors#

HTTP statusMeaning
200The public indicator record.
404No such indicator.

Response examples#

No response example is supplied by OpenAPI for this operation. The complete response schemas are preserved below; use an actual response for observed values.

Retry guidance#

See errors and retries. Honor operation-specific response headers. A POST may create state; do not replay it automatically.

Complete operation contract#

The expanded contract below includes all parameter constraints, response headers, schemas and examples from OpenAPI.

json
{
  "path": "/api/indicators/{slug}.json",
  "method": "GET",
  "parameters": [
    {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[a-z0-9-]{1,64}$"
      },
      "description": "Indicator slug, for example china-cpi."
    }
  ],
  "operationId": "getIndicator",
  "summary": "One official indicator, free",
  "description": "Latest value, source, next release, a recent window, and the history charted on /indicators/{slug}. This is one series (or the sub-series that share that page). It is not a bulk download of every indicator. No key.",
  "tags": [
    "data"
  ],
  "security": [],
  "responses": {
    "200": {
      "description": "The public indicator record.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object"
          }
        }
      }
    },
    "404": {
      "description": "No such indicator."
    }
  },
  "x-codeSamples": [
    {
      "lang": "curl",
      "label": "curl",
      "source": "curl -s 'https://china-snapshot.com/api/indicators/china-cpi.json'"
    }
  ]
}

Search documentation