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

URL

抓取任意 IndiaMART URL。

您可以通过使用 indiamart source。该 API 会返回您想要的任何 IndiaMART 页面 HTML。

请求示例

下面的示例说明了如何获取 IndiaMART 页面。

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \\
-d '{
        "source": "indiamart",
        "url": "https://dir.indiamart.com/impcat/solar-panels.html"
    }'
import requests
from pprint import pprint


# 结构化载荷。
payload = {
    'source': 'indiamart',
    'url': 'https://dir.indiamart.com/impcat/solar-panels.html'
}

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

# 不会返回包含作业状态和结果 url 的响应,而是返回
# 包含结果的 JSON 响应。
pprint(response.json())

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

请求参数值

通用

参数
描述
默认值

source

设置抓取器。

indiamart

url

任意页面的直接 URL(链接)。

-

render

设置为时启用 JavaScript 渲染 html. 更多信息.

-

callback_url

回调端点的 URL。 更多信息

-

user_agent_type

设备类型和浏览器。完整列表可在 此处.

desktop

- 必填参数

最后更新于

这有帮助吗?