APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
Extractions

create_extraction

POST/create_extraction

Legacy. 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 urirequired

The page the agent starts discovery from.

goal_descriptionstringrequired

What records to extract and where on the site they live.

output_record_json_schemaobjectrequired

JSON 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.

namestring

Display name for the extraction. Defaults to the starting URL's host.

required_keysarray of string

Record 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_statusstringrequired
One of success
messagestring
extraction_plan_keystringrequired

UUID of the new extraction plan. Use with /extraction_plan and /run_extraction.

extraction_plan_namestring
statusstringrequired

Discovery always starts asynchronously — poll /extraction_plan until "ready"

One of discovering
app_urlstring uri

Link to the extraction in the Riveter app

credits_chargedinteger

One-time creation (discovery) cost charged upfront

required_keysarray of string
400Bad request - invalid input or missing required parameters
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, 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.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
401Unauthorized - invalid or missing API key
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, 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.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
403Forbidden - API access not enabled for account
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, 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.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
422Unprocessable entity - validation failed
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, 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.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable