{"_id":"57963a13cf84ae1700244f68","__v":2,"parentDoc":null,"project":"568af724176a6c0d00a29ec4","category":{"_id":"579639964913990e001a5911","version":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-25T16:08:54.650Z","from_sync":false,"order":3,"slug":"offers","title":"Products"},"user":"568af6d197d8960d0012ab7d","version":{"_id":"568af725176a6c0d00a29ec7","project":"568af724176a6c0d00a29ec4","__v":11,"createdAt":"2016-01-04T22:50:13.289Z","releaseDate":"2016-01-04T22:50:13.289Z","categories":["568af725176a6c0d00a29ec8","56d9d397337fd11300d6a3e3","56d9d4287222d50b0070160b","56f424307ea0091700f63ac5","56f45babcb0dce29005a8e85","5739e5836c5ba134007a197d","57717aee3dd24019004c9122","5771b5d8c755ca0e00617d7d","579639964913990e001a5911","57e57e7df3d7fc0e009c5119","587569b6f4483a0f00d2e6b8"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-25T16:10:59.086Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"name":"","code":"{\n    merchantName: \"eBay\",\n    canonicalUrl: \"http://www.ebay.com/itm/BMW-Hood-Emblem-Logo-Badge-Roundel-82mm-Genuine-OE-32375-Grommets-/251404087490\",\n    title: \"BMW Hood Emblem Logo Badge Roundel 82mm Genuine OE 32375 + Grommets\",\n    upc: null,\n    sku: \"251404087490\",\n    url: \"http://www.ebay.com/itm/BMW-Hood-Emblem-Logo-Badge-Roundel-82mm-Genuine-OE-32375-Grommets-/251404087490?fits=Make%3ABMW%7CModel%3A335xi&hash=item3a88d9f0c2:g:wtkAAMXQeW5TYt6P&vxp=mtr\",\n    price: \"$36.38\",\n    brandName: \"BMW\",\n    description: \"We offer 30 days return policy starting the day the buyer receives the item. Item(s) being returned must be in brand new condition, unopened with the original seal and label included. All shipping expenses including duties and/or customs fees will be paid by the buyer. There will be a 10% restocking charge on all returns (On case by case basis). We will not charge any restocking fees if the return item(s) is due to our error, such as shipping the wrong item(s). We do not accept returns if the item(s) has been installed and decided to return it, or has been damaged for some reason after you have received the item(s). We do not compensate your labor, towing, repair, rental expenses or any other related expenses. All item(s) shipped have been inspected in detailed, and we guarantee that you’ll be satisfied with your purchase.\",\n    canonicalDomain: \"ebay.com\",\n    imageUrl: \"http://i.ebayimg.com/images/i/251404087490-0-1/s-l1000.jpg\"\n}","language":"json","status":200},{"name":"","code":"{\n    \"error\": {\n        \"errors\": [\n            {\n                \"reason\": \"invalidCredentials\",\n                \"message\": \"Authorization secret is missing or invalid. This can be found at https://publishers.viglink.com/account and can be sent as a parameter or Authorization header\",\n                \"locationType\": \"parameter\",\n                \"location\": \"secret\"\n            }\n        ]\n    },\n    \"code\": 401,\n    \"message\": \"Authorization secret is missing or invalid. This can be found at https://publishers.viglink.com/account and can be sent as a parameter or Authorization header\"\n}","language":"json","status":401},{"status":403,"language":"json","code":"{\n    error: {\n        errors: {\n            reason: \"rateLimitExceeded\",\n            message: \"You need to slow down the rate at which you are sending the requests. You are only allowed 1 query per second for this endpoint\"\n        }\n    },\n    code: 403,\n    message: \"You need to slow down the rate at which you are sending the requests. You are only allowed 1 query per second for this endpoint\"\n}"},{"status":500,"code":"{\n    \"error\": {\n        \"errors\": [\n            {\n                \"reason\": \"internalServerError\",\n                \"message\": \"An unexpected error occurred, but we are looking into it\"\n            }\n        ]\n    },\n    \"code\": 500,\n    \"message\": \"An unexpected error occurred, but we are looking into it\"\n}","language":"json"}]},"settings":"57717d5327a5c20e00030dbd","examples":{"codes":[{"language":"php","code":"<?php\n$ch = curl_init(\"http://rest.viglink.com/api/product/metadata?url=http%3A%2F%2Fwww.ebay.com%2Fitm%2FBMW-Hood-Emblem-Logo-Badge-Roundel-82mm-Genuine-OE-32375-Grommets-%2F251404087490%3Ffits%3DMake%253ABMW%257CModel%253A335xi%26hash%3Ditem3a88d9f0c2%3Ag%3AwtkAAMXQeW5TYt6P%26vxp%3Dmtr\");\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: secret YOUR SECRET KEY'));\n\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($ch);\n\ncurl_close($ch);"},{"code":"require 'httparty'\n\nurl = \"http://rest.viglink.com/api/offer/metadata?url=http%3A%2F%2Fwww.ebay.com%2Fitm%2FBMW-Hood-Emblem-Logo-Badge-Roundel-82mm-Genuine-OE-32375-Grommets-%2F251404087490%3Ffits%3DMake%253ABMW%257CModel%253A335xi%26hash%3Ditem3a88d9f0c2%3Ag%3AwtkAAMXQeW5TYt6P%26vxp%3Dmtr\"\n\nheaders = {Authorization: \"secret {SECRET KEY}\"}\n\nresponse = HTTParty.get(url, headers: headers)","language":"ruby"},{"code":"curl -i -X GET -H \"Authorization: secret {SECRET KEY}\" 'http://rest.viglink.com/api/offer/metadata?url=http%3A%2F%2Fwww.ebay.com%2Fitm%2FBMW-Hood-Emblem-Logo-Badge-Roundel-82mm-Genuine-OE-32375-Grommets-%2F251404087490%3Ffits%3DMake%253ABMW%257CModel%253A335xi%26hash%3Ditem3a88d9f0c2%3Ag%3AwtkAAMXQeW5TYt6P%26vxp%3Dmtr'","language":"curl"}]},"auth":"required","params":[{"_id":"57963a6c3fedf00e0067acdf","ref":"","in":"query","required":true,"desc":"Product URL to gather metadata for. This must be URL encoded","default":"","type":"string","name":"url"},{"_id":"579640fdf64c9f0e007cd718","ref":"","in":"query","required":false,"desc":"Lowercase format of response: json or xml","default":"json","type":"string","name":"format"},{"_id":"579640fdf64c9f0e007cd717","ref":"","in":"query","required":false,"desc":"JSON-P callback method name","default":"NULL","type":"string","name":"callback"}],"url":"/product/metadata"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Authorization Header\",\n  \"body\": \"You must add authorization headers to this request.\\n```Authorization: secret {SECRET KEY}```\\n\\n<b>Replace {SECRET KEY} above with any secret key from any campaign in your account.</b> You can find a secret key in your [VigLink account](https://publishers.viglink.com/account). When logged into your dashboard, go to Manage > Account. Under the My Campaign sub-heading, copy a Secret Key. If you don’t have one, click “Get a Secret Key\\\" on any of your campaigns.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Rate Limit\",\n  \"body\": \"This endpoint has a rate limit of 1 query per second. If you exceed the limit, a 403 response will be returned indicating the limit has been exceeded.\"\n}\n[/block]\nSimply provide the URL to the product page of a retailer, and we'll return all discovered metadata from the page including price, keyword and image URL.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"merchantName\",\n    \"0-1\": \"Name of the merchant associated with the URL. This isn't always the merchant selling the product on page. For example, Levi's jeans sold at Nordstrom would return a `merchantName` of Nordstrom, not Levi's.\",\n    \"1-0\": \"canonicalUrl\",\n    \"1-1\": \"The search engine friendly URL that search engines treat as authoritative. It excludes any additional parameters, such as marketing parameters that are not required to return the page requested.\",\n    \"3-0\": \"title\",\n    \"3-1\": \"Product title\",\n    \"4-0\": \"upc\",\n    \"4-1\": \"UPC code, if available on page\",\n    \"5-0\": \"sku\",\n    \"5-1\": \"Merchant-specific SKU\",\n    \"6-0\": \"url\",\n    \"6-1\": \"Product URL requested\",\n    \"7-0\": \"price\",\n    \"7-1\": \"Lowest price advertised for the product on page\",\n    \"8-0\": \"brandName\",\n    \"8-1\": \"Product brand\",\n    \"9-0\": \"description\",\n    \"9-1\": \"Product description\",\n    \"2-0\": \"canonicalDomain\",\n    \"2-1\": \"The TLD domain returned from the `canonicalUrl`\",\n    \"10-0\": \"imageUrl\",\n    \"10-1\": \"Product image\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]","excerpt":"Get back the metadata about an product (Product URL) with this endpoint.","slug":"metadata","type":"endpoint","title":"Product Metadata"}

