DOCS

API reference

Gyaansetu has two endpoints: Search turns a Query into ranked Results from the open web, and Extract turns URLs you already have into clean Raw Content. Both take and return JSON.

API tools can read the OpenAPI 3.1 description.

Base URL and authentication

Send every request to this base URL:

Base URL
https://web-search.gyaansetu.com

Authenticate with an API Key from your dashboard, sent as a bearer token. A missing or invalid API Key gets 401. An Account can hold up to five API Keys.

curl example
curl https://web-search.gyaansetu.com/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "Who deciphered Linear B?"}'

Extract: POST /extract

Turns URLs you already have into their Raw Content: the page's main content, with navigation, footers, scripts, popups, hidden elements and diagram source removed. Code blocks are kept.

FieldMeaning
urlsRequired. One URL, or a list of 1 to 20.
extract_depthbasic (default) reads each page as the site serves it; advanced renders it in a real browser first, so pages built by JavaScript come out complete.
formatmarkdown (default) or text.
timeoutSeconds each page may take to load, 1 to 60 (default 10 at basic, 30 at advanced).
queryCuts each page's raw_content to its passages most relevant to the query, ranked as in an advanced Search.
chunks_per_source1 to 5 (default 3): how many passages each page is cut to. Ignored without a query.
include_usageAdds "usage": {"credits": n}, the Credits the request cost.

Response

An example:

Extract response
{
  "results": [
    { "url": "https://en.wikipedia.org/wiki/Linear_B", "raw_content": "# Linear B\n\n…", "images": [] }
  ],
  "failed_results": [
    { "url": "https://example.com/missing", "error": "…" }
  ],
  "response_time": 0.92,
  "request_id": "…"
}

