Code examples
Rather than duplicating code in this documentation, examples are
maintained in the examples/ directory of the
sens-toolkit repository
(placeholder — the repo is local-only and private today, see the note in
MCP Server), so they always stay accurate and
runnable.
Python
examples/python/get_prices.py— a single price lookup for a given OSD/tariff.examples/python/list_tariffs.py— fetching and paginating the tariff catalog.examples/python/async_stream.py— asynchronous delta sync via thesinceparameter.
TypeScript
examples/typescript/get_prices.ts— the same pattern as the Python example, for Node/TypeScript — a typedfetchclient with theX-API-KEYheader.
cURL
examples/curl/api_requests.sh— a collection of ready-to-pastecurlcalls — a good starting point before writing an actual integration.
Didn't find what you need?
If you'd rather use an AI agent than write your own HTTP client, see the
MCP integration — sens-mcp gives Claude
Desktop/Cursor/LangChain ready-made tools for querying SENS without
writing integration code.