ARES Business Registry (CZ)
Use scripts/ares_client.py for ICO lookup and business search.
Working directory
- From workspace root:
python3 skills/ares-business-registry/scripts/ares_client.py ...
- From
skills/ares-business-registry:
python3 scripts/ares_client.py ...
Commands
You can run via the wrapper (recommended):
./ares ico <ico>
./ares name "NAME" [--nace CODE ...] [--city CITY] [--limit N] [--offset N] [--pick INDEX]
The underlying script also supports:
python3 scripts/ares_client.py search --name "NAME" ...
python3 scripts/ares_client.py search --nace CODE [CODE ...] ...
python3 scripts/ares_client.py search --name "NAME" --nace CODE ... (combined)
Output modes
- default: human-readable summary
--json: normalized JSON output (stable keys)
--raw: full raw ARES payload
Examples
# ICO lookup
python3 scripts/ares_client.py ico 27604977
python3 scripts/ares_client.py ico 27604977 --json
python3 scripts/ares_client.py ico 27604977 --raw
# Search by name
python3 scripts/ares_client.py search --name Google
python3 scripts/ares_client.py search --name Google --limit 3 --json
python3 scripts/ares_client.py search --name Google --city Praha --limit 10 --offset 0
python3 scripts/ares_client.py search --name Google --limit 3 --pick 1
# Search by NACE code (CZ-NACE, exactly 5 digits)
python3 scripts/ares_client.py search --nace 47710 --limit 10 # all clothing retailers
python3 scripts/ares_client.py search --nace 47710 --city Praha --json # clothing retailers in Praha
python3 scripts/ares_client.py search --nace 47710 47910 --limit 5 # clothing retail + mail order
# Combined: name + NACE (AND filter)
python3 scripts/ares_client.py search --name sport --nace 47710 --json # "sport" in clothing retail
Normalized JSON
ico output:
{ "subject": { "name", "ico", "dic", "datumVzniku", "address", "codes", "decoded" } }
search output:
{ "query", "total", "items", "picked?" }
query includes: name (nullable), city (nullable), nace (nullable array), limit, offset
dic can be null.
datumVzniku can be null.
Error JSON contract (--json only)
{
"error": {
"code": "validation_error | ares_error | network_error",
"message": "Human readable message",
"status": 429,
"details": {}
}
}
Validation and exits
- ICO: exactly 8 digits + mod11 checksum
- Search: at least
--name (length >= 3) or --nace required; both can be combined
--nace: exactly 5 digits per code (CZ-NACE format, e.g. 47710); multiple codes accepted (space-separated)
--limit: default 10, capped to 100
--offset: must be >= 0
- Exit codes:
0 success
1 validation error
2 ARES non-OK response
3 network/timeout
Caching and decoding
- Legal form decoding (
PravniForma) is loaded via POST /ciselniky-nazevniky/vyhledat
- Cache path:
skills/ares-business-registry/.cache/pravni_forma.json
- Cache TTL: 24h
- In-memory fallback is used if cache file is stale/unavailable
- Curated overrides:
112 -> s.r.o.
121 -> a.s.
141 -> z.s.
701 -> OSVČ
301 -> s.p.
331 -> p.o.
NACE code search
--nace sends the czNace field to the ARES complex filter endpoint
- Codes must be exactly 5 digits (CZ-NACE_2025 format)
- Multiple codes can be passed (space-separated) — ARES returns entities matching any of them
- When combined with
--name, both filters apply as AND (entities must match name AND have the NACE code)
- NACE-only search (without
--name) is supported — useful for browsing all entities in a sector
- Common e-commerce NACE codes:
47710 — Retail sale of clothing
47910 — Retail sale via mail order or internet
47410 — Retail sale of computers and software
47750 — Retail sale of cosmetic and toilet articles
46420 — Wholesale of clothing and footwear
- Full CZ-NACE list: https://www.czso.cz/csu/czso/klasifikace_ekonomickych_cinnosti_cz_nace
City filter limitation
--city maps to sidlo.nazevObce (structured filter).
- Matching remains best-effort only; ARES server-side matching/ranking can still return records outside the expected municipality.
Retries and rate limits
- HTTP timeout: connect 5s, read 20s
- Retries for transient failures:
429/502/503/504 + network timeout/connection issues
- Backoff:
1s, 2s, 4s
- Honors
Retry-After for 429 where provided
1---
2name: ares-business-registry
3description: Query Czech ARES business registry by ICO or name with human/JSON/raw outputs, retries, and legal-form decoding.
4metadata:
5 source: https://skillmd.com/skills/modbender/ares-business-registry
6---
7
8# ARES Business Registry (CZ)
9
10Use `scripts/ares_client.py` for ICO lookup and business search.
11
12## Working directory
13
14- From workspace root:
15 - `python3 skills/ares-business-registry/scripts/ares_client.py ...`
16- From `skills/ares-business-registry`:
17 - `python3 scripts/ares_client.py ...`
18
19## Commands
20
21You can run via the wrapper (recommended):
22- `./ares ico <ico>`
23- `./ares name "NAME" [--nace CODE ...] [--city CITY] [--limit N] [--offset N] [--pick INDEX]`
24
25The underlying script also supports:
26- `python3 scripts/ares_client.py search --name "NAME" ...`
27- `python3 scripts/ares_client.py search --nace CODE [CODE ...] ...`
28- `python3 scripts/ares_client.py search --name "NAME" --nace CODE ...` (combined)
29
30## Output modes
31
32- default: human-readable summary
33- `--json`: normalized JSON output (stable keys)
34- `--raw`: full raw ARES payload
35
36## Examples
37
38```bash
39# ICO lookup
40python3 scripts/ares_client.py ico 27604977
41python3 scripts/ares_client.py ico 27604977 --json
42python3 scripts/ares_client.py ico 27604977 --raw
43
44# Search by name
45python3 scripts/ares_client.py search --name Google
46python3 scripts/ares_client.py search --name Google --limit 3 --json
47python3 scripts/ares_client.py search --name Google --city Praha --limit 10 --offset 0
48python3 scripts/ares_client.py search --name Google --limit 3 --pick 1
49
50# Search by NACE code (CZ-NACE, exactly 5 digits)
51python3 scripts/ares_client.py search --nace 47710 --limit 10 # all clothing retailers
52python3 scripts/ares_client.py search --nace 47710 --city Praha --json # clothing retailers in Praha
53python3 scripts/ares_client.py search --nace 47710 47910 --limit 5 # clothing retail + mail order
54
55# Combined: name + NACE (AND filter)
56python3 scripts/ares_client.py search --name sport --nace 47710 --json # "sport" in clothing retail
57```
58
59## Normalized JSON
60
61- `ico` output:
62 - `{ "subject": { "name", "ico", "dic", "datumVzniku", "address", "codes", "decoded" } }`
63- `search` output:
64 - `{ "query", "total", "items", "picked?" }`
65 - `query` includes: `name` (nullable), `city` (nullable), `nace` (nullable array), `limit`, `offset`
66- `dic` can be `null`.
67- `datumVzniku` can be `null`.
68
69## Error JSON contract (`--json` only)
70
71```json
72{
73 "error": {
74 "code": "validation_error | ares_error | network_error",
75 "message": "Human readable message",
76 "status": 429,
77 "details": {}
78 }
79}
80```
81
82## Validation and exits
83
84- ICO: exactly 8 digits + mod11 checksum
85- Search: at least `--name` (length >= 3) or `--nace` required; both can be combined
86- `--nace`: exactly 5 digits per code (CZ-NACE format, e.g. `47710`); multiple codes accepted (space-separated)
87- `--limit`: default 10, capped to 100
88- `--offset`: must be >= 0
89- Exit codes:
90 - `0` success
91 - `1` validation error
92 - `2` ARES non-OK response
93 - `3` network/timeout
94
95## Caching and decoding
96
97- Legal form decoding (`PravniForma`) is loaded via POST `/ciselniky-nazevniky/vyhledat`
98- Cache path: `skills/ares-business-registry/.cache/pravni_forma.json`
99- Cache TTL: 24h
100- In-memory fallback is used if cache file is stale/unavailable
101- Curated overrides:
102 - `112 -> s.r.o.`
103 - `121 -> a.s.`
104 - `141 -> z.s.`
105 - `701 -> OSVČ`
106 - `301 -> s.p.`
107 - `331 -> p.o.`
108
109## NACE code search
110
111- `--nace` sends the `czNace` field to the ARES complex filter endpoint
112- Codes must be exactly 5 digits (CZ-NACE_2025 format)
113- Multiple codes can be passed (space-separated) — ARES returns entities matching **any** of them
114- When combined with `--name`, both filters apply as AND (entities must match name AND have the NACE code)
115- NACE-only search (without `--name`) is supported — useful for browsing all entities in a sector
116- Common e-commerce NACE codes:
117 - `47710` — Retail sale of clothing
118 - `47910` — Retail sale via mail order or internet
119 - `47410` — Retail sale of computers and software
120 - `47750` — Retail sale of cosmetic and toilet articles
121 - `46420` — Wholesale of clothing and footwear
122- Full CZ-NACE list: https://www.czso.cz/csu/czso/klasifikace_ekonomickych_cinnosti_cz_nace
123
124## City filter limitation
125
126- `--city` maps to `sidlo.nazevObce` (structured filter).
127- Matching remains best-effort only; ARES server-side matching/ranking can still return records outside the expected municipality.
128
129## Retries and rate limits
130
131- HTTP timeout: connect 5s, read 20s
132- Retries for transient failures: `429/502/503/504` + network timeout/connection issues
133- Backoff: `1s`, `2s`, `4s`
134- Honors `Retry-After` for 429 where provided