Getting started
huqsi API is a public interface to Azerbaijani legislation (the e-qanun.az corpus: the current wording of the main acts in force). It has two entry points:
- REST —
https://api.huqsi.az/v1/*(OpenAPI:/v1/openapi.json, interactive:/v1/swagger) - MCP —
https://api.huqsi.az/mcp(Streamable HTTP) for Claude, ChatGPT, Cursor, n8n, Gemini CLI and other MCP clients. Connect with OAuth (no key) or an API key — see MCP connection.
Both share one account, plan and quota. Three capabilities:
| Capability | REST | MCP tool |
|---|---|---|
| Semantic search | POST /v1/search |
search_law |
| Current text of an article | GET /v1/articles/{id} |
get_article |
| Amendment history of an article | GET /v1/articles/{id}/history |
get_article_history |
In three steps
- Sign in to the dashboard with your e-mail: no password, you get a 6-digit code and a link. Then create
a key. For Claude.ai or ChatGPT you need no key: add
https://api.huqsi.az/mcpas a custom connector. - Try it:
curl -X POST https://api.huqsi.az/v1/search \
-H "X-API-Key: hq_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "oğurluğa görə cəza", "limit": 3}'
- Read the exact article using the
article_idfrom the results:
curl https://api.huqsi.az/v1/articles/46947:p1:177 -H "X-API-Key: hq_YOUR_KEY"
Language of the texts
The legal texts are returned only in the official Azerbaijani wording. Queries work best in Azerbaijani. A translation made by you or by a model is unofficial: cite the Azerbaijani text (law title, «maddə N», source URL). Response field names and error codes are English; error messages are Azerbaijani.
What is included
- Included: articles of laws and codes in force, the current text of each article, and the acts that amended it.
- Not included: court decisions, texts of earlier wordings, a whole act in one response.
- Search returns a short passage of each article. The full text comes from
GET /v1/articles/{id}. - The database is updated from e-qanun.az once a day. Provisions that enter into force in the future are not marked separately yet.
Article ids
Format: {law_id}:p{part}:{article_number} — e.g. 46947:p1:177 (Criminal Code, article 177). Acts without
articles: {law_id}:tam. law_id is the e-qanun.az framework id (https://e-qanun.az/framework/46947).
Common ones: Criminal Code 46947, Code of Criminal Procedure 46950, Civil Code 46944, Code of Civil Procedure
46945, Tax Code 46948, Code of Administrative Offences 46960.
More: MCP connection · Limits · Errors. The other pages (REST examples, freshness, terms, privacy) are in Azerbaijani: Sənədlər.