Basic workflow
Get the data in three easy steps
Requesting data via Price API is a three-step process:
- You create a job.
- You wait for the job to finish collecting data.
- You download the job's results.
1. Create a job
A job encapsulates your request to collect one or more products (or other kind of data). It specifies:
- The
sourcefrom which to collect the data (e.g.amazonorgoogle-shopping) - The
countryin which to collect the data (e.g.usfor the United States,gbfor Great Britain ordefor Germany) - The
topic(type of information) for which to search (e.g.search_results,product, oroffers) - The
keyby which to search (e.g. search bygtinorterm) - The
valuesfor which to search (e.g.5901234123457oriPhone 6s blue) - The
max_age, indicating how old the data may be: if we have something newer in cache, we will use the cache, otherwise we will start collecting data. This can either be a number indicating how old in minutes it can be (0means never use cache and1440means up to 24 hours old) or a time string using ISO 8601 format. - The
max_pages, indicating how many pages e.g. of offers you want per product
When you create a job, you are given an ID (job_id) that you need to refer to the job in the next steps.
See API reference
2. Wait for the job to finish
Now you poll the job's status every minute. A progress will be shown for your information, but the important part of the response is its status which needs to be finished (not working or finishing) before you can download the results.
See API reference
3. Download the job's results
When the job's status is finished (and only then) can you download its results.
Results can be downloaded in two different formats:
- JSON (recommended for integration)
- XML
72 hour retention periodJob results are only available for 72 hours after the job was requested. After that we permanently delete the results. So please make sure to download the results shortly after the job finishes.
See API reference
Updated 6 months ago
