Skip to content

Search

Full-text search over the dataset catalog — find which dataset answers your question, then query it:

GET /v1/search?q=...

Searches dataset titles, descriptions, domains, and source organizations (not row contents). Results are relevance-ranked with highlighted snippets.

curl -H "Authorization: Bearer $API_KEY" "https://api.canovix.ro/v1/search?q=medici"
{
  "data": [
    {
      "slug": "physicians",
      "domain": "health",
      "endpoint": "/v1/health/physicians",
      "title": "Medici pe categorii, județe și localități",
      "description": "Numărul de medici ...",
      "organization": { "name": "Institutul Național de Statistică" },
      "score": 0.61,
      "snippet": "Numărul de <mark>medici</mark> pe categorii ..."
    }
  ],
  "pagination": { "total": 1, "count": 1, "limit": 50, "offset": 0, "has_next": false, "next_offset": null },
  "meta": { "api_version": "v1", "query": "medici", "generated_at": "..." },
  "links": { "self": "/v1/search?q=medici&limit=50&offset=0", "next": null, "...": "..." }
}

Behavior

  • Diacritic-insensitivesanatate matches sănătate; write Romanian with or without diacritics.
  • Case-insensitive, word-based matching with web-style query syntax: multiple words must all match; quote a phrase (q="parc auto") to require adjacency.
  • snippet wraps matched terms in <mark> tags — render it directly in HTML search results (escape it anywhere else).
  • Standard offset pagination (limit/offset, pagination.total).
  • Responses are cached like any read (X-Cache).

From result to data

Each hit carries endpoint — the serving path — so you can go straight to the rows:

hits = client.get("/v1/search", params={"q": "someri"}).json()["data"]
rows = client.get(hits[0]["endpoint"], params={"limit": 10}).json()["data"]

slug remains the dataset id for discovery (/v1/datasets/{slug}) when you also want columns, types, and a sample row first.