> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-cursor-proxy-indicator-and-text-6cda.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Structured Output

> Extract typed data from any website using Pydantic models or Zod schemas.

Define a schema for the data you want, and the agent returns it as a typed object — not raw text. Use this whenever you need to process the result programmatically.

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk import AsyncBrowserUse
  from pydantic import BaseModel

  class Product(BaseModel):
      name: str
      price: float
      rating: float

  class ProductList(BaseModel):
      items: list[Product]

  client = AsyncBrowserUse()
  result = await client.run(
      "Get the top 3 results for 'wireless headphones' on Amazon",
      output_schema=ProductList,
  )
  for p in result.output.items:
      print(f"{p.name}: ${p.price} ({p.rating}★)")
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk";
  import { z } from "zod";

  const Product = z.object({ name: z.string(), price: z.number(), rating: z.number() });
  const client = new BrowserUse();
  const result = await client.run(
    "Get the top 3 results for 'wireless headphones' on Amazon",
    { schema: z.array(Product) },
  );
  result.output.forEach((p) => console.log(`${p.name}: $${p.price} (${p.rating}★)`));
  ```
</CodeGroup>

\~8-12 steps with Browser Use 2.0. See [Pricing](/cloud/pricing) for cost per model.

<Tip>
  Keep schemas flat when possible. Nested schemas work but add extraction complexity for the agent.
</Tip>
