create_extraction
/create_extractionLegacy. Use POST /extractions for new work.
Create a new extraction and kick off plan discovery. Riveter's agent explores the site from starting_url, drafts an executable extraction plan, and validates it can produce records matching your schema.
Discovery is asynchronous and typically takes several minutes. Poll /extraction_plan with the returned extraction_plan_key until status is "ready", then execute with /run_extraction.
The one-time creation (discovery) cost is charged upfront when discovery starts; each subsequent run is charged separately. Requires extraction creation to be enabled for your account — contact support if you receive a 403.
Output schema
output_record_json_schema describes the shape of one record — a JSON Schema object with a non-empty properties map. Every run returns an array of records matching it. An array-wrapped schema ({ "type": "array", "items": {...} }) is accepted and unwrapped to its items schema.
Request bodyrequired
starting_urlstring urirequiredThe page the agent starts discovery from.
goal_descriptionstringrequiredWhat records to extract and where on the site they live.
output_record_json_schemaobjectrequiredJSON Schema object describing the shape of one output record. Must include a non-empty "properties" map. Every run returns an array of records matching this schema.
namestringDisplay name for the extraction. Defaults to the starting URL's host.
required_keysarray of stringRecord keys that must come back non-empty on every record. A run that leaves any of them missing, null, or empty is treated as failed (and may auto-regenerate the plan).
Responses
200Extraction created and discovery started
request_statusstringrequiredmessagestringextraction_plan_keystringrequiredUUID of the new extraction plan. Use with /extraction_plan and /run_extraction.
extraction_plan_namestringstatusstringrequiredDiscovery always starts asynchronously — poll /extraction_plan until "ready"
app_urlstring uriLink to the extraction in the Riveter app
credits_chargedintegerOne-time creation (discovery) cost charged upfront
required_keysarray of string400Bad request - invalid input or missing required parameters
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
401Unauthorized - invalid or missing API key
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
403Forbidden - API access not enabled for account
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
422Unprocessable entity - validation failed
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.