Skip to main content

Run a published extraction template

POST 

/v1/template

Runs one of the published templates against a supported site and returns records shaped by that template's output schema. Costs a flat 5 credits per execution.

Request body​

templatestringrequired
Which template to run. The catalogue with the current set is GET /v1/templates.
Values
amazon_product, amazon_search, amazon_bestsellers, walmart_product, walmart_search, walmart_category
paramsobjectrequired
Template input. The exact schema — including which key identifies the item — is data.data.params_schema from GET /v1/templates/{template_id}; it describes the whole request body (template plus params), and unknown keys are rejected.
Values
depends on the template

Identifier key per template:

TemplateKeyFormat
amazon_productasin10 uppercase letters/digits
amazon_searchquery1–256 characters
amazon_bestsellersurlhttps://www.amazon.com/... best-sellers ranking page
walmart_productitem_id5–15 digits
walmart_searchquery1–256 characters
walmart_categoryurlWalmart category page

Common optional params keys:

KeyTypeDefaultDescription
zipcodestringnoneUS 5-digit ZIP code used for pricing and availability. When omitted the target site decides the delivery location — flowda deliberately does not inject a default.
pagesinteger1Which results page to collect. List templates only; sending it to a detail template is rejected.
timeout_msinteger60000Execution budget, 1000 … 120000.

Reading the result​

  • data.outputs is an array of records (or null when there was no content); detail templates return one record.
  • data.meta.fields explains the record fields that apply to this template, keyed by field path (for example variants[].price) — use it to render labels in your own UI. Descriptions are provided by the template's published schema.
  • A successful but empty result is not a failure: data.success is true, data.outputs is null, and the 5 credits are still charged.
  • A failed execution reports data.success: false with a platform code (for example TEMPLATE_MISMATCH or TARGET_SITE_ERROR) and is not charged.

Request​

Responses​

Template result, possibly a platform-level failure in data

Response Headers
    Cache-Control

    Always no-store — no intermediary may cache these responses.

    X-Upstream-Request-Id

    The fetch service's own request identifier for this call. Quote it together with the envelope's request_id in support requests.