Hei!Local API documentation
The Hei!Local public API gives you programmatic access to the same search as the site: products from .ro shops and content (pages, companies, services) from .ro websites. Results are in Romanian.
https://heilocal.ro/api/v1
1. API key
- Sign in to your Hei!Local account and open AI connection.
- Activate the Free plan (you accept the API terms).
- Click Generate. The key (
hl_…) is shown only once: store it. You can revoke or regenerate it at any time from the same place.
Send the key in the X-API-Key header (or Authorization: Bearer hl_…). Never put it in a URL
or ship it in browser code.
2. Endpoints
| Method and path | Searches |
|---|---|
POST /api/v1/products/search?mode=raw|processed | Products from .ro shops |
POST /api/v1/content/search?mode=raw|processed | .ro pages and sites (companies, services, information) |
Modes
| mode | What it does | Cost | Typical time |
|---|---|---|---|
raw (default) | Direct search: semantic vector + keywords, no query understanding, no re-ranking. The score is the raw one. | 1 credit | ~1–2 s for products, ~8 s for content |
processed | Exactly the site's algorithm: understands the query (object, colour, attributes, price in the text), re-ranks and diversifies the results. | 5 credits | ~7–9 s |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
query | string, required | The question, in natural language (max. 300 characters). |
limit | number, default 10 | How many results (max. 20 on the Free plan). |
offset | number, default 0 | First result of the page (max. 100). |
price_min, price_max | number (lei), optional | Products only: price filter. See section 4. |
3. Examples
curl
curl -X POST "https://heilocal.ro/api/v1/products/search?mode=processed" \
-H "X-API-Key: hl_your_key" \
-H "Content-Type: application/json" \
-d '{"query": "geacă de iarnă bărbați", "limit": 5, "price_max": 400}'
Python
import requests
r = requests.post(
"https://heilocal.ro/api/v1/content/search",
params={"mode": "raw"},
headers={"X-API-Key": "hl_your_key"},
json={"query": "instalator sanitar Cluj", "limit": 5},
timeout=60,
)
r.raise_for_status()
for item in r.json()["results"]:
print(item["title"], item["url"])
Response (products)
{
"success": true,
"mode": "processed",
"query": "geacă de iarnă bărbați",
"offset": 0,
"limit": 5,
"count": 5,
"results": [
{
"title": "Geacă bărbați de iarnă îmblănită",
"url": "https://magazin.ro/produs/...",
"domain": "magazin.ro",
"ai_category": "Imbracaminte",
"image": "https://heilocal.ro/api/img/…?w=800",
"score": 0.83
}
],
"credits": {"charged": 5, "today": {"used": 12, "limit": 100}, "month": {"used": 40, "limit": 1000}}
}
For content, each result has title, url, domain,
category, snippet (a short summary, max. 300 characters) and score.
In processed mode the response may also carry low_confidence: true (near-misses) or
relevance_gap (the top results do not match a requested colour or attribute).
4. Prices
url).price_min and price_max are filters only, in both modes. In processed mode the price
understood from the text ("sub 500 de lei") is applied too; when both exist, the narrower range wins.
- Only about 73% of products have an extracted price. Products without one drop out of any price filter.
- The filter uses the last price Hei!Local saw, not today's: for roughly 1 in 6 products the price has changed since on the shop's site.
5. Limits and credits (Free plan)
| Limit | Value |
|---|---|
| Credits per month | 1,000 (raw = 1 credit, processed = 5) |
| Credits per day | 100 |
| Requests per minute | 10 |
| Concurrent requests | 2 per account |
| Results per request / depth | max. 20 / offset max. 100 |
Only successful searches are charged. Days and months are counted in UTC. Every response carries
X-RateLimit-Limit (credits per day), X-RateLimit-Remaining and X-RateLimit-Reset
(the daily reset, Unix seconds). Your daily usage is in AI connection.
Searches made by your AI assistant through the MCP server need the same active plan and use the same credits (5 per search).
6. Errors
| Code | When |
|---|---|
| 400 | Invalid request: missing query, limit or offset above the cap, unknown mode, price_min > price_max. |
| 401 | Missing, wrong or revoked key. |
| 403 | No active plan on the account, or API access has been stopped. |
| 429 | A limit was reached (monthly, daily, per minute or concurrent). Retry-After says how many seconds to wait. |
| 500 / 502 | Server error. The request is not charged; retry later. |
Error body: {"success": false, "error": "…"}.
7. Rules
Use of the API is subject to the API terms. Systematic extraction of the catalogue and redistribution of the data are forbidden. For higher volumes, write to hei@heilocal.ro.