POST
/
api
/
v1
/
search-url
import aiohttp
import asyncio

async def search_website():
    payload = {
        "url": "https://www.artificialintelligence-news.com/",
        "query": "Latest AI News",
        "depth": 2
    }
    
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.browser-use.com/api/v1/search-url",
            json=payload,
            headers=headers
        ) as response:
            return await response.json()

result = asyncio.run(search_website())
print(result)
{
  "url": "https://example.com",
  "content": "Relevant content extracted from the website based on your query..."
}

Overview

Extract content from a specific website by navigating it in real-time. Clicks through pages to find exactly what you need. 💡 Complete working example: search_url.py

Request

url
string
required
The URL to extract content from
query
string
required
What specific content to look for and extract from the URL
depth
integer
default:"2"
How deep to navigate within the website (2-5). Higher depth = more thorough exploration through multiple page clicks.

Response

url
string
The URL that was processed
content
string
Extracted content relevant to the search query
{
  "url": "https://example.com",
  "content": "Relevant content extracted from the website based on your query..."
}

Example

import aiohttp
import asyncio

async def search_website():
    payload = {
        "url": "https://www.artificialintelligence-news.com/",
        "query": "Latest AI News",
        "depth": 2
    }
    
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.browser-use.com/api/v1/search-url",
            json=payload,
            headers=headers
        ) as response:
            return await response.json()

result = asyncio.run(search_website())
print(result)

Pricing

Cost per request: 1 cent × depth Examples:
  • depth=2 = 2 cents per request (default value)
  • depth=3 = 3 cents per request
  • depth=4 = 4 cents per request
  • depth=5 = 5 cents per request