POST/v1/search

Web search

Runs a search via the Brave Search API (2000 free queries/month) and optionally scrapes each result URL in parallel using the Playwright browser pool. Requires BRAVE_API_KEY in your environment.

Request body

NameTypeRequiredDescription
querystringrequiredSearch query
maxResultsnumberoptionaldefault: 5Number of results to return (max 10)
scrapebooleanoptionaldefault: trueScrape each result URL and include markdown content
formatsstring[]optionaldefault: ["markdown"]Content formats when scrape is true

Example

bash
curl -X POST http://localhost:3000/v1/search \
  -H "Content-Type: application/json" \
  -d '{"query":"open source web scrapers","maxResults":5,"scrape":false}'

Response

bash
{
  "success": true,
  "data": {
    "results": [
      {
        "url": "https://github.com/apify/crawlee",
        "title": "Crawlee — web scraping library",
        "description": "A fast, reliable crawler for Node.js..."
      }
    ],
    "total": 5
  }
}

Try it

Live preview only works when the API is running on your machine.

Run docker compose up and the Try-It panel will become interactive. Until then, copy the curl example below.