Back to Blog

Introducing Search and Ask APIs

Two small web primitives for agents: raw search results or a fast answer with citations.

R

Rob Balian

CTO @ Reprompt

Introducing Search and Ask APIs

Search is probably the most requested feature from Reprompt customers building agents.

The request is usually simple: give the agent access to the web without making us adopt another search payload, scraping system, or research framework.

We built two endpoints because there are two different jobs hiding inside that request.

Search

POST /v1/search returns ranked web results: title, URL, snippet, and position. Reprompt resolves the organization from the authenticated API key.

{
  "query": "Where is the visitor entrance to the Empire State Building?"
}
{
  "query": "Where is the visitor entrance to the Empire State Building?",
  "results": [
    {
      "position": 1,
      "title": "FAQs: Tickets, Hours, & Directions",
      "url": "https://www.esbnyc.com/visit/faq",
      "snippet": "The Observatory entrance is located at 20 West 34th Street."
    }
  ]
}

This is the endpoint for agents that already have their own reasoning loop. Search gets the web into a stable shape. The agent can rerank it, filter it, cite it, or pass it to another model.

Ask

POST /v1/ask takes the same input and returns a short answer with inline citations.

{
  "query": "Where is the visitor entrance to the Empire State Building?",
  "answer": "The visitor entrance is at 20 West 34th Street in Manhattan. [1]",
  "sources": [
    {
      "position": 1,
      "title": "FAQs: Tickets, Hours, & Directions",
      "url": "https://www.esbnyc.com/visit/faq"
    }
  ]
}

Ask performs one search and one fast model call. It is useful when the agent—or the person using it—needs an answer rather than a result set.

This is not deep research. There is no planner, browser loop, or ten-minute report. Ask is meant to be a quick, bounded web primitive.

Same input, same price

Both endpoints accept one plain query object. Both cost $5 per 1,000 requests. Ask has no separate token surcharge.

We use this Search/Ask split internally because it makes tool selection boring. If the agent needs evidence, call Search. If it needs a grounded explanation, call Ask.

Search and Ask are available in Reprompt v1.

Read the API documentation.

Ready to get started?

Try Reprompt today and transform your location data.