{
  "id": "contextdev.web.search",
  "object": "tool",
  "name": "Web Search",
  "summary": "Search the web and optionally scrape each result to Markdown in one call.",
  "description": "Run a web search and get ranked results (url, title, description, relevance) back, with optional inline Markdown for every result so an agent gets answers in a single round-trip. The query accepts natural language and Google-style operators (site:, -site:, inurl:, intitle:, quoted phrases, OR). Filters cover result count (10-100), domain allow/block lists, publication freshness windows, country localization, and query fan-out for broader recall. markdownOptions mirrors the scrape family's controls.\n\nRaw contextdev#web/search endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.context.dev/api-reference/web-scraping/search).",
  "category": "web",
  "hosted_by": "Context.dev",
  "runtime": "partner",
  "side_effects": false,
  "status": "live",
  "credits": 0,
  "price": null,
  "providers": [
    {
      "id": "contextdev",
      "name": "Context.dev",
      "price": null,
      "own_key_only": true
    }
  ],
  "mcp_name": "contextdev_web_search",
  "input_schema": {
    "type": "object",
    "properties": {
      "body": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Search query. Accepts natural language as well as Google-style operators: site:, -site:, inurl:, intitle:, quoted phrases, OR."
          },
          "numResults": {
            "type": "integer",
            "minimum": 10,
            "maximum": 100,
            "description": "Number of results to request and return (10-100). Default 10. Sizes the hold: one credit per 10 results."
          },
          "includeDomains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist — only return results from these domains."
          },
          "excludeDomains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Blocklist — drop results from these domains."
          },
          "freshness": {
            "type": "string",
            "enum": [
              "last_24_hours",
              "last_week",
              "last_month",
              "last_year"
            ],
            "description": "Restrict results to content published within this window."
          },
          "country": {
            "type": "string",
            "enum": [
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "aq",
              "ag",
              "ar",
              "am",
              "aw",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "bb",
              "by",
              "be",
              "bz",
              "bj",
              "bm",
              "bt",
              "bo",
              "ba",
              "bw",
              "bv",
              "br",
              "io",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "cf",
              "td",
              "cl",
              "cn",
              "cx",
              "cc",
              "co",
              "km",
              "cg",
              "cd",
              "ck",
              "cr",
              "ci",
              "hr",
              "cu",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "gq",
              "er",
              "ee",
              "et",
              "fk",
              "fo",
              "fj",
              "fi",
              "fr",
              "gf",
              "pf",
              "tf",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gd",
              "gp",
              "gu",
              "gt",
              "gn",
              "gw",
              "gy",
              "ht",
              "hm",
              "va",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "ir",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "jo",
              "kz",
              "ke",
              "ki",
              "kp",
              "kr",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "lr",
              "ly",
              "li",
              "lt",
              "lu",
              "mo",
              "mk",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mh",
              "mq",
              "mr",
              "mu",
              "yt",
              "mx",
              "fm",
              "md",
              "mc",
              "mn",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "an",
              "nc",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "nf",
              "mp",
              "no",
              "om",
              "pk",
              "pw",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "re",
              "ro",
              "ru",
              "rw",
              "sh",
              "kn",
              "lc",
              "pm",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "gs",
              "es",
              "lk",
              "sd",
              "sr",
              "sj",
              "sz",
              "se",
              "ch",
              "sy",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tc",
              "tv",
              "ug",
              "ua",
              "ae",
              "gb",
              "us",
              "um",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "vg",
              "vi",
              "wf",
              "eh",
              "ye",
              "zm",
              "zw"
            ],
            "description": "Two-letter ISO 3166-1 alpha-2 country code, lowercase, to localize results to (e.g. 'us', 'gb', 'de')."
          },
          "queryFanout": {
            "type": "boolean",
            "description": "Expand the query into parallel variants for broader recall."
          },
          "markdownOptions": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Scrape each result to Markdown in the same call. Off by default to keep search cheap and fast; enabling it consumes additional scrape credits."
              },
              "includeLinks": {
                "type": "boolean",
                "description": "Preserve hyperlinks in the Markdown output. Default true."
              },
              "includeImages": {
                "type": "boolean",
                "description": "Include image references in the Markdown output. Default false."
              },
              "shortenBase64Images": {
                "type": "boolean",
                "description": "Truncate inline base64 image payloads to keep the output small. Default true."
              },
              "useMainContentOnly": {
                "type": "boolean",
                "description": "Keep only the page's main content, dropping headers, footers, sidebars, and navigation when detectable. Default false."
              },
              "pdf": {
                "type": "object",
                "properties": {
                  "shouldParse": {
                    "type": "boolean",
                    "description": "Parse PDF results. When false, PDF results are skipped. Default true."
                  },
                  "start": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "First 1-based PDF page to parse."
                  },
                  "end": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "Last 1-based PDF page to parse. Must be >= start."
                  }
                },
                "additionalProperties": false,
                "description": "PDF handling for scraped results."
              },
              "includeFrames": {
                "type": "boolean",
                "description": "Render iframe contents into the output. Default false."
              },
              "maxAgeMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2592000000,
                "description": "Reuse a cached result younger than this many milliseconds. Default 86400000 (1 day), max 2592000000 (30 days). Set 0 to always fetch fresh."
              },
              "waitForMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 30000,
                "description": "Extra browser wait in milliseconds after page load before the content is captured (0-30000). Useful for JavaScript-heavy pages."
              },
              "timeoutOpts": {
                "type": "object",
                "properties": {
                  "milliseconds": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 300000,
                    "description": "Request deadline in milliseconds (1000-300000)."
                  },
                  "behavior": {
                    "type": "string",
                    "enum": [
                      "fail",
                      "return-partial"
                    ],
                    "description": "What to do at the deadline: 'fail' returns 408 at no charge (default); 'return-partial' returns the usable results collected so far and bills them."
                  }
                },
                "required": [
                  "milliseconds"
                ],
                "additionalProperties": false,
                "description": "Request deadline and behavior on timeout."
              }
            },
            "additionalProperties": false,
            "description": "Inline Markdown scraping for each result. Set enabled: true to activate."
          },
          "timeoutOpts": {
            "type": "object",
            "properties": {
              "milliseconds": {
                "type": "integer",
                "minimum": 1000,
                "maximum": 300000,
                "description": "Request deadline in milliseconds (1000-300000)."
              },
              "behavior": {
                "type": "string",
                "enum": [
                  "fail",
                  "return-partial"
                ],
                "description": "What to do at the deadline: 'fail' returns 408 at no charge (default); 'return-partial' returns the usable results collected so far and bills them."
              }
            },
            "required": [
              "milliseconds"
            ],
            "additionalProperties": false,
            "description": "Request deadline and behavior on timeout."
          }
        },
        "required": [
          "query",
          "numResults"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "body"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}