|
1 | 1 | # amazon_product Documentation
|
2 | 2 |
|
3 | 3 | ## Brief Description
|
4 |
| -`amazon_product` is an object that facilitates data extraction from Amazon product pages using a given ASIN (Amazon's Product ID). |
| 4 | +The `amazon_product` object is a JSON configuration for extracting data from an Amazon product page given an ASIN (Amazon Standard Identification Number). |
5 | 5 |
|
6 | 6 | ## Usage
|
7 |
| -To use `amazon_product`, you need to make a POST request to the specified endpoint with the required parameters. This object is designed to be used within an API environment. |
| 7 | +This object is typically used as part of a larger API or system for scraping Amazon product data. It defines the structure and parameters needed to make a request to retrieve product information. |
8 | 8 |
|
9 | 9 | ## Parameters
|
10 |
| -- `asin` (string, required): The Amazon Standard Identification Number (ASIN) of the product. Must be a 10-character alphanumeric string. |
| 10 | +- `asin` (string, required): The Amazon Standard Identification Number of the product. Must be a 10-character alphanumeric string. |
11 | 11 |
|
12 | 12 | ## Return Value
|
13 |
| -The `amazon_product` object returns a JSON response containing detailed information about the specified Amazon product, including: |
14 |
| -- Product details (name, ASIN, parent ASIN, availability) |
15 |
| -- Pricing information |
16 |
| -- Ratings and reviews |
17 |
| -- Product features and specifications |
18 |
| -- Image URLs |
19 |
| -- Available variations (size, color, etc.) |
| 13 | +When used in an API request, this configuration returns a JSON object containing detailed product information from the Amazon page. |
20 | 14 |
|
21 | 15 | ## Examples
|
22 | 16 |
|
23 |
| -```javascript |
24 |
| -// Example POST request |
25 |
| -fetch('https://api.webit.live/api/v1/realtime/ecommerce/amazon/product', { |
26 |
| - method: 'POST', |
27 |
| - headers: { |
28 |
| - 'Authorization': 'Basic <TOKEN>', |
29 |
| - 'Content-Type': 'application/json' |
| 17 | +```json |
| 18 | +{ |
| 19 | + "endpoint": "https://api.webit.live/api/v1/realtime/ecommerce/amazon/product", |
| 20 | + "method": "POST", |
| 21 | + "headers": { |
| 22 | + "Authorization": "Basic <TOKEN>", |
| 23 | + "Content-Type": "application/json" |
30 | 24 | },
|
31 |
| - body: JSON.stringify({ |
32 |
| - asin: 'B0C4ZZBD71' |
33 |
| - }) |
34 |
| -}) |
35 |
| -.then(response => response.json()) |
36 |
| -.then(data => console.log(data)) |
37 |
| -.catch(error => console.error('Error:', error)); |
| 25 | + "body": { |
| 26 | + "asin": "B0C4ZZBD71" |
| 27 | + } |
| 28 | +} |
38 | 29 | ```
|
39 | 30 |
|
40 | 31 | ## Notes or Considerations
|
41 |
| -- Ensure you have the necessary API access and authentication token before making requests. |
42 |
| -- The ASIN must be valid and correspond to an existing Amazon product. |
43 |
| -- The data returned may vary depending on the product and its availability. |
44 |
| -- Respect Amazon's terms of service and rate limits when using this API. |
45 |
| -- The response includes detailed product information, which may be useful for various e-commerce applications, price tracking, or product analysis. |
| 32 | +- This object is designed to work with a specific API endpoint (https://api.webit.live/api/v1/realtime/ecommerce/amazon/product). |
| 33 | +- The API requires authentication via a token in the Authorization header. |
| 34 | +- The object includes configurations for different Amazon domains (.com, .co.uk), defaulting to the US store. |
| 35 | +- The returned data includes comprehensive product details such as price, rating, reviews, features, and variations. |
| 36 | +- Ensure you comply with Amazon's terms of service and robots.txt when using this for web scraping. |
0 commit comments