Skip to content

Product API

GEThttps://api.diffbot.com/v3/product

Automatically extract pricing, product specs, images, and more from an e-commerce product page.

The Product API automatically extracts complete data from any shopping or e-commerce product page. Retrieve full pricing information, product IDs (SKU, UPC, MPN), images, product specifications, brand and more.

Test drive Product API without a token at diffbot.com/testdrive.

Run In Postman

Example

bash
curl --request GET \
  --url 'https://api.diffbot.com/v3/product?url=https%3A%2F%2Fwww.microcenter.com%2Fproduct%2F628738%2Fevga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card&token=<DIFFBOT_TOKEN>' \
  --header 'Accept: application/json'
json
{
  "request": {
    "pageUrl": "https://www.microcenter.com/product/628738/evga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card",
    "api": "product",
    "version": 3
  },
  "humanLanguage": "en",
  "objects": [
    {
      "images": [
        {
          "xpath": "/html[1]/body[1]/main[1]/article[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]/img[1]",
          "naturalHeight": 200,
          "width": 260,
          "diffbotUri": "image|3|735477840",
          "title": "Product Image View 2",
          "url": "https://90a1c75758623581b3f8-5c119c3de181c9857fcb2784776b17ef.ssl.cf2.rackcdn.com/628738_177923_01_front_thumbnail.jpg",
          "naturalWidth": 200,
          "primary": true,
          "height": 260
        }
      ],
      "offerPrice": "$1,919.99",
      "productId": "843368067137",
      "diffbotUri": "product|3|-1003574237",
      "upc": "843368067137",
      "productOrigin": "us",
      "mpn": "24G-P5-3987-KR",
      "prefixCode": "U.S. and Canada",
      "multipleProducts": true,
      "availability": true,
      "type": "product",
      "title": "EVGA NVIDIA GeForce RTX 3090 FTW3 Ultra Triple-Fan 24GB GDDR6X PCIe 4.0 Graphics Card",
      "offerPriceDetails": {
        "symbol": "$",
        "amount": 1919.99,
        "text": "$1,919.99"
      },
      "specs": {
        "mfr_part_": "24G-P5-3987-KR",
        "upc": "843368067137",
        "sku": "177923"
      },
      "normalizedSpecs": {
        "sku": [
          {
            "cleanLiteral": "843368067137"
          }
        ]
      },
      "humanLanguage": "en",
      "pageUrl": "https://www.microcenter.com/product/628738/evga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card",
      "text": "The EVGA GeForce RTX 3090 is colossally powerful in every way imaginable, giving you a whole new tier of performance at 8K resolution. It's powered by the NVIDIA Ampere architecture, which doubles down on ray tracing and AI performance with enhanced RT Cores, Tensor Cores, and new streaming multiprocessors. Combined with the next generation of design, cooling, and overclocking with EVGA Precision X1, the EVGA GeForce RTX 3090 Series redefines the definition of ultimate performance.",
      "category": "Computers",
      "sku": "177923",
      "brand": "EVGA"
    }
  ],
  "type": "product",
  "title": "EVGA NVIDIA GeForce RTX 3090 FTW3 Ultra Triple-Fan 24GB GDDR6X PCIe 4.0 Graphics Card - Micro Center"
}

The Product API returns data in JSON format.

Each response includes a request object (which returns request-specific metadata), and an objects array, which will include the extracted information for all objects on a submitted page.

Objects in the Product API's objects array will include the following fields:

