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
source
from which to collect the data (e.g.amazon
orgoogle-shopping
) - The
country
in which to collect the data (e.g.us
for the United States,gb
for Great Britain orde
for Germany) - The
topic
(type of information) for which to search (e.g.search_results
,product
, oroffers
) - The
key
by which to search (e.g. search bygtin
orterm
) - The
values
for which to search (e.g.5901234123457
oriPhone 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 (0
means never use cache and1440
means 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 period
Job 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 4 months ago