$5 free credits when you sign up Claim now
Marlin 2b now available Test it!
MiniMax H3 now available! Test it!
MiniMax Music 3 now available! Test it!
Browse all Models
Browse all
Browse all
Browse all

Web Search API for AI Agents and RAG

Send a question in plain language and get ranked web pages back as JSON, with URL, title and publish date. Add excerpts, full page text or a summary to each result in the same call, so your agent gets fresh sources without a scraper of its own.

$5 in free credits to start. No credit card required.

per search with up to 10 results, in the quick mode
$0.0048
typical response in the quick mode
< 1 s
for results plus page text, excerpts or a summary
1 call

Search the Web with One API Call

POST a query with your deAPI key. Results come back in the same response, with no job to poll.

Request
curl -X POST 'https://api.deapi.ai/api/v2/web/search' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -d '{
    "query": "latest research on solid-state batteries",
    "mode": "quick",
    "limit": 5,
    "include": { "excerpts": true }
  }'
import requests

response = requests.post(
    "https://api.deapi.ai/api/v2/web/search",
    headers={"Authorization": "Bearer YOUR_API_TOKEN"},
    json={
        "query": "latest research on solid-state batteries",
        "mode": "quick",
        "limit": 5,
        "include": {"excerpts": True},
    },
    timeout=30,
)

for result in response.json()["results"]:
    print(result["title"], result["url"])
const response = await fetch("https://api.deapi.ai/api/v2/web/search", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    query: "latest research on solid-state batteries",
    mode: "quick",
    limit: 5,
    include: { excerpts: true },
  }),
});

const { results } = await response.json();
results.forEach((r) => console.log(r.title, r.url));
Response, shortened
{
  "request_id": "46754fa8-…",
  "cost": 0.0048,
  "results": [
    {
      "url": "https://example.com/solid-state-cells-study",
      "title": "Solid-state cells pass 1,000 charge cycles",
      "published_at": "2026-11-09T02:30:03+00:00",
      "author": "Jane Doe",
      "excerpts": [
        "The prototype kept 92% of its capacity
         after 1,000 full charge cycles."
      ]
    }
  ]
}

Illustrative values. Results are ordered by relevance to the query.

Search Modes for Chat, Agents and RAG

Pick a mode per request. The quick mode suits agents that search many times per task; the balanced mode is the default.

Mode Typical response Price, up to 10 results Use it for
quick under 1 s $0.0048 Chat replies and agent loops that run many searches per task
balanced 1–2 s $0.0084 RAG and research, and any search that needs a summary per result

Each result above 10 adds $0.0012, up to 25 results. A summary adds $0.0012 per result and works only in the balanced mode. Text and excerpts cost nothing extra. Every response returns its exact cost in the cost field.

Search Request and Result Fields

Request
query
What you are looking for, in plain language. Up to 2,000 characters.
mode
quick or balanced.
limit
Number of results, from 1 to 25, 10 by default. There are no pages to fetch later.
only_domains
Search only these sites, such as github.com. Subdomains are included.
skip_domains
Never return results from these sites.
published_after
Return only pages published after this date.
published_before
Return only pages published before this date.
include
text, excerpts and/or summary for each result. Text takes a max_length; excerpts and summary take a query.
Each result
url
Address of the page.
title
Page title.
published_at
Publish date in ISO 8601, when the page has one.
author
Author, when the page names one.
image
Main image of the page, when it has one.
excerpts
The passages that best match the query.
text
Main text of the page.
summary
A short summary of the page.

Domain, Date and Content Filters

  • Only the sites you trust

    Limit a search to a list of domains, subdomains included, or exclude sites you never want in an answer.

  • Pages from a date range

    Set a start date, an end date or both. Useful for news, release notes and anything that goes out of date.

  • Page content with each result

    Excerpts for a quick answer, full text for RAG, a summary when the prompt is short on room. Same options as the Contents API.

What Developers Build with a Web Search API

  • Agents

    AI agents that look things up

    Give a tool-calling agent a search function. It finds sources, reads them and cites them in its answer.

  • RAG

    Retrieval from the live web

    Add current pages to retrieval when your own index does not have the answer or is out of date.

  • Grounding

    Chat answers with sources

    Search before the model answers and pass the results into the prompt, so replies cite real pages.

  • Monitoring

    Track a topic or a competitor

    Run the same query on a schedule with published_after set to the last run, so you get only new pages.

  • Research

    Collect sources for a report

    Pull 25 pages on a question with summaries, then let a model sort and compare them.

Search, Read and Answer in One Agent Loop

  1. Search

    The agent sends the user's question to the Search API and gets ranked URLs with excerpts.

  2. Read

    It passes the best URLs to the Contents API for full text or a summary.

  3. Answer

    Your LLM writes the answer from that text and links each claim to its source URL.

Billing, Spend Limits and Errors

  • Charged only on success

    A request that fails on our side is not charged, and the amount reserved against your key limit is released.

  • Spend limit per key

    Give each key a daily, weekly or monthly limit. Over the limit the API answers 402 and the request does not run.

  • Errors you can retry

    Busy or timed-out requests return 503 or 504 with a Retry-After header, so your code knows when to try again. Limits go up after the first payment.

  • $5 in free credits
  • No credit card required
  • Prepaid, no subscription

Give Your Agent Live Web Results

$5 in credits after email verification, no card. The same key works for search, page content and every other deAPI endpoint.

See also Web Content Extraction API, Transcription MCP Server and OpenAI-compatible API.

Frequently Asked Questions

Results, filters and billing

An HTTP endpoint that takes a search query and returns web pages as JSON. The deAPI Search API accepts questions in plain language and can attach excerpts, page text or a summary to each result, so the output goes straight into an LLM prompt.
A SERP API returns a copy of a search engine results page, with links, ads and short descriptions. The Search API returns pages ranked for your query together with their content, which is what an agent or a RAG pipeline reads.
$0.0048 in the quick mode and $0.0084 in the balanced mode, for up to 10 results. Each extra result adds $0.0012 and a summary adds $0.0012 per result. Text and excerpts are included. Ask the price endpoint for a quote before you send a request.
10 by default and up to 25. There is no pagination, so set the limit to the number of results you need.
Yes. List the domains to search in only_domains, subdomains included, or list domains to leave out in skip_domains.
Yes. Ask for text, excerpts or a summary in the same request. The options are the same as in the Contents API.
Usually under 1 second in the quick mode and 1 to 2 seconds in the balanced mode. Summaries add a few seconds.