For the complete documentation index, see llms.txt. This page is also available as Markdown.

Allegro

了解如何开始抓取 Allegro。

使用网页爬虫API,你可以抓取和各种类型的 Allegro 页面;以下是所有受支持的采集器及其对应值的概览。 source 值。

来源
描述

allegro_search

搜索页面 适用于您选择的搜索词。

allegro_product

商品页面 适用于您选择的商品ID。

入门

创建您的 API 用户凭据:注册免费试用,或在 Oxylabs 仪表板 创建您的 API 用户凭据(USERNAMEPASSWORD).

请求示例

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user "USERNAME:PASSWORD" \
-H "Content-Type: application/json" \
-d '{
        "source": "allegro_search",
        "query": "case"
    }'
import requests
from pprint import pprint

# 结构化载荷。
payload = {
    'source': 'allegro_search',
    'query': 'case'
}

# 获取响应。
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())

我们在示例中使用同步 Realtime 集成方法。如果您想使用 Proxy Endpoint 或异步 Push-Pull 集成,请参阅 集成方法 部分。

您还可以选择包含其他参数,例如user_agent_type, 解析, render 等,以自定义您的抓取请求。了解更多:

功能

最后更新于

这有帮助吗?