Choosing an endpoint
Fetch vs Search vs Browser vs Screenshots — pick the right tool.
The String Web Access API exposes a few endpoints that solve different problems. Reach for the lightest one that gets the job done — it's faster and cheaper.
Fetch
You have a URL and want its content (HTML, JSON, Markdown) or specific fields extracted from it. The default choice for data retrieval.
Search
You don't have a URL yet — you have a query, and want the top Google results.
Browser (CDP)
You need to interact with a page: click, type, log in, navigate multi-step flows. Drive it with Puppeteer or Playwright.
Screenshots & actions
You want an image of a page, optionally after running a sequence of actions.
Sitemap crawl
You want every URL on a site — an asynchronous crawl that discovers them from a single starting point, ready to feed into Fetch.
Rule of thumb
A good escalation path is Search → Fetch → Browser:
- Search to find the right pages for a query.
- Fetch to quickly pull content or structured data from those pages.
- Browser when a page needs real interaction — logins, complex navigation, or anything a single request can't reach.
Most workloads only ever need Fetch.