Skip to content

Endpoints

Search

Web search results, optionally scraped to full markdown in the same request.

POST/v1/search

ReferenceTry it ▸

Search queries the web and returns ranked results with titles and snippets. Add scrapeOptions and every result is also scraped, so you get full markdown for each hit in one round trip. 5 credits per 10 results (rounded up, and at least 5 per search, since a search that finds nothing still queries the index), plus normal scrape credits for each result scraped successfully. Results are scraped within a 45-second budget; any that fail to scrape, or aren't reached in time, come back without a document and cost nothing extra. Identical queries are cached for about 10 minutes.

country is a two-letter code such as us or de, and language a language code such as en or pt-BR. A query the search provider refuses comes back as invalid_request at no charge.

Example#

curl -X POST "https://api.vermin.dev/v1/search" \
  -H "Authorization: Bearer $VERMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "open source web scrapers",
    "limit": 5,
    "scrapeOptions": { "formats": ["markdown"] }
  }'

Request#

SearchRequest
  • querystringrequiredmax 500 chars
  • limitintegerdefault 101–50
  • countrystring
    Two-letter ISO 3166-1 country code for localised results, e.g. us, de
  • languagestring
    Language code (ISO 639-1, optionally with a region), e.g. en, pt-BR
  • timeRange"day" | "week" | "month" | "year"
  • scrapeOptionsScrapeOptions
    If set, each result is scraped (billed as scrapes). Results are scraped within a fixed time budget; any not scraped in time are returned without a document and cost nothing.

Response#

200 OK
{
  "success": true,
  "results": [
    {
      "position": 1,
      "url": "https://github.com/topics/web-scraping",
      "title": "web-scraping · GitHub Topics",
      "snippet": "Web scraping is the process of extracting data from websites…",
      "source": "GitHub",
      "document": { "url": "https://github.com/topics/web-scraping", "markdown": "# web-scraping\n…", "tier": "fetch" }
    }
  ],
  "credits_used": 10,
  "request_id": "req_01J9V6C8LM"
}

Here 5 results cost 5 credits, plus 5 successful scrapes at 1 each.

SearchResponse
  • successbooleanrequired
  • resultsobject[]required
    Show 7 fields
    • urlstringrequired
    • titlestringrequired
    • snippetstring
    • positioninteger
    • datestring
      Publication date as reported by the search provider (ISO 8601 when available, otherwise its text such as 3 days ago)
    • sourcestring
      Site or publisher name when the provider reports one
    • documentDocument
  • credits_usedintegerrequired
  • request_idstring