getProduct Metadata

Get back the metadata about an product (Product URL) with this endpoint.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

url:
required
string
Product URL to gather metadata for. This must be URL encoded
format:
stringjson
Lowercase format of response: json or xml
callback:
stringNULL
JSON-P callback method name

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "title": "Authorization Header", "body": "You must add authorization headers to this request.\n```Authorization: secret {SECRET KEY}```\n\n<b>Replace {SECRET KEY} above with any secret key from any campaign in your account.</b> You can find a secret key in your [VigLink account](https://publishers.viglink.com/account). When logged into your dashboard, go to Manage > Account. Under the My Campaign sub-heading, copy a Secret Key. If you don’t have one, click “Get a Secret Key\" on any of your campaigns." } [/block] [block:callout] { "type": "info", "title": "Rate Limit", "body": "This endpoint has a rate limit of 1 query per second. If you exceed the limit, a 403 response will be returned indicating the limit has been exceeded." } [/block] Simply provide the URL to the product page of a retailer, and we'll return all discovered metadata from the page including price, keyword and image URL. [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "merchantName", "0-1": "Name of the merchant associated with the URL. This isn't always the merchant selling the product on page. For example, Levi's jeans sold at Nordstrom would return a `merchantName` of Nordstrom, not Levi's.", "1-0": "canonicalUrl", "1-1": "The search engine friendly URL that search engines treat as authoritative. It excludes any additional parameters, such as marketing parameters that are not required to return the page requested.", "3-0": "title", "3-1": "Product title", "4-0": "upc", "4-1": "UPC code, if available on page", "5-0": "sku", "5-1": "Merchant-specific SKU", "6-0": "url", "6-1": "Product URL requested", "7-0": "price", "7-1": "Lowest price advertised for the product on page", "8-0": "brandName", "8-1": "Product brand", "9-0": "description", "9-1": "Product description", "2-0": "canonicalDomain", "2-1": "The TLD domain returned from the `canonicalUrl`", "10-0": "imageUrl", "10-1": "Product image" }, "cols": 2, "rows": 11 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}