> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wistx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Search

> Search the web for DevOps/infrastructure/compliance/FinOps/SRE information

Search the web for DevOps, infrastructure, compliance, FinOps, and SRE information. Supports both general web search and security-focused searches (CVEs, advisories).

## Endpoint

`POST /v1/search/web`

## Request Body

<ParamField body="query" type="string" required>
  Search query. Minimum length: 3 characters, maximum length: 1,000 characters.
</ParamField>

<ParamField body="search_type" type="string" default="general">
  Type of search: `general` (includes web search), `security` (focuses on CVEs/advisories).
</ParamField>

<ParamField body="resource_type" type="string" optional>
  Filter by resource type (RDS, S3, EKS, GKE, AKS, etc.).
</ParamField>

<ParamField body="cloud_provider" type="string" optional>
  Filter by cloud provider: `aws`, `gcp`, `azure`.
</ParamField>

<ParamField body="severity" type="string" optional>
  Filter by severity (for security searches): `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`.
</ParamField>

<ParamField body="include_cves" type="boolean" default="true">
  Include CVE database results.
</ParamField>

<ParamField body="include_advisories" type="boolean" default="true">
  Include security advisories.
</ParamField>

<ParamField body="limit" type="integer" default="1000" min="1" max="1000">
  Maximum number of results to return.
</ParamField>

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.wistx.ai/v1/search/web \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "query": "AWS RDS encryption best practices",
      "search_type": "general",
      "cloud_provider": "aws",
      "limit": 1000
    }'
  ```

  ```python Python theme={null}
  import requests

  api_key = "YOUR_API_KEY"
  response = requests.post(
      "https://api.wistx.ai/v1/search/web",
      headers={
          "Authorization": f"Bearer {api_key}",
          "Content-Type": "application/json"
      },
      json={
          "query": "AWS RDS encryption best practices",
          "search_type": "general",
          "cloud_provider": "aws",
          "limit": 1000
      }
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const apiKey = "YOUR_API_KEY";
  const response = await fetch("https://api.wistx.ai/v1/search/web", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${apiKey}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      query: "AWS RDS encryption best practices",
      search_type: "general",
      cloud_provider: "aws",
      limit: 20
    })
  });
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "net/http"
  )

  func main() {
      apiKey := "YOUR_API_KEY"
      payload := map[string]interface{}{
          "query": "AWS RDS encryption best practices",
          "search_type": "general",
          "cloud_provider": "aws",
          "limit": 1000,
      }
      jsonData, _ := json.Marshal(payload)
      req, _ := http.NewRequest("POST", "https://api.wistx.ai/v1/search/web", bytes.NewBuffer(jsonData))
      req.Header.Set("Authorization", "Bearer "+apiKey)
      req.Header.Set("Content-Type", "application/json")
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
  }
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'

  uri = URI('https://api.wistx.ai/v1/search/web')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  request = Net::HTTP::Post.new(uri.path)
  request['Authorization'] = "Bearer YOUR_API_KEY"
  request['Content-Type'] = 'application/json'
  request.body = {
    query: "AWS RDS encryption best practices",
    search_type: "general",
    cloud_provider: "aws",
    limit: 20
  }.to_json
  response = http.request(request)
  puts response.body
  ```

  ```php PHP theme={null}
  <?php
  $apiKey = "YOUR_API_KEY";
  $data = [
      "query" => "AWS RDS encryption best practices",
      "search_type" => "general",
      "cloud_provider" => "aws",
      "limit" => 20
  ];
  $ch = curl_init("https://api.wistx.ai/v1/search/web");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "Authorization: Bearer " . $apiKey,
      "Content-Type: application/json"
  ]);
  $response = curl_exec($ch);
  curl_close($ch);
  echo $response;
  ?>
  ```

  ```java Java theme={null}
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.net.URI;
  import com.fasterxml.jackson.databind.ObjectMapper;

  String apiKey = "YOUR_API_KEY";
  Map<String, Object> payload = Map.of(
      "query", "AWS RDS encryption best practices",
      "search_type", "general",
      "cloud_provider", "aws",
      "limit", 20
  );
  ObjectMapper mapper = new ObjectMapper();
  String json = mapper.writeValueAsString(payload);
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://api.wistx.ai/v1/search/web"))
      .header("Authorization", "Bearer " + apiKey)
      .header("Content-Type", "application/json")
      .POST(HttpRequest.BodyPublishers.ofString(json))
      .build();
  HttpClient client = HttpClient.newHttpClient();
  HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
  System.out.println(response.body());
  ```
</CodeGroup>

## Response Example

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "data": {
      "web": [
        {
          "title": "AWS RDS Encryption Best Practices",
          "content": "Amazon RDS encryption provides an additional layer of data protection...",
          "url": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html",
          "score": 0.95,
          "source": "tavily",
          "type": "web_result"
        }
      ],
      "security": [
        {
          "cve_id": "CVE-2023-12345",
          "title": "RDS Security Advisory",
          "severity": "HIGH",
          "description": "Security vulnerability in RDS encryption...",
          "affected_versions": ["1.0.0", "1.1.0"],
          "published_date": "2023-01-15"
        }
      ],
      "total": 15
    },
    "metadata": {
      "request_id": "req_abc123",
      "timestamp": 1704067200.0,
      "query_time_ms": 1234
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request parameters",
      "details": "Invalid search_type: invalid. Use 'general' or 'security'"
    },
    "metadata": {
      "request_id": "req_abc123",
      "timestamp": 1704067200.0
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": {
      "code": "UNAUTHORIZED",
      "message": "Invalid or missing API key",
      "details": null
    },
    "metadata": {
      "request_id": "req_abc123",
      "timestamp": 1704067200.0
    }
  }
  ```

  ```json 429 Too Many Requests theme={null}
  {
    "error": {
      "code": "QUOTA_EXCEEDED",
      "message": "Query quota exceeded. Limit: 50 queries/month, Current: 50",
      "details": {
        "limit_type": "queries_per_month",
        "current": 50,
        "limit": 50
      }
    },
    "metadata": {
      "request_id": "req_abc123",
      "timestamp": 1704067200.0
    }
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": {
      "code": "INTERNAL_ERROR",
      "message": "An unexpected error occurred",
      "details": "Web search service unavailable"
    },
    "metadata": {
      "request_id": "req_abc123",
      "timestamp": 1704067200.0
    }
  }
  ```
</ResponseExample>

## Rate Limits

| Plan | Queries/Month |
| - | - |
| Professional | 2,000 |
| Team | 10,000 |
| Enterprise | Unlimited |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.