SDK quickstart: Python, JavaScript and Go
Quick answer. Statsnet publishes SDKs for Python (pip install statsnet-python-sdk), JavaScript and Go on GitHub. Each wraps the REST API at statsnet.co/api/v1, which authenticates with an x-api-key header. Public endpoints work without a key and are rate limited.
Steps
-
Pick an SDK
Python from PyPI, JavaScript from github.com/statsnet/js-sdk, Go from github.com/statsnet/gosdk.
-
Store the key
Put sk_live_... in an environment variable. Up to 10 keys per account, each inheriting the owner’s subscription.
-
Search and resolve
Call company search, then relations on the chosen ID.
-
Hand off to OFAC
Send each returned name to Sanctions List Search or your screening engine.
Method names
Method names differ between the SDKs, so read the README in each repository rather than assuming they match the HTTP paths. When in doubt, the OpenAPI 3.1 specification is the reference all three follow, and the Swagger UI lets you try calls in a browser.
Errors to handle
Statsnet returns 401 for a missing or invalid key, 402 for an inactive subscription, 403 for an endpoint outside the plan, 404 for an unknown company and 429 for quota or rate limit. In an OFAC prep job, a 404 should route the counterparty to manual research rather than silently dropping it from the name list. The Statsnet API documentation lists each code.
Example requests
pip install statsnet-python-sdk git clone https://github.com/statsnet/gosdk curl "https://statsnet.co/api/v1/companies/get_id/uz/{identifier}" curl "https://statsnet.co/api/v1/companies/{id}/meta/beta"