Price Analytics

फ्रीमियम
द्वारा 3B Data / @CRAWLER2API | अपडेट किया गया 4 महीने पहले | eCommerce
लोकप्रियता

9.3 / 10

लेटेंसी

71ms

सेवा का स्तर

100%

सभी ट्यूटोरियल पर वापस जाएं (2)

How to use Price Analytics API

1. Introduction

Our Price Analytics API is a RESTful service based on JSON format (or others) that provides you with market price and product data on your portfolio items. In order to receive data on one or more offers for products your system asks the API with a specific identifier (GTIN, ASIN, id, term, URL) as well as specific data source (e.g. amazon, google, idealo, etc.) and country code (de, us, etc.). Our service visits the website of the data source specified in the request, searches for the product offers and extracts the relevant information. Once this process is done, your system can download the data and use it for further processing.

2. Workflow

The following steps apply when data is requested from Price Analytics API:
1.|Create a job
2.|Poll the job (every few minutes) untill results are prepared

2.1. Create a job

2.1.1 Endpoints

There are several endpoints to create a job, based on the search parameter.

  • If you want to search for product names, e.g. “iphone 13”, use “Start search by term” endpoint.
  • If you want to search for marketplace product ids, e.g. Amazon ASIN numbers (B08BHXC5ZS), or Idealo product ids (6719824), use “Start search by id” endpoint.
  • If you want to search for product GTINs (Global Trade Item Number), e.g. 190199380554, use “Start search by gtin” endpoint.
    GTIN is compatible with EAN (European Article Number), JAN (Japan Article Number) and UPC (Universal Product Code).
2.1.2 Input parameters

A job summarizes your request to collect data for one or more product offers. Each job carries a job_id and can be specified by the following parameters:

  • source - website from which to collect data; possible sources: amazon, google, idealo etc.)
  • country - alpha-2 country code of the source to request from (de, at,us, etc.)
  • values – a value for which to search

Available sources and countries:

  • amazon: us, ca, mx, br, uk, de, es, fr, it, jp, cn, in, ae, au
  • google: us, de, uk, au, at, br, ca, cz, dk, fr, in, ie, it, jp, mx, no, pl, nz, nl, ru, sg, za, es, se, fi, ch, tr
  • idealo: de, uk, at, it, fr, es
  • billiger: de
  • ebay: us, uk, de, au, at, be, ca, fr, de, ie, it, hk, my, nl, ph, pl, sg, es, ch, au
2.1.3 Response

All start search endpoints returns the job structure including the job_id. This is used in the polling step.
If there is an error in the input parameters e.g. incorrect source, or country an error message is returned.

  • Success Response:
    Code: 200
    Content:
{
  "error": false,
  "job_id": "5fa2660127a87648da89d17f"
}
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "missing parameter"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR

List of possible errors:

  • missing parameter - not all required parameters are present
  • unknown source - source not supported
  • unknown country - country not supported for given source
  • not subscribed to source - client not subscribed to source / country
  • too many values - more than 1 values submitted

2.2 Poll job results

2.2.1 Endpoints

No matter what start search endpoint was used there is only one endpoint “Poll results”.

2.2.2 Input parameters

A job_id received from start search is used as an input to this endpoint.

2.2.3 Response

Response is a JSON object.
If the job is not finished yet, the “status” field of response is “working”. So poll the endpoint again after a few minutes.
If the job is finished, “status” field is “finished” and “results” field is an arrays of results for each value submitted. The “content” of each results includes the data about the product (title, description, rating, price summary, etc.) and offers of various sellers if available. The content varies somewhat based on the input source.

  • Success Response: (job not finished yet)
    Code: 200
    Content:
{
  "error": false,
  "job"_id": "620e4e2974a29136b08a2c0a",
  "status": "working",
  "done": 0,
  "all": 1
}
  • Success Response: (job finished)
    Code: 200
    Content:
{
"job_id": "620e4e2974a29136b08a2c0a",
"status": "finished",
"results": [
  {
    "updated_at": "2022-02-17T13:32:22.985Z",
    "query": {
      "max_age": 1200,
      "max_pages": 1,
      "value": "0194252099537",
      "key": "gtin",
      "country": "de",
      "topic": "search_and_offers",
      "source": "amazon"
    },
    "content": {
      "availability": true,
      "description_text": "",
      "bullet_text": "Als Teil der Bemühungen von Apple, seine Umweltziele zu erreichen, kommt das iPhone 11 ohne Netzteil und EarPods. Verwende bitte ein vorhandenes Apple Netzteil und vorhandene Kopfhörer oder kaufe dieses Zubehör separat.\n6,1\" Liquid Retina HD LCD Display (15,5cm Diagonale)\nWasser und Staubschutz (2 Meter für bis zu 30 Minuten, IP68)\n12MP Zwei-Kamera-System mit Ultraweitwinkel und Weitwinkelobjektiv, Nachtmodus, Porträtmodus und 4K Video bis zu 60 fps\n12MP True Depth Frontkamera mit Porträtmodus, 4K Video und Zeitlupe\nFace ID für sicheres Authentifizieren und Apple Pay\nA13 Bionic Chip mit Neural Engine der 3.Generation\nSchnelles Aufladen\nKabelloses Laden\n",
      "on_amazon_since": null,
      "is_available": true,
      "no_shops": 1,
      "buybox_owner_id": "A3JWKAKR8XB7XF",
      "buybox_owner": "Amazon",
      "buybox_price": 619.99,
      "shipping": 0,
      "currency": "EUR",
      "parent_asin": "B08L6ZD883",
      "name": "Apple iPhone 11 (128 GB) - Weiß",
      "bsr": [],
      "seller_type": "amazon",
      "review_count": 514,
      "review_rating": 96,
      "brand": {
        "brand_id": null,
        "name": "Besuchen Sie den Apple-Store"
      },
      "category": {
        "rank": null,
        "node_id": null,
        "name": "Apple"
      },
      "url": "https://www.amazon.de/dp/B08L6ZD883",
      "asin": "B08L6ZD883",
      "offers": [
        {
          "shop_review_count": 0,
          "shop_review_rating": 0,
          "marketplace_name": "amazon",
          "shop_type": "standalone-shop",
          "shop_url": "https://www.amazon.de",
          "shop_name": "Amazon",
          "shop_id": "",
          "condition": "Neu",
          "position": 1,
          "currency": "EUR",
          "shipping": 0,
          "price": 619.99
        },
        {
          "shop_review_count": 0,
          "shop_review_rating": 0,
          "marketplace_name": "amazon",
          "shop_type": "standalone-shop",
          "shop_url": "https://www.amazon.de",
          "shop_name": "Amazon Warehouse",
          "shop_id": "",
          "condition": "Gebraucht - Wie neu",
          "position": 2,
          "currency": "EUR",
          "shipping": 0,
          "price": 603.67
        }
      ],
      "offers_count": 2,
      "price_min": 603.67,
      "price_max": 619.99,
      "price_avg": 611.83
    },
    "success": true
  }
]
}
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "job id incorrect or missing"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR

List of possible errors:

  • job not found - no job for given id
  • job forbidden - not the job owner

List of possible product level errors:

  • timeout - timeout expired before result was fetched
  • not found - product was not found on the source
  • parameter value invalid - invalid value (e.g. GTIN) supplied
  • validation error - necessary value missing in data
  • source currently unavailable - couldn’t collect data from source at the moment
रेटिंग: 5 - वोट: 1