POST /v1/search

Web Search API

Start with a question, then read the sources. Search for relevant pages and optionally retrieve their content in the same operation.

curl -X POST https://api.luni.gg/v1/search \
  -H "Authorization: Bearer $LUNI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example-search-4465ba2df920" \
  -d '{
  "query": "public web data workflows",
  "limit": 5,
  "scrapeOptions": {
    "formats": [
      "markdown"
    ]
  }
}'

Search first, fetch when needed

Send a query of 1–500 characters and a result limit up to 25. Use the returned sources to decide what to investigate next. Add scrapeOptions when your workflow needs page content alongside the search results.

Keep a distinction between a search result and a retrieved document. A useful search hit may point to an unavailable page, and a short result description is not the full source. Save URLs alongside any text you use in a downstream answer.

Budget the query and its pages

A completed search costs two credits. Optional content fetching adds one credit for each successfully retrieved page. A five-result search with every page fetched therefore has a maximum cost of seven credits. If fewer pages succeed, their failed fetches do not add page credits.

Use the credit estimator to model several queries before running a larger workflow. It calculates an estimate from the credit schedule, not a promise that every result will be available or every requested page useful.

Know what search accepts

Search is available in every workspace without extra setup. A query that returns no usable results fails and consumes zero credits.

The current API accepts query, limit and supported scrapeOptions. Browser interaction, arbitrary ranking controls and unlisted search filters are outside the released contract.