Entity search API quickstart: a first Statsnet request
Quick answer. Start with the public routes, which need no key: fetch a Markdown company card and resolve a national identifier to Statsnet’s internal ID. Then add an x-api-key header and run POST /companies/search, followed by the paid profile and relations for the company you confirm.
Steps
-
Open a public card
Fetch the Markdown profile for a known identifier; no key is involved.
-
Resolve the internal ID
Call get_id with jurisdiction and national identifier.
-
Search with a key
POST /companies/search with a query, a jurisdiction filter and a limit.
-
Pull paid data
Request /paid and /relations for the confirmed ID only.
Base URL and keys
Every route sits under https://statsnet.co/api/v1 and returns JSON, apart from the Markdown card. Keys look like sk_live_ followed by a token; an account can hold up to 10, and each inherits its owner’s subscription. Give each service its own key so a leak can be revoked without touching the rest.
The full contract is published as OpenAPI 3.1 at statsnet.co/api/v1/openapi.json, with a Swagger UI alongside. Generating a client from that spec is safer than hand-typing field names. Statsnet also ships SDKs for Python (statsnet-python-sdk), JavaScript and Go.
Reading errors
A 401 means the key is missing or wrong; 402 means the subscription is inactive; 403 means the route is not on your plan; 404 means no such company; 429 means quota or rate limit. Back off on 429 rather than retrying in a tight loop. Details sit in the Statsnet API documentation.
Example requests
curl "https://statsnet.co/api/v1/companies/kz/000740000728/md" curl "https://statsnet.co/api/v1/companies/get_id/kz/000740000728" curl -X POST "https://statsnet.co/api/v1/companies/search?limit=20" \
-H "x-api-key: sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Northwind Freight", "filters": {"jurisdiction": ["kz"]}}' curl "https://statsnet.co/api/v1/companies/COMPANY_ID/relations" \
-H "x-api-key: sk_live_YOUR_KEY" pip install statsnet-python-sdk