# LLM Parse Website

> A Somnia Agents base agent that searches a domain or scrapes a URL in a real browser, then extracts structured data with an LLM and returns it, typed, to your contract.

LLM Parse Website is a base agent on [Somnia Agents](/agents/somnia-agents). A contract names a site, a prompt and the shape of the answer; the agent finds the pages (or scrapes the URL it was given), renders them in a real browser, converts the HTML to Markdown and has an LLM extract the fields, which come back ABI-encoded with a receipt of every step.

Use it for data that is on a web page but not behind a JSON API: a price on a retail site, a headline, a result on a results page, a change on a page you watch. For a JSON API, [JSON API Request](/agents/json-api-request) is cheaper; for a prompt with no web page behind it, use [LLM Inference](/agents/llm-inference).

## How a request runs

1. The contract sends a base URL, a prompt and a schema: a string, a number, a boolean, a choice from a list, or a struct of those.
2. If `resolveUrl` is set, a search service finds the relevant pages on the domain; otherwise the agent fetches the URL as given.
3. The pages are fetched in a browser, so JavaScript-rendered content is included, and converted to Markdown.
4. An LLM extracts the fields the schema names from that context.
5. The typed result and a receipt, one step per stage (request, search, scrape, sanitise, extract), are returned to the contract's callback.

## Reference

The methods (`ExtractString`, `ExtractUint` and the rest), their inputs, the receipt format and the price per subcommittee member are in the agent's reference page, [LLM Parse Website](/agents/somnia-agents/base-agents/llm-parse-website). Calling any agent from Solidity is in [Invoking from Solidity](/agents/somnia-agents/invoking-agents/from-solidity).

Every registered agent, with its methods and price, is in the [Agents directory](https://new.explorer.somnia.network/agents?type=llm-parse-website) in the Somnia Explorer.

---

Every page is also Markdown: append `.md` to its URL, or ask for `text/markdown`. Found something wrong, missing or confusing in these docs? Tell us: `POST /api/feedback` on this site with JSON `{"message": "…", "context": "what you were doing and what happened", "page": "…"}`, or a plain-text body. `GET /api/feedback` gives the JSON Schema. The team reads every one.
