BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.02/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)

---

# Browser Use can write Javascript

**Date:** 2025-09-17
> Agents can now write and execute JavaScript code to interact with websites

---

In your prompts you can now prompt the agent to write JavaScript code to interact with elements on the website.

This enables more precise control and complex interactions that go beyond standard browser automation—perfect for handling edge cases or custom behaviors.

```python
from browser_use import Agent

agent = Agent(
    task="Write JavaScript to extract all product prices from the page",
    llm=llm
)

result = await agent.run()
```

The agent will automatically write and execute the necessary JavaScript to complete your task.