A URL that fails (an invalid URL, a timeout, an HTTP error, a response that isn't HTML, a page that fails to render, or a page with nothing left after cleanup) is listed in failed_results with its error, and the rest of the Extract still succeeds. results, failed_results and each result's images are always lists; images is always empty. Cleaned pages are cached for 24 hours.

Credits and pricing

Every Account has a free Quota of 1,000 Credits a month, shared by all its API Keys. It refills on the 1st of every month (UTC).

RequestCost
A basic Search1 Credit
An advanced Search2 Credits
An Extract1 Credit per 5 URLs extracted successfully, rounded up per request (7 cost 2)

You are charged after the work, for what it actually cost: a Search with no Results, an Extract where every URL failed, a bad request and a server error cost nothing. Your dashboard shows this month's usage.

Credit Packs

When the Quota isn't enough, buy a Credit Pack on your dashboard. It is a one-time purchase that adds Credits to your Account's Credit Balance; there is no subscription.

Credit PackPrice
5,000 Credits$10
25,000 Credits$40
100,000 Credits$120

Prices are in US dollars and include any tax where you live. Dodo Payments sells the packs as the merchant of record, at its hosted checkout, which may show the price in your currency. The Credits land once Dodo confirms the payment.

  • Spending order. Requests spend the Quota first, then the Credit Balance. A request that crosses from one to the other takes what is left of the Quota and the rest from the Credit Balance.
  • No expiry. Purchased Credits never expire; the Credit Balance carries over from month to month.
  • A higher rate limit. While the Credit Balance is above zero, the rate limit is 300 requests a minute instead of 60.
  • Refunds. An unused Credit Pack is refundable within 14 days of buying it: ask support through the Contact page. A refund or a chargeback removes the pack's Credits, and a chargeback can take the Credit Balance below zero, which can't be spent. The Terms cover payments in full.

The Quota and the Credit Balance are checked before any work. Once both are used up, requests get 432 until the Quota refills or you buy more Credits. Requests made at the same moment near the end of either may overshoot it slightly.

Rate limit

Each Account can make 60 requests a minute, across all its API Keys, or 300 a minute while its Credit Balance is above zero. The API, the Playground and MCP share the limit. Past it, requests get 429 with a Retry-After header in seconds.

Errors

Every error has the same body:

Error body
{"detail": {"error": "<message>"}}
StatusMeaning
400Bad request: a field is missing or invalid. The message says which.
401Missing or invalid API Key.
404Unknown path.
429Rate limit reached. Wait for Retry-After seconds.
432Quota and Credit Balance used up. The Quota refills on the 1st (UTC).
500Server error. Safe to retry.

Connect over MCP

MCP clients connect to https://web-search.gyaansetu.com/mcp. Send your Gyaansetu API Key as an Authorization: Bearer header; this is the recommended option because the key stays out of the URL. Clients that cannot set headers can send the key as ?apiKey=YOUR_GYAANSETU_API_KEY instead. A missing or invalid key gets HTTP 401 before the MCP handshake.

Tools and results

The server exposes gyaansetu_search and gyaansetu_extract. They take the same inputs as /search and /extract and run the same Search and Extract pipelines. MCP Search defaults to 5 Results, while HTTP Search defaults to 10. MCP returns text rather than JSON: each Result's Title, URL and Content, plus Raw Content and image URLs when asked for. It has no Answer: section. Extract returns each successful URL with its Raw Content and lists failed URLs with their errors. Inputs Gyaansetu cannot honour, including country, exact_match and include_favicon, are accepted and ignored.

Account Tools

Six more tools let an agent read what the Account sees on its dashboard. They are read-only, act for the Account whose API Key you send, and never return an API Key's secret. No tool creates, renames or revokes a key.

  • gyaansetu_usage: Credits and requests per UTC day and Channel. Takes start_date and end_date (YYYY-MM-DD, inclusive; the last 30 days by default, at most 366 days).
  • gyaansetu_credits: the monthly Quota, Free Credits, Credit Balance and Available Credits.
  • gyaansetu_refusals: requests turned away, counted per day and reason. Takes days (1 to 90, default 30).
  • gyaansetu_purchases: Credit Pack purchases, newest first. Takes limit (1 to 100, default 20); more says whether older ones were left out.
  • gyaansetu_api_keys: API Keys by name, prefix (null for keys made before prefixes were recorded), created and last used.
  • gyaansetu_buy_credits: the link where the Account's owner buys a Credit Pack, the packs on offer, and whether they are on sale.

Credits, Quota and rate limit

MCP tool calls share the Account's Credits, monthly Quota and rate limit (60 requests a minute, or 300 with a Credit Balance) with HTTP and the Playground. Search and Extract cost the same as their HTTP equivalents; the Account Tools cost no Credits but count toward the rate limit. Only tool calls count; initialize and tools/list require a valid API Key but do not count toward usage or the rate limit. Invalid tool inputs, a used-up Quota and the rate limit return tool errors with the same messages as the HTTP errors.

Claude Code and Cursor

Replace the placeholder with an API Key from your dashboard.

Claude Code

Claude Code setup
claude mcp add --transport http gyaansetu https://web-search.gyaansetu.com/mcp \
  --header "Authorization: Bearer YOUR_GYAANSETU_API_KEY"

Cursor

Cursor setup
{
  "mcpServers": {
    "gyaansetu": {
      "url": "https://web-search.gyaansetu.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_GYAANSETU_API_KEY"
      }
    }
  }
}

Migrating from another agent search SDK

Gyaansetu's API is compatible with Tavily's: it answers the same /search and /extract requests in the same response shape. If your agent already uses Tavily's Python SDK, its JavaScript SDK or LangChain's Tavily tool, keep your code: use a Gyaansetu API Key and add one line that sets the base URL.

Python

Python install
$ pip install tavily-python
Python migration
from tavily import TavilyClient client = TavilyClient(    api_key="YOUR_GYAANSETU_API_KEY",    api_base_url="https://web-search.gyaansetu.com",)

JavaScript

JavaScript install
$ npm install @tavily/core
JavaScript migration
import { tavily } from "@tavily/core"; const client = tavily({  apiKey: "YOUR_GYAANSETU_API_KEY",  apiBaseURL: "https://web-search.gyaansetu.com",});

LangChain

LangChain install
$ pip install langchain-tavily
LangChain migration
from langchain_tavily import TavilySearch search = TavilySearch(    max_results=5,    tavily_api_key="YOUR_GYAANSETU_API_KEY",    api_base_url="https://web-search.gyaansetu.com",)

Tavily's Python SDK raises Gyaansetu's 432 (Quota used up) as ForbiddenError. Over MCP, point your client at https://web-search.gyaansetu.com/mcp and call gyaansetu_search and gyaansetu_extract.

Guides

Step-by-step help for common integrations.