Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Keenable / Search the web

Keenable tool keenable-search on looot: input fields, $0.004 per call, output shape, and code to run it with curl, JavaScript or Python.

Searches the web and returns ranked results (title, url, description, snippet, published_at). Filter by site, published_after/before or acquired_after/before (YYYY-MM-DD or relative like 7d). mode pro (default) retrieves deeper, realtime is faster. max_results 1-50, default 10.

Inputs

Name Type Required Description
acquired_after string no Filter: pages acquired after this date (YYYY-MM-DD, ISO 8601, or relative like “7d”)
acquired_before string no Filter: pages acquired before this date. A bare YYYY-MM-DD includes that whole day (up to 23:59.999 UTC); pass a timestamp to cut at an exact instant
max_results integer no Maximum number of results to return. When omitted, up to 10 results are returned.
mode string no “pro” (default) for deeper retrieval, “realtime” for fast results
published_after string no Filter: pages published after this date
published_before string no Filter: pages published before this date. A bare YYYY-MM-DD includes that whole day (up to 23:59.999 UTC); pass a timestamp to cut at an exact instant
query string yes Search query
query_time string no Search the index as it stood at this point in time: pages acquired after it are excluded. A bare YYYY-MM-DD resolves to 00:00 UTC. Relative deltas on the date filters are computed from this instant instead of the request time
site string no Restrict results to a specific domain
snippet_max_length integer no Maximum length, in characters, of the snippet returned per result. When omitted, a default snippet length is used.

Output

The run’s result holds the provider’s answer. Signed in, looot inspect keenable-search prints its fields.

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"keenable-search","input":{"query":"<query>"},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "keenable-search",
    input: {
      query: "<query>",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "keenable-search",
        "input": {
            "query": "<query>",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:web.search as endpointId; see the job page.

Was this page helpful?