---
title: "Generate Agent Scraper"
method: POST
path: "/v1/agent/generate"
tags: ["v1", "agent"]
---

# Generate Agent Scraper

`POST /v1/agent/generate`

## Request

- Base URL: `https://api.parsera.org` (the document declares no server; this is the origin it was published from)
- URL: `https://api.parsera.org/v1/agent/generate`
- Auth: API key in header `X-API-KEY`

Build an agentic scraper. Auto-creates scraper if scraper_id omitted.

## Request body

- AgentGenerateInput: Input model for generating agentic scrapers via /v1/agent/generate.
  - `template_id` string, nullable
  - `url` string, required
  - `prompt` string, required
  - `attributes` Attribute[], nullable
    - `name` string, required
    - `description` string
    - `type` 'string' | 'integer' | 'number' | 'bool' | 'list' | 'object' | 'any' | 'image'

## Response `202`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/parsera/apis/parsera-api.md) · [All operations](https://skmtc.dev/parsera/apis/parsera-api/llms.txt) · [OpenAPI document](https://skmtc.dev/parsera/apis/parsera-api/revisions/20a882fbd0f6?raw)
