Oxylabs Browser Agent
Automate multi-step web interactions and structured extraction with natural-language instructions.
What does this agent do, and when should you use it?
Browser Agent is an Oxylabs AI Studio browser-automation tool accessed through the BrowserAgent class in its Python SDK. It accepts a starting URL and user prompt to carry out multi-step browsing, including clicking, typing, navigation, scrolling, waiting, and extraction. Callers can request JSON, Markdown, HTML, or PNG screenshot output; JSON requires an OpenAPI schema. Results are read from result.data, while screenshot content is returned as Base64 data that can be saved as a PNG. It suits teams seeking to reduce static selectors and hand-authored browser scripts, but adoption depends on an Oxylabs AI Studio API key and service ecosystem.
Create BrowserAgent(api_key="<API_KEY>") and call browser_agent.run(url=..., user_prompt=..., output_format=..., schema=..., geo_location=...). The url supplies the starting page, while user_prompt describes the browsing work in natural language; the documentation also describes structured step arrays using click, type, navigate, wait, and extract actions. The agent can click links, fill forms, scroll, navigate, wait, and extract information from pages. For structured JSON, call browser_agent.generate_schema(prompt=...) and pass the resulting schema to run; read the response through result.data. With output_format="screenshot", decode result.data.content["data"] from Base64 to produce a PNG.
- An ecommerce operator searches a storefront for a named product and extracts its name, platform, review rating, and price.
- A QA tester simulates checkout by adding an item to a cart, applying a coupon, and confirming the checkout flow.
- A travel operations team enters destinations on flight or hotel sites, applies filters, and gathers prices.
- A recruiting researcher searches for a role, opens job listings, and extracts job details.
- An events team navigates ticketing sites to collect event titles, dates, and prices.
What are this agent's strengths and limitations?
- Natural-language instructions describe multi-step browsing work, avoiding the documented need to create static rules or manual scripts for each action.
- A single BrowserAgent.run call can cover clicking, typing, navigation, scrolling, waiting, and extraction, including JavaScript-rendered pages.
- It supports JSON, Markdown, HTML, and PNG output, with schema-based JSON extraction for structured results.
- It requires an Oxylabs AI Studio API key and the oxylabs-ai-studio Python package, tying the primary workflow to that ecosystem.
- The documented Python path requires Python 3.10 or later; users of another language must use the separately referenced JavaScript SDK guide.
- JSON output requires an OpenAPI schema, adding a schema-generation or schema-definition step.
- The documentation cautions that sites with advanced bot detection may require advanced setup and does not guarantee support for every website.
How do you install or deploy this agent?
You need Python 3.10 or later and an Oxylabs AI Studio API key; the documentation offers a free trial. In a terminal, run the following command:
pip install oxylabs-ai-studio
How do you use this agent?
Minimal invocation:
from oxylabs_ai_studio.apps.browser_agent import BrowserAgent
browser_agent = BrowserAgent(api_key="<API_KEY>")
result = browser_agent.run(
url="https://sandbox.oxylabs.io/",
user_prompt="Go to the website and take a screenshot of the home page",
output_format="screenshot",
)
For JSON, first create a schema with browser_agent.generate_schema(prompt="..."), then pass schema=schema and output_format="json" to run.
How does this agent compare with similar options?
The documentation contrasts Browser Agent with Puppeteer and Selenium: those tools generally require selectors and scripts for each action, whereas Browser Agent accepts natural-language browsing instructions.