Română← Back to Hei!Local

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.

Base URL
https://heilocal.ro/api/v1

1. API key

  1. Sign in to your Hei!Local account and open AI connection.
  2. Activate the Free plan (you accept the API terms).
  3. 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 pathSearches
POST /api/v1/products/search?mode=raw|processedProducts from .ro shops
POST /api/v1/content/search?mode=raw|processed.ro pages and sites (companies, services, information)

Modes

modeWhat it doesCostTypical 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
processedExactly 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)

FieldTypeDescription
querystring, requiredThe question, in natural language (max. 300 characters).
limitnumber, default 10How many results (max. 20 on the Free plan).
offsetnumber, default 0First result of the page (max. 100).
price_min, price_maxnumber (lei), optionalProducts 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

The response never contains prices. The current price is on the product page (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.

5. Limits and credits (Free plan)

LimitValue
Credits per month1,000 (raw = 1 credit, processed = 5)
Credits per day100
Requests per minute10
Concurrent requests2 per account
Results per request / depthmax. 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

CodeWhen
400Invalid request: missing query, limit or offset above the cap, unknown mode, price_min > price_max.
401Missing, wrong or revoked key.
403No active plan on the account, or API access has been stopped.
429A limit was reached (monthly, daily, per minute or concurrent). Retry-After says how many seconds to wait.
500 / 502Server 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.