# Agent Scrape

> Give a URL and a goal; a browser agent navigates until it finds what you asked for.

Source: http://localhost:3000/docs/endpoints/agent-scrape

## Agent Scrape: `POST /v1/agent-scrape/`

A goal-driven browser that navigates until it can return clean content. Cost: 5 credits.

```bash
curl -X POST https://api.hushsearch.io/v1/agent-scrape/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://books.toscrape.com/",
  "goal": "Find the price of the first travel book",
  "max_steps": 4
}'
```

A browser agent starts at `url` and takes up to `max_steps` actions (clicking, scrolling, following links) to satisfy the goal, then returns what it found.

## Parameters

| Field | Type | Default | Notes |
|---|---|---|---|
| `url` | string | — | **Required.** Starting page. |
| `goal` | string | — | **Required.** 1–500 characters, e.g. "find the pricing for the team plan". |
| `max_steps` | integer | `4` | 1–20 browser actions. |

Costs 5 credits per call. If the agent fails, the charge is refunded.
