用于 Dataify Amazon 产品列表采集 Builder 任务。当用户提到或请求 Amazon 产品列表采集工具时触发。
Submit Amazon product list collection jobs by keyword and domain through Dataify Builder and continue through final-result retrieval. After submission, continue monitoring the returned task_id and return the final result by default.
Input: a keyword and Amazon domain.
bash
python3 scripts/submit_amazon_product_list.py --keyword "coffee" --domain "https://www.amazon.com/" --page-turning 1
The command waits up to 10 minutes and prints the final JSON result. Add --no-wait only for submission-only behavior.
If DATAIFY_API_TOKEN is missing, log in or register at https://dashboard.dataify.com/login?utm_source=skill. New accounts get 50 free credits, enough for about 6,000 trial results, valid for 7 days, and only successful requests are billed.
Use DATAIFY_API_TOKEN as the long-term saved token name.
DATAIFY_API_TOKEN is saved locally, use it.API TOKEN in user-facing instructions. Prefer the environment variable name DATAIFY_API_TOKEN for saved local use.PowerShell examples for saving the token for the current session:
powershell
$env:DATAIFY_API_TOKEN = "YOUR_DATAIFY_API_TOKEN"
For a persistent user-level variable on Windows:
powershell
[Environment]::SetEnvironmentVariable("DATAIFY_API_TOKEN", "YOUR_DATAIFY_API_TOKEN", "User")
keyword, domain, page_turning, and file_name.data.task_id from the Builder response.FieldRequiredDefaultNoteskeywordYeshttps://www.amazon.com/sp?ie=UTF8&seller=ADZ7LD48GVFQJ&asin=B07H56J7K1&ref_=dp_merchant_link&isAmazonFulfilled=1Amazon product-list keyword query.domainYeshttps://www.amazon.com/Amazon domain.page_turningNo1Number of pages to collect. Must be an integer greater than or equal to 0.file_nameNo{{TasksID}}Builder form field. Can be changed by the user.
If the user has already provided some values, show those values in place of the defaults and only ask whether the remaining/defaulted values should be changed.
Use form fields rather than hand-built URL-encoded strings.
https://scraperapi.dataify.com/builderPOSTBearer DATAIFY_API_TOKENapplication/x-www-form-urlencodedspider_name=amazon.comspider_id=amazon_product-list_by-keywords-domainspider_errors=truespider_parameters must be a JSON string, not a raw object.file_name defaults to {{TasksID}} and can be changed by the user.For stable execution, prefer scripts/submit_amazon_product_list.py with Python 3.6 or newer instead of rewriting the Builder flow. The script writes and reads UTF-8 text.
powershell
python3 ".\scripts\submit_amazon_product_list.py"
python3 ".\scripts\submit_amazon_product_list.py" --keyword "coffee" --domain "https://www.amazon.com/" --page-turning 1 --file-name "amazon-product-list"
The script prints a JSON summary with task_id, keyword, domain, page_turning, file_name and message.
Missing Dataify API TOKEN means DATAIFY_API_TOKEN is not set in the environment. Tell the user to get an API TOKEN from Dataify.
Keyword cannot be empty means no usable keyword query was provided.
Domain cannot be empty means no usable domain was provided.
Page turning must be greater than or equal to 0 means the numeric page count is invalid.
File name cannot be empty means no usable file_name was provided.
Missing task_id usually means the authorization header, token, spider_name, or spider_id is wrong.
The default deliverable is the collected result, not only a task_id.
Submit the Builder task once and capture its task_id.
Immediately continue with $dataify-task-operations and monitor the same task ID.
--timeout 1800 for media downloads or clearly high-volume, multi-page, or multi-input collections.When the task succeeds, download and return the final JSON result. Summarize large payloads while preserving access to the raw result.
If monitoring times out or is interrupted, return the task ID and a resume command. Do not resubmit the paid task.
Stop after submission only when the user explicitly asks for submission only, a task ID, or --no-wait behavior.
export for macOS/Linux shells, $env: for Windows PowerShell, or set for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.DATAIFY_API_TOKEN is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it..env unless the execution path explicitly loads it, and ensure .env is ignored by version control.