Scraping data from the web used to be straightforward. You'd send a request, parse the static HTML, and you were done. But the modern web is different. It's dominated by dynamic, JavaScript-heavy Single-Page Applications (SPAs) that load content on the fly. Trying to extract data from these sites can feel like a constant battle against complex loading states, obscure API calls, and fragile CSS selectors that break with the smallest UI update.
What if you could skip all that? What if you could just tell a browser what you want in plain English and get structured JSON data back?
Enter browse.do, an AI-powered web navigation API that turns complex browser actions into simple function calls. Let's explore how you can extract data from any dynamic website, not with a complex script, but with a simple, high-level objective.
Traditional scraping tools work by downloading the initial HTML source of a page. With SPAs built on frameworks like React, Vue, or Angular, that initial source is often just a barebones shell with a <script> tag. The actual content—the product prices, the user comments, the data tables—is rendered client-side by JavaScript.
To scrape these sites, developers have historically relied on headless browser automation tools like Selenium or Puppeteer. While powerful, they come with their own set of challenges:
browse.do abstracts away this complexity. Instead of controlling a browser step-by-step, you provide a high-level goal, and an AI agent performs the necessary actions to achieve it. It interacts with the site just like a human would, understanding context and adapting to the UI.
Let's see it in action. Here’s how you can get the title and URL of the top story from Hacker News—a dynamic, interactive site—in just a few lines of code.
import { browse } from "@do-inc/agents";
async function getTopHackerNewsStory() {
const result = await browse.do({
url: "https://news.ycombinator.com",
objective: "Find the title of the top story and its URL."
});
console.log(result.data);
// {
// "title": "The specific title of the top story",
// "url": "https://the-url-of-the-top-story.com"
// }
return result.data;
}
getTopHackerNewsStory();
Let's look at what's happening in those three key lines:
This objective-based approach fundamentally changes the nature of web automation and anoints a new era of robotic process automation.
Data extraction is just the beginning. This same simple API can be used for a vast range of web automation tasks:
Stop fighting with brittle selectors and complex browser automation scripts. Describe your goal and let an AI agent handle the rest.
Ready to simplify your web automation workflow? Visit browse.do to learn more and get started today.