BuildE2EBuildE2E
DocsStart Free
API ReferenceIntroduction
Web Search Endpoints

Web Search

Search the web and get structured results. Perfect for research agents, RAG pipelines, and any application that needs real-time web data.
POST/v1/search
Execute one or more search queries and get structured results.

Request Body

ParameterTypeDescription
queriesrequired
string[]Array of search queries (1-3 queries)
limit
numberNumber of results per query (1-50). Defaults to 10
location
stringSearch location code (e.g., "US", "IN"). See supported countries
includeDomains
string[]Only include results from these domains (adds site: filter)
excludeDomains
string[]Exclude results from these domains (adds -site: filter)
engine
"google" | "bing" | "chatgpt" | "perplexity"Search engine to use. Defaults to "google"

Example Request

curl -X POST https://api.builde2e.com/api/v1/search \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "queries": ["latest AI developments 2025"],
    "limit": 5,
    "location": "US",
    "engine": "google"
  }'

Example Response

json
{
  "results": [
    {
      "query": "latest AI developments 2025",
      "success": true,
      "results": [
        {
          "url": "https://techcrunch.com/ai-developments-2025",
          "title": "Top AI Developments to Watch in 2025",
          "description": "From multimodal models to AI agents, here are the most significant AI advancements expected in 2025..."
        },
        {
          "url": "https://wired.com/ai-trends-2025",
          "title": "The AI Trends Defining 2025",
          "description": "AI is evolving rapidly. These are the key trends that will shape the technology landscape..."
        },
        {
          "url": "https://mit.edu/research/ai-breakthroughs",
          "title": "AI Breakthroughs: What's Next",
          "description": "MIT researchers share insights on upcoming AI breakthroughs and their potential impact..."
        }
      ],
      "loadTimeMs": 2345,
      "cost": 0.008
    }
  ],
  "total": 1,
  "successful": 1,
  "failed": 0,
  "totalTimeMs": 2345,
  "timestamp": "2025-02-03T10:15:30.123Z",
  "cost": 0.008
}

Response Structure

Top-level Fields

FieldTypeDescription
resultsarrayArray of search result objects for each query
totalnumberTotal number of queries executed
successfulnumberNumber of successful queries
failednumberNumber of failed queries
totalTimeMsnumberTotal time taken in milliseconds
timestampstringISO timestamp of the response
costnumberTotal cost of the request in USD

Query Result Object

Each item in the results array contains:
FieldTypeDescription
querystringThe search query
successbooleanWhether the search was successful
resultsarrayArray of search result items
loadTimeMsnumberTime taken to execute the search
costnumberCost of this query in USD
errorstringError message if search failed

Search Result Item

Each search result item contains:
FieldTypeDescription
urlstringURL of the search result
titlestringTitle of the search result
descriptionstringSnippet/description from the search result

Domain Filtering

You can filter search results to include or exclude specific domains using the includeDomains and excludeDomains parameters.

Include Only Specific Domains

curl -X POST https://api.builde2e.com/api/v1/search \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "queries": ["machine learning tutorials"],
    "limit": 10,
    "includeDomains": [
      "medium.com",
      "towardsdatascience.com",
      "kaggle.com"
    ]
  }'

Exclude Specific Domains

curl -X POST https://api.builde2e.com/api/v1/search \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "queries": ["javascript frameworks comparison"],
    "limit": 10,
    "excludeDomains": [
      "pinterest.com",
      "quora.com"
    ]
  }'

Multiple Queries

You can execute up to 3 search queries in a single request for better efficiency:
curl -X POST https://api.builde2e.com/api/v1/search \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "queries": [
      "OpenAI GPT-5 release date",
      "Anthropic Claude latest features",
      "Google Gemini 2.0 capabilities"
    ],
    "limit": 5,
    "location": "US"
  }'
The response will contain results for each query in the same order:
json
{
  "results": [
    {
      "query": "OpenAI GPT-5 release date",
      "success": true,
      "results": [...],
      "loadTimeMs": 1234,
      "cost": 0.008
    },
    {
      "query": "Anthropic Claude latest features",
      "success": true,
      "results": [...],
      "loadTimeMs": 1156,
      "cost": 0.008
    },
    {
      "query": "Google Gemini 2.0 capabilities",
      "success": true,
      "results": [...],
      "loadTimeMs": 1089,
      "cost": 0.008
    }
  ],
  "total": 3,
  "successful": 3,
  "failed": 0,
  "totalTimeMs": 3479,
  "cost": 0.024
}

Pricing

Each search query costs $$0.007 base + $$0.001 per page of 10 results. For the default limit of 10 results (1 page), each query costs $$0.008. Multi-query requests are charged per query.

Supported Locations

Pass any ISO 3166-1 alpha-2 country code as the location parameter to geo-target your search results. View all supported countries