Search the web#
POST /v1/search
Find relevant sources, then optionally retrieve their page content in the same operation. Luni searches the public web directly. A dedicated provider key, when configured, is used instead.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | Required | Search text, trimmed to 1–500 characters. |
limit | integer | 5 | Maximum results, from 1 to 25. |
scrapeOptions | object | Omitted | Add supported scrape settings to fetch content from the result URLs. |
curl -X POST https://api.luni.gg/v1/search \
-H "Authorization: Bearer $LUNI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: search-sources" \
-d '{"query":"public web data workflows","limit":3,"scrapeOptions":{"formats":["markdown"]}}'A completed query costs two credits. Each successfully fetched result adds one credit. Three requested results with content therefore reserve up to five credits; failed page fetches do not add page credits. Search hits appear in data.web; content and source metadata are merged into hits whose fetches succeed.