FieldDescription
typeType of object (always product).
pageUrlURL of submitted page / page from which the product is extracted.
resolvedPageUrlReturned if the pageUrl redirects to another URL.
titleTitle of the product.
textText description, if available, of the product.
brandItem's brand name.
offerPriceOffer or actual/final price of the product.
regularPriceRegular or original price of the product, if available.
shippingAmountShipping price.
saveAmountDiscount or amount saved off the regular price.
offerPriceDetailsofferPrice separated into its constituent parts: amount, symbol, and full text.
regularPriceDetailsregularPrice separated into its constituent parts: amount, symbol, and full text.
saveAmountDetailssaveAmount separated into its constituent parts: amount, symbol, full text, and whether or not it is a percentage value.
gtinGlobal Trade Item Number. Supports all EAN formats including GTIN-8, GTIN-12, GTIN-13 and GTIN-14.
upcUniversal Product Code (UPC/EAN), if available.
skuStock Keeping Unit -- store/vendor inventory number or identifier.
mpnManufacturer's Product Number.
isbnInternational Standard Book Number (ISBN), if available.
specsIf a specifications table or similar data is available on the product page, individual specifications will be returned in the specs object as name/value pairs. Names will be normalized to lowercase with spaces replaced by underscores, e.g. display_resolution.
imagesArray of images, if present within the product.
urlFully resolved link to image. If the image SRC is encoded as base64 data, the complete data URI will be returned.
titleDescription or caption of the image.
heightHeight of image as (re-)sized via browser/CSS.
widthWidth of image as (re-)sized via browser/CSS.
naturalHeightRaw image height, in pixels.
naturalWidthRaw image width, in pixels.
primaryReturns true if image is identified as primary based on visual analysis.
xpathXPath expression identifying the image node.
diffbotUriInternal ID used for indexing.
discussionProduct reviews, as extracted by the Diffbot Discussion API.
gs1CodeCountry of origin as identified by GS1.
productOriginTwo-character ISO country code where the product was produced.
humanLanguageReturns the (spoken/human) language of the submitted page, using two-letter ISO 639-1 nomenclature.
availability (beta)Item's availability, either true or false.
category (beta)Returns an inferred category from Diffbot's product categorization taxonomy.
colors (beta)Returns array of product color options.
normalizedSpecs (beta)Returns normalized specifications if a specifications table (or similar element) is found on the product page. More on normalization.
multipleProducts (beta)Returns true if multiple products are distinctly available on the page.
priceRange (beta)If the product is available in a range of prices, the minimum and maximum values will be returned. The lowest price will also be returned as the offerPrice.
minPrice (beta)The minimum price for the offered item.
maxPrice (beta)The maximum price for the offered item.
quantityPrices (beta)If the product is available with quantity-based discounts, all identifiable price points will be returned. The lowest price will also be returned as the offerPrice.
minQuantity (beta)The minimum quantity required to purchase for the associated price.
price (beta)Price of the specific quantity level.
size (beta)Size(s) available, if identified on the page.

Optional Fields

Product API may also return some optional fields if specified. (comma delimited) in the &fields= argument.

Already have the source HTML? POST it to Product API.

Product API supports a POST option that allows you to upload HTML or plain text for extraction. See Extract Raw HTML.

Extracting Product Reviews

Product API will attempt to extract reviews from product pages by default. Using integrated functionality from the Discussion API, product review data will be returned in the discussion object (nested within the primary product object). The full syntax for discussion data is available in the Discussion API documentation.

Product review extraction can be disabled using the argument discussion=false. Note that if a page has recently been processed by Diffbot, cached reviews may be returned even if discussion=false is passed.

API Definition

Generated from v1.1.0 of the Extract APIs OpenAPI specification.

Automatically extract pricing, product specs, images, and more from an e-commerce product page.

Request

Authentication
tokenquery
Cache and insert token into example requests (15d expiry)
Query parameters
urlstring required

Target URL to extract

fieldsstring

Specify optional fields to be returned from any fully-extracted pages (e.g. fields=querystring,links)

One of: linksextlinksmetaquerystringbreadcrumb

timeoutinteger (int32)

Sets a value in milliseconds to wait for the retrieval/fetch of content from the requested URL. The default timeout for the third-party response is 30 seconds (30000).

callbackstring

Use for jsonp requests. Needed for cross-domain ajax.

proxystring

Specify an IP address of a custom proxy that will be used to fetch the target page. (Ex: &proxy or &proxy=0.0.0.0)

proxyAuthstring

Used to specify the authentication parameters that will be used with a custom proxy specified in the &proxy parameter. (Ex: proxyAuth=username:password)

useProxystring

