URL
使用 Web Scraper API 按 URL 抓取 Amazon 页面。文档包含示例请求、解析输出、JS 渲染、地理定位和 User-Agent 选项。
该 amazon source 旨在从各种 Amazon URL 检索内容。这意味着您可以直接提供所需 Amazon 页面的 URL,而无需发送多个参数。我们不会删除任何参数或以其他方式更改您的 URL。
请求示例
在下面的代码示例中,我们发出请求以检索 ASIN 的 Amazon 产品页面 B08Y6Z944Q.
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "amazon",
"url": "https://www.amazon.co.uk/dp/B08Y6Z944Q/",
"parse": true
}'import requests
from pprint import pprint
# 构建负载。
payload = {
'source': 'amazon',
'url': 'https://www.amazon.co.uk/dp/B08Y6Z944Q/',
'parse': True
}
# 获取响应。
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'), #Your credentials go here
json=payload,
)
# 该请求不会返回带有作业状态和结果 URL 的响应,而是返回
# JSON response with results.
pprint(response.json())输出示例
{
"results": [
{
"content": {
"ads": [
{
"pos": 1,
"asin": "B0CH3JJN66",
"type": "organic_also_viewed",
"price": 375,
"title": "Samsung 55 Inch AU7020 UHD HDR 4K Smart TV (2023) - Crystal UHD 4K Smart TV With HDR Picture, Adaptive Sound Lite, PurColour ",
"images": [
"https://m.media-amazon.com/images/I/71Dxs5msCcL._AC_SS57_.jpg",
"https://m.media-amazon.com/images/I/61rH38KyMnL.jpg",
"https://m.media-amazon.com/images/I/71xvR9thu1L.jpg"
],
"rating": 4.5,
"location": "carousel",
"price_upper": 375,
"reviews_count": 45,
"is_prime_eligible": true
},
{
"pos": 2,
"asin": "B0BW9RPQPW",
"type": "organic_also_viewed",
"price": 362,
"title": "50 Inch CU7110 UHD HDR Smart TV (2023) - 4K Crystal Processor, Adaptive Sound Audio, PurColour, Built In Gaming TV Hub, Strea",
"images": [
"https://m.media-amazon.com/images/I/81eKwOlfhTL._AC_SS57_.jpg",
"https://m.media-amazon.com/images/I/619tbh+PSSL.jpg",
"https://m.media-amazon.com/images/I/81iuMoHZWhL.jpg"
],
"rating": 4.5,
"location": "carousel",
"price_upper": 362,
"reviews_count": 45,
"is_prime_eligible": true
},
{...}
],
"url": "https://www.amazon.co.uk/dp/B08Y6Z944Q/",
"asin": "B08Y6Z944Q",
"page": 1,
"brand": "Samsung",
"price": 0,
"stock": "",
"title": "Samsung AU7100 50 Inch (2021) \u00e2\u20ac\u201c Crystal 4K Smart TV With HDR10+ Image Quality, Adaptive Sound, Motion Xcelerator Picture, Samsung Q-Symphony Audio And Gaming Mode - UE50AU7100KXXU",
"coupon": "",
"images": [
"https://m.media-amazon.com/images/I/71Urp17dnYL._AC_SL1500_.jpg",
...
"https://m.media-amazon.com/images/I/51yb9wscZTL._AC_SL1500_.jpg"
],
"rating": 4.5,
"category": [
{
"ladder": [
{
"url": "/tv-bluray-dvd-home-cinema/b/ref=dp_bc_aui_C_1?ie=UTF8&node=560858",
"name": "Home Cinema, TV & Video"
},
{
"url": "/LED-Smart-4K-TVs/b/ref=dp_bc_aui_C_2?ie=UTF8&node=560864",
"name": "TVs"
}
]
}
],
"currency": "GBP",
"delivery": [],
"_warnings": [
"Could not parse pricing count.",
"Could not parse price.",
"Could not parse description."
],
"page_type": "Product",
"price_sns": 0,
"variation": [
{
"asin": "B08Y7182XL",
"selected": false,
"dimensions": {
"Size Name": "85\""
}
},
{
"asin": "B08Y733RV1",
"selected": false,
"dimensions": {
"Size Name": "43\""
}
},
{...}
],
"has_videos": true,
"sales_rank": [
{
"rank": 28405,
"ladder": [
{
"url": "/gp/bestsellers/electronics/ref=pd_zg_ts_electronics",
"name": "Electronics & Photo"
}
]
},
{
"rank": 479,
"ladder": [
{
"url": "/gp/bestsellers/electronics/560864/ref=pd_zg_hrsr_electronics",
"name": "TVs"
}
]
}
],
"top_review": "This is an excellent TV for the price, with an awesome picture, especially on streaming services, which is what we watch most of the time. I read lots of professional reviews online first, all of which rated it very highly, and I wasn't disappointed. There is quite a bit of setting up to do and I did have to tweak some of the settings to get the best picture. At first the picture was too dark, especially on Amazon Prime. It seems this is a particular problem on Prime. I got a much better picture by switching off the \"Brightness Optimisation\". We also didn't like the \"ultra real\" effect you get with 4K LED TVs. Switching to \"Filmmaker Mode\" solved this. Sound quality is OK, but we use a soundbar anyway. I particularly like the two remote controls which come with the TV. There's a traditional remote with lots of buttons: I used this at first to set everything up, including controlling the BluRay player and the soundbar. Once everything was working I switched to the smaller remote which has only the most essential buttons but looks and feels more refined and has a better \"click\" to the buttons than its big brother. Watching terrestrial TV is fine as well, though not as good as streaming services. We're not gamers so I can't comment on its quality there.All in all, a great TV and a bargain.\n \nRead more",
"asin_in_url": "B08Y6Z944Q",
"description": "",
"parent_asin": "B09DLFS6JN",
"price_upper": 0,
"pricing_str": "",
"pricing_url": "https://www.amazon.co.uk/gp/offer-listing/B08Y6Z944Q?startIndex=0",
"manufacturer": "Samsung",
"price_buybox": -1,
"product_name": "Samsung AU7100 50 Inch (2021) \u00e2\u20ac\u201c Crystal 4K Smart TV With HDR10+ Image Quality, Adaptive Sound, Motion Xcelerator Picture, Samsung Q-Symphony Audio And Gaming Mode - UE50AU7100KXXU",
"bullet_points": "Home Entertainment Excellence With The AU7100 \u2013 A Smart, Ultra HD TV that delivers it all, the Samsung 50 Inch AU7100 smart tv blends stunning visuals, vibrant colour, crisp audio and striking slim fit design to enhance your living space.\nGet A Powerful Picture With Stunning 4K\u2013 Your 50 Inch Smart TV includes Dynamic Crystal Colour and a Contrast Enhancer, so you can watch all your favourite shows in stunning 4K detail, with colours that pop and contrast that gives a clearer image.\nExperience Audio Perfection with Adaptive Sound on your TV- your Samsung TV adjusts sound in every scene to what\u2019s on screen, so you\u2019ll feel as if you\u2019re part of the action. Q-Symphony allows for a cinema experience when you add a Samsung soundbar.\nUpgrade Your Office Set-up Or Dive Into Gaming With Your Samsung TV \u2013 PC on TV allows you to access your office PC remotely from your Smart TV, so you can do it all, straight from your living room. Our Smart TV also offers an immersive game mode.\nStart Experiencing Samsung TVs - We believe a TV is more than something you watch. It should inspire, amaze, envelop and immerse you. From quality picture, to elegant design, our TVs push the boundaries of what is possible and what a TV can be.",
"price_initial": 0,
"pricing_count": 1,
"reviews_count": 2067,
"sns_discounts": [],
"developer_info": [],
"price_shipping": 0,
"product_details": {
"asin": "B08Y6Z944Q",
"batteries": "2 AAA batteries required. (included)",
"manufacturer": "Samsung",
"item_model_number": "UE50AU7100KXXU",
"product_dimensions": "5.99 x 111.68 x 64.42 cm; 11.4 kg",
"date_first_available": "2 Mar. 2021"
},
"featured_merchant": [],
"is_prime_eligible": false,
"parse_status_code": 12005,
"product_dimensions": "5.99 x 111.68 x 64.42 cm; 11.4 kg",
"answered_questions_count": 0,
"rating_stars_distribution": [
{
"rating": 5,
"percentage": 74
},
{
"rating": 4,
"percentage": 15
},
{...}
]
},
"created_at": "2024-07-01 10:35:28",
"updated_at": "2024-07-01 10:35:32",
"page": 1,
"url": "https://www.amazon.co.uk/dp/B08Y6Z944Q/",
"job_id": "7213490386797350913",
"status_code": 200,
"parser_type": ""
}
]
}我们在示例中使用同步 Realtime 集成方法。如果您想使用 Proxy Endpoint 或异步 Push-Pull 集成,请参阅 集成方法 部分。
请求参数值
通用
用于抓取 Google URL 的基本设置和自定义选项。
参数
说明
默认值
source
设置要使用的爬虫。
amazon
url
指向 Amazon 页面的直接 URL(链接)
-
- 强制参数
本地化
将结果适配到特定的地理位置和语言。
重要: 在大多数页面类型上,Amazon 会根据其客户的配送位置定制返回结果。因此,我们建议使用 geo_location 参数来设置您首选的配送位置。您可以阅读更多关于将 geo_location 与 Amazon 一起使用的内容 此处.
其他
用于专门需求的其他高级设置和控制。
最后更新于
这有帮助吗?

