Search

Search the web

POST/search
from $0.003/calljson responserest · mcp
01// about this endpoint

Run a web search through superagnt and optionally return the full page content of each result in one call. Supports web, news, and image sources. Ideal when an agent needs to find pages by query rather than by known URL.

02// code samples

Call it over REST

Authenticate with a bearer token against https://api.superagnt.com. Swap the placeholders for your key and parameter values.

curlbash
curl -s -X POST "https://api.superagnt.com/search" \
  -H "Authorization: Bearer <YOUR_AGNTDATA_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "query": "<string>" }'
03// give it to your agent

Copy-paste prompt

Paste this into a coding agent. It connects the superagnt MCP server, finds the tool data_web_search, and runs a first call — with the REST fallback if MCP is unavailable.

agent prompttext
You are wiring up the superagnt "Web" API to use this endpoint: Search the web.

1. CONNECT over MCP (preferred). No token to paste either way.
   On Claude (claude.ai, the desktop app, or Claude Code signed in with a Claude
   account), the server is a connector: give the user this link, they click Add
   and approve:
     https://claude.ai/customize/connectors/yours?modal=add-custom-connector&connectorName=superagnt&connectorUrl=https%3A%2F%2Fmcp.superagnt.com%2Fmcp&open_in_browser=1
   Any other MCP client (or Claude Code signed in with an API key): add the server
   and let the client run the browser sign-in:
     claude mcp add --scope user --transport http superagnt https://mcp.superagnt.com/mcp
     claude mcp login superagnt
   MCP endpoint: https://mcp.superagnt.com/mcp
   After connecting, the tool you want is named exactly:
     data_web_search
   Call agnt_tools_search or agnt_tools_list_enabled to confirm it is available.

2. REST fallback (if you are not using MCP):
     POST https://api.superagnt.com/search
     Header: Authorization: Bearer <YOUR_AGNTDATA_API_KEY>
   Required parameters:
    - query (string, required) — The search query.
   Optional parameters:
    - limit (integer, optional) — Number of results per source. Default 10.
    - sources (array, optional) — Which result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`.
    - categories (array, optional) — Restrict results to these categories.
    - tbs (string, optional) — Time-based search filter (e.g. 'qdr:d' for past day).
    - location (string, optional) — Geo-target for the search (e.g. 'San Francisco, California, United States').
    - country (string, optional) — ISO country code. Default 'US'.
    - includeDomains (array, optional) — Only return results from these hostnames (mutually exclusive with excludeDomains).
    - excludeDomains (array, optional) — Exclude results from these hostnames (mutually exclusive with includeDomains).
    - timeout (integer, optional) — Request timeout in milliseconds. Default 60000.
    - scrapeOptions (object, optional) — When provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched.

3. COST & KEY. This endpoint is metered — pricing varies by request, from $0.003 per call. Only successful calls are charged.
   Get a superagnt API key at https://app.superagnt.com.

4. TEST. Connect the server (or set the key), discover the tool
   (data_web_search), run one minimal call with just the required parameters,
   and report back the shape of the JSON response (top-level fields).

Reference (machine-readable variant): https://www.superagnt.com/docs/apis/web/endpoints/search.md
mcp tool definitionjson
{
  "name": "search",
  "description": "Runs a web search and returns result URLs + snippets — cheap; use this first and read the snippets. Add `scrapeOptions` ONLY when you actually need the full text of the pages, because it then downloads and bills EVERY result — keep `limit` small when you do (a few results, not dozens). To read specific pages, prefer searching first and then scraping just the one or two URLs you chose. Supports web, news, and image sources.",
  "parameters": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "maxLength": 500,
        "description": "The search query."
      },
      "limit": {
        "type": "integer",
        "description": "Number of results per source. Default 10.",
        "minimum": 1,
        "maximum": 100,
        "default": 10
      },
      "sources": {
        "type": "array",
        "description": "Which result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`.",
        "items": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "web",
                "news",
                "images"
              ]
            },
            {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "web",
                    "news",
                    "images"
                  ]
                }
              }
            }
          ]
        }
      },
      "categories": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "github",
            "research",
            "pdf"
          ]
        },
        "description": "Restrict results to these categories."
      },
      "tbs": {
        "type": "string",
        "description": "Time-based search filter (e.g. 'qdr:d' for past day)."
      },
      "location": {
        "type": "string",
        "description": "Geo-target for the search (e.g. 'San Francisco, California, United States')."
      },
      "country": {
        "type": "string",
        "description": "ISO country code. Default 'US'.",
        "default": "US"
      },
      "includeDomains": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only return results from these hostnames (mutually exclusive with excludeDomains)."
      },
      "excludeDomains": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Exclude results from these hostnames (mutually exclusive with includeDomains)."
      },
      "timeout": {
        "type": "integer",
        "description": "Request timeout in milliseconds. Default 60000.",
        "minimum": 1000
      },
      "scrapeOptions": {
        "type": "object",
        "description": "When provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched.",
        "properties": {
          "formats": {
            "type": "array",
            "items": {},
            "description": "Output formats for each scraped result (e.g. ['markdown'])."
          },
          "onlyMainContent": {
            "type": "boolean",
            "default": true
          }
        }
      }
    },
    "required": [
      "query"
    ]
  }
}
04// parameters
NameInTypeRequiredDescription
querybodystringrequiredThe search query.
limitbodyintegeroptionalNumber of results per source. Default 10.
sourcesbodyarrayoptionalWhich result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`.
categoriesbodyarrayoptionalRestrict results to these categories.
tbsbodystringoptionalTime-based search filter (e.g. 'qdr:d' for past day).
locationbodystringoptionalGeo-target for the search (e.g. 'San Francisco, California, United States').
countrybodystringoptionalISO country code. Default 'US'.
includeDomainsbodyarrayoptionalOnly return results from these hostnames (mutually exclusive with excludeDomains).
excludeDomainsbodyarrayoptionalExclude results from these hostnames (mutually exclusive with includeDomains).
timeoutbodyintegeroptionalRequest timeout in milliseconds. Default 60000.
scrapeOptionsbodyobjectoptionalWhen provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched.
05// responses

Search results, optionally including scraped page content.

200json
{
  "type": "object"
}
06// pricing
from $0.003per successful request

Metered endpoint — the exact cost depends on the request. Credits are deducted per successful call; failed requests (4xx/5xx) are not charged.

Get started at app.superagnt.com.

08// more from Web

start calling

Point your client at https://mcp.superagnt.com/mcp and your agent has this endpoint, plus every other source on one balance.

Start free→
web search APIsearch with page content APIresearch agent web APIAI agents web data APIweb scraping APIweb search API for AI agentsscrape to markdown API