Set to default to use Diffbot’s datacenter proxy for this request. none will instruct Extract to not use proxies, even if proxies have been enabled for this particular URL globally.

discussionboolean

Pass discussion=false to disable automatic extraction of product reviews.

Example request

bash
curl --request GET \
  --url 'https://api.diffbot.com/v3/product?url=https%3A%2F%2Fwww.microcenter.com%2Fproduct%2F628738%2Fevga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card&token=<DIFFBOT_TOKEN>' \
  --header 'Accept: application/json'

Response

200Successful API Response
requestobject
pageUrlstring
apistring
versioninteger
humanLanguagestring
objectsobject[]
imagesobject[]
xpathstring
naturalHeightinteger
widthinteger
diffbotUristring
titlestring
urlstring
naturalWidthinteger
primaryboolean
heightinteger
offerPricestring
productIdstring
diffbotUristring
upcstring
productOriginstring
mpnstring
gs1Codestring
multipleProductsboolean
availabilityboolean
typestring
titlestring
offerPriceDetailsobject
symbolstring
amountnumber
textstring
specsobject
mfr_part_string
upcstring
skustring
normalizedSpecsobject
skuobject[]
cleanLiteralstring
humanLanguagestring
pageUrlstring
textstring
categorystring
skustring
brandstring
typestring
titlestring
json
{
  "request": {
    "pageUrl": "https://www.microcenter.com/product/628738/evga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card",
    "api": "product",
    "version": 3
  },
  "humanLanguage": "en",
  "objects": [
    {
      "images": [
        {
          "xpath": "/html[1]/body[1]/main[1]/article[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]/img[1]",
          "naturalHeight": 200,
          "width": 260,
          "diffbotUri": "image|3|735477840",
          "title": "Product Image View 2",
          "url": "https://90a1c75758623581b3f8-5c119c3de181c9857fcb2784776b17ef.ssl.cf2.rackcdn.com/628738_177923_01_front_thumbnail.jpg",
          "naturalWidth": 200,
          "primary": true,
          "height": 260
        }
      ],
      "offerPrice": "$1,919.99",
      "productId": "843368067137",
      "diffbotUri": "product|3|-1003574237",
      "upc": "843368067137",
      "productOrigin": "us",
      "mpn": "24G-P5-3987-KR",
      "gs1Code": "U.S. and Canada",
      "multipleProducts": true,
      "availability": true,
      "type": "product",
      "title": "EVGA NVIDIA GeForce RTX 3090 FTW3 Ultra Triple-Fan 24GB GDDR6X PCIe 4.0 Graphics Card",
      "offerPriceDetails": {
        "symbol": "$",
        "amount": 1919.99,
        "text": "$1,919.99"
      },
      "specs": {
        "mfr_part_": "24G-P5-3987-KR",
        "upc": "843368067137",
        "sku": "177923"
      },
      "normalizedSpecs": {
        "sku": [
          {
            "cleanLiteral": "843368067137"
          }
        ]
      },
      "humanLanguage": "en",
      "pageUrl": "https://www.microcenter.com/product/628738/evga-nvidia-geforce-rtx-3090-ftw3-ultra-triple-fan-24gb-gddr6x-pcie-40-graphics-card",
      "text": "The EVGA GeForce RTX 3090 is colossally powerful in every way imaginable, giving you a whole new tier of performance at 8K resolution. It's powered by the NVIDIA Ampere architecture, which doubles down on ray tracing and AI performance with enhanced RT Cores, Tensor Cores, and new streaming multiprocessors. Combined with the next generation of design, cooling, and overclocking with EVGA Precision X1, the EVGA GeForce RTX 3090 Series redefines the definition of ultimate performance.",
      "category": "Computers",
      "sku": "177923",
      "brand": "EVGA"
    }
  ],
  "type": "product",
  "title": "EVGA NVIDIA GeForce RTX 3090 FTW3 Ultra Triple-Fan 24GB GDDR6X PCIe 4.0 Graphics Card - Micro Center"
}
500Internal Server Error
errorCodeinteger
errorstring
json
{
  "errorCode": 500,
  "error": "Internal Server Error"
}