# Page Interactions

### Overview <a href="#overview" id="overview"></a>

For scenarios requiring more precise control than autonomous agents, we offer a fully functional web browser interface for LLM agents. This allows you to observe website states and execute actions using intuitive natural language commands, giving you granular control while maintaining the simplicity of natural language interaction:

* **Observe a page**: Use the `observe` endpoint to get the current state of a page and its available actions.
* **Step through a page**: Use the `step` endpoint to take actions on a page.
* **Scrape (structured) data from a page**: Use the `scrape` endpoint to extract structured data from a page.

These operations offer more granular control over what’s actually executed in a browser session compared to the [agent](https://votte.gitbook.io/votte/web-agents) operations.

### Executing actions <a href="#executing-actions" id="executing-actions"></a>

Votte has a `step` function that can be used to execute actions on a page using natural language. Here’s an example of how to find jobs on LinkedIn:

Copy

```
from votte_sdk import VotteClient

votte = VotteClient()
with votte.Session() as page:
    obs = page.observe(url="https://linkedin.com")
    action = obs.space.actions.get("click 'jobs'")
    obs = page.step(action)
    action = obs.space.actions.get("click the first job posting")
    obs = page.step(action)
```

### Scrape (structured) data from the page <a href="#scrape-structured-data-from-the-page" id="scrape-structured-data-from-the-page"></a>

Votte provides a scraping endpoint that allows you to scrape any website with a single API call (markdown or structured JSON format supported). Here’s an example of how to extract the job title from the job posting:

{% tabs %}
{% tab title="scrape.py" %}

```javascript
from pydantic import BaseModel
from votte_sdk import VotteClient

class JobPosting(BaseModel):
  jobTitle: str

votte = VotteClient()
job_title =  votte.scrape(
  url="https://linkedin.com",
  instruction="Extract the job title from the job posting",
  response_format=JobPosting,
)
```

{% endtab %}
{% endtabs %}

Votte uses Pydantic to help you define the schema of the data to be extracted.
