Why it’s faster
Calling the backend directly wins on every axis that matters:- Speed. No page loads, no waiting for animations or spinners between items.
- Parallelism. Many requests can fire simultaneously instead of one click at a time.
- Clean data. Responses arrive as structured JSON or XML, not text scraped out of the DOM.
- Stability. API contracts change far less often than page layouts, so the approach keeps working after a redesign.
- Extra fields. Backend responses often carry useful data that the UI never renders.
How the agent does it
The agent works through a repeatable sequence. You don’t have to prompt each step — describe the outcome you want and it handles the discovery.1
Explore the app
The agent loads the web app and interacts with it normally, triggering the requests the page makes as it renders data.
2
Inspect the network
It watches network traffic and picks out the HTTP calls that return structured data — REST or GraphQL endpoints — rather than assets or tracking pings.
3
Recognize the pattern
From those calls it extracts the URL shape, for example
/api/v1/employees/{id}/time-off, so it can vary the parameters.4
Validate with one call
It makes a single direct request to confirm the endpoint behaves as expected before scaling up.
5
Run in parallel
Once validated, it fetches everything at once — using
Promise.all() for concurrency and chunking large jobs into batches to stay polite.6
Collect the results
It formats the combined data into a table, spreadsheet, or raw dataset, whatever you asked for.
Techniques it uses
Because the JavaScript runs inside the page’s own origin, it inherits the browser’s authentication context and sidesteps CORS restrictions entirely.
A typical parallel fetch looks like this:
Supported endpoint types
- REST endpoints returning JSON — the most common case.
- GraphQL, usually a single
/graphqlendpoint. The agent inspects the query structure first so it can shape valid requests. - XML-returning enterprise APIs such as BambooHR or SAP, parsed with
DOMParser.
Things to watch for
- Rate limits. High-volume jobs need batching and short delays so the server isn’t flooded. The agent chunks automatically, but a strict backend may still throttle.
- GraphQL discovery. GraphQL hides its shape behind a single endpoint, so the agent has to observe a real query before it can craft its own.
- XML overhead. XML responses require an extra parsing step compared to JSON.
API discovery still runs through the desktop browser, so it inherits the same requirements as Browser Automation: the desktop app and an authenticated session. For patterns you rely on regularly, consider promoting the endpoint to a proper REST API source.