Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Spatialindia Com Indicators API
version: 1.0.0
contact:
name: Spatial India
url: https://spatialindia.com/api-platform
license:
name: Free for personal and non-commercial use, with attribution
url: https://spatialindia.com/terms
termsOfService: https://spatialindia.com/terms
description: 'Operations tagged Indicators across 2 of this provider''s published API definitions: openapi.json, spatialindia-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.spatialindia.com/v1
tags:
- name: Indicators
paths:
/indicators:
get:
operationId: listIndicators
summary: The indicator catalogue
description: 'Every indicator id with its name, unit, source, vintage, caveat, estimation method, ranking polarity, district coverage and how many of those districts report a hard zero. Start here: ids are stable and are what every other endpoint takes.'
parameters:
- name: q
in: query
required: false
schema:
type: string
description: Free-text filter. Every word must appear in the id, name, description, category, source or caveat of an indicator for it to match.
example: land inequality
- $ref: '#/components/parameters/catalogueLimit'
- $ref: '#/components/parameters/offset'
responses:
'200':
description: The catalogue.
content:
application/json:
schema:
$ref: '#/components/schemas/IndicatorList'
'400':
description: An invalid `limit` or `offset`.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Indicators
servers:
- url: https://api.spatialindia.com/v1
components:
schemas:
Indicator:
type: object
properties:
id:
type: string
description: Stable. A published id is never reused or removed.
name:
type: string
description:
type:
- string
- 'null'
unit:
type:
- string
- 'null'
source:
type:
- string
- 'null'
source_key:
type:
- string
- 'null'
vintage:
type:
- string
- 'null'
category:
type: array
items:
type: string
polarity:
type:
- string
- 'null'
enum:
- higher-better
- higher-worse
- neutral
- null
caveat:
type:
- string
- 'null'
estimation_method:
type:
- string
- 'null'
coverage:
type:
- integer
- 'null'
description: How many districts carry a value. The rest are `null`, not zero.
zero_districts:
type:
- integer
- 'null'
description: 'How many of `coverage` are exactly 0. Read it before ranking ascending: `ncrb_sll_dv_cases` is 0 in 734 of 769 districts because the act is barely used, so the "best" tail is under-reporting, not safety.'
status:
type: string
enum:
- published
- deprecated
replaced_by:
type: string
description: Present only on a deprecated indicator that has a successor.
required:
- id
- name
- category
- status
Error:
type: object
properties:
error:
type: string
description: A stable machine-readable code.
message:
type: string
hint:
type: string
description: How to correct the request. Present on some 404s.
required:
- error
IndicatorList:
type: object
properties:
meta:
$ref: '#/components/schemas/CatalogueMeta'
total:
type: integer
description: Matches before paging.
count:
type: integer
description: Entries in this page.
indicators:
type: array
items:
$ref: '#/components/schemas/Indicator'
required:
- meta
- total
- count
- indicators
CatalogueMeta:
type: object
description: The `meta` block of `/v1/indicators`. It has no `indicators` key — the response body is that.
properties:
dataset_version:
type: string
boundary_vintage:
type: string
districts:
type: integer
attribution:
type: array
items:
type: string
citation:
type: string
required:
- dataset_version
- boundary_vintage
- districts
- attribution
- citation
parameters:
catalogueLimit:
name: limit
in: query
required: false
schema:
type: integer
minimum: 1
description: Omit to get the whole catalogue, which is the usual call.
offset:
name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
x-refined-from:
- openapi.json
- spatialindia-com-openapi.json