Skip to main content

Overview

Reprompt offers two small, complementary web endpoints:
  • Search retrieves normalized web search results for a query. Use it when your application or agent needs the results themselves.
  • Ask retrieves search results and produces a fast, single-hop narrative answer grounded in those results. Use it when your user needs a concise answer with sources.
Both endpoints accept the same minimal body. There are no filters, modes, or structured search inputs at launch.
Ask is a fast grounded-answer endpoint, not a deep-research workflow. It does not perform multi-step research or replace source review for high-stakes decisions.

Authentication and base URL

Create an API key in Organization Settings → API Keys, then send it as a bearer token. Reprompt resolves the organization from the authenticated API key, so no organization identifier is required in the URL.
Send a natural-language query to POST /search. The response is a stable, normalized result list; it intentionally does not expose the underlying search-provider response.

Search response

Each item in results has a stable normalized shape: The results array can be empty when no results match the query. When the search provider supplies them, the response can also include:
  • answer_box — a direct answer or featured snippet with its source URL.
  • knowledge_graph — entity information such as a title, type, description, website, and scalar facts.
These objects are optional. Build agent logic around results unless it explicitly benefits from enriched search features.

Ask

Send the same query to POST /ask to receive a concise narrative answer plus the source objects used to ground it. Reprompt uses DeepSeek V4 Flash through OpenRouter for this endpoint.

Ask response

sources uses the same normalized source-object shape as Search results. Render the source URLs alongside the answer so people can inspect the evidence themselves.

Errors and retries

Both endpoints return JSON errors. Handle these status codes: For authentication help, see Troubleshooting Authentication & 40x Errors.