<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>How to Use OxyLabs Proxy (OxyLabs User Manual Navigation) &#8211; ProxySP</title>
	<atom:link href="https://proxysp.com/zh/manuals/oxylabs-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>https://proxysp.com/zh</link>
	<description>2025 年最佳代理服务提供商评测</description>
	<lastbuilddate>Thu, 01 Jan 1970 00:00:00 +0000</lastbuilddate>
	<language>zh-Hans</language>
	<sy:updateperiod>
	每小时	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	<generator>https://wordpress.org/?v=6.4.7</generator>

<image>
	<url>https://proxysp.com/wp-content/uploads/2021/01/icon-90x90.jpeg</url>
	<title>How to Use OxyLabs Proxy (OxyLabs User Manual Navigation) &#8211; ProxySP</title>
	<link>https://proxysp.com/zh</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">149675634</site>	<item>
		<title>How to Use OxyLabs Proxy [Part 2]: OxyLabs Residential Proxies Manual</title>
		<link>https://proxysp.com/zh/oxylabs-residential-proxies/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-residential-proxies</link>
					<comments>https://proxysp.com/zh/oxylabs-residential-proxies/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7621</guid>

					<description><![CDATA[想使用 OxyLabs 的住宅代理服务器？那么你一定不能错过这篇文章。它是最全面的 OxyLabs 住宅代理服务器用户指南。快速入门 这是...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-residential-proxies/"> <span class="screen-reader-text">如何使用 OxyLabs 代理服务器 [第 2 部分]：OxyLabs 住宅代理服务器使用手册</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>想使用 OxyLabs 的住宅代理服务器？那么你一定不能错过这篇文章。它是最全面的 OxyLabs 住宅代理用户指南。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>这是目前开始使用住宅代理的最快方法。您可以向 <code>https://ipinfo.io</code> 通过我们的 <a href="#basic-query">背面连接入口</a>.不要忘记更换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME:PASSWORD" https://ipinfo.io
</pre>
<p>让我们使用来自法国的代理进行一次请求。您只需添加 <code>cc-FR</code> 到用户名字符串中。下面是 cURL 中的一个示例，以及 <a href="#select-country">这里</a> 可以找到其他语言的代码示例。</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-FR:PASSWORD" https://ipinfo.io
</pre>
<p>下面是另一个通过代理从英国伦敦发出请求的示例。添加 <code>cc-GB-city-london</code> 到用户名字符串，就可以做到这一点。点击 <a href="#select-city">这里</a> 获取更多关于如何掌握城市级代理定位的信息。</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-GB-city-london:PASSWORD" https://ipinfo.io
</pre>
<p>如果您想为多个请求保留同一个代理，该怎么办？ <a href="#session-control">会话控制</a> 使之成为可能。只需添加 <code>sessid-abc12345</code> 的用户名字符串，其中 <code>abc12345</code> 可以是任何随机字符串，只要您持续发送带有此字符串（会话 ID）的请求，我们就会尽力为您提供相同的代理 IP。</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-sessid-randomString123:PASSWORD" https://ipinfo.io
</pre>
<p>查看我们的 <a href="#3rd-party-integrations">集成教程</a> 使用最流行的第三方工具，如 <a href="#multilogin">多重登录</a>, <a href="#shadowrocket">暗影火箭</a>或 <a href="#switchyomega">SwitchyOmega</a>.</p>
<p>如果您有任何其他问题，请联系您的客户经理或我们的支持团队，电话号码是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<p>要了解您的使用统计、生成流量、请求次数等信息，请登录 <a class="custom_link" href="https://dashboard.oxylabs.io/" target="_blank" rel="nofollow noopener">dashboard.oxylabs.io</a>.您还可以添加代理用户（子用户）并单独跟踪其统计数据。</p>
<hr />
<h2 id="backconnect-entry-node">反向连接入口节点</h2>
<pre>pr.oxylabs.io:7777
</pre>
<p>单个反向连接代理可通过用户名中的附加参数选择特定的国家或城市代理。这种方法还支持会话控制。以下是证书结构示例：</p>
<pre>customer-USERNAME-cc-US-city-CITY-sessid-abcde12345:PASSWORD
</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="required">客户</code></code></td>
<td>用户名</td>
</tr>
<tr>
<td><code>cc</code></td>
<td>不区分大小写的 2 个字母的国家代码 <a class="custom_link" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" target="_blank" rel="nofollow noopener">3166-1 alpha-2 格式</a>.例如 <code>可选择丢弃</code> 德国、 <code>GB</code> 代表联合王国、 <code>TH</code> 泰国。有关如何使用国别代用指标的更多详情，请查阅 <a href="#select-country">这里</a>.</td>
</tr>
<tr>
<td><code>城市</code></td>
<td>不区分大小写的英文城市名称。该参数必须与 <code>cc</code> 以提高准确性。例如 <code>cc-GB-city-london</code> 英国伦敦 <code>cc-DE-city-berlin</code> 代表德国柏林。对于有两个以上单词的城市，请将空格替换为 <code>_</code>例如 <code>圣彼得堡市</code> 或 <code>里约热内卢市</code>.</p>
<p>我们支持世界上的每一个城市，但我们不保证在那里都有代理服务器。大多数热门城市都有代理服务器可供选择。作为参考，您可以查看 <a class="custom_link" href="https://docs.oxylabs.io/resources/supported_cities.csv" target="_blank" rel="noopener">此名单</a> 您可以找到哪些城市。点击 <a href="#select-city">这里</a> 以获取更多有关城市级目标定位的信息。</td>
</tr>
<tr>
<td><code>站</code></td>
<td>不区分大小写的美国州名，以 us_ 开头，例如 <code>美国加利福尼亚州</code>, <code>我们_伊利诺伊州</code>.可下载 TXT 格式的受支持城市完整列表 <a class="custom_link" href="https://docs.oxylabs.io/resources/us_states.txt" target="_blank" rel="nofollow noopener">这里</a>.</td>
</tr>
<tr>
<td><code>sessid</code></td>
<td>会话 ID，以便在下次查询时使用相同的 IP。会话将在 10 分钟后过期，过期后将为该 ID 分配一个新 IP。随机字符串；支持 0-9、A-z 字符。</td>
</tr>
<tr>
<td><code class="required">密码</code></code></td>
<td>密码</td>
</tr>
</tbody>
</table>
<p><code class="required">  </code> - 所需参数</p>
</div>
我们还支持按 ASN 号码定位。这样就可以选择特定运营商的代理。该功能可根据要求启用。</p>
<p>如果添加多个 <em>地点</em> 参数，系统将忽略所有参数，只有一个参数除外。因此，了解哪些参数会被优先处理非常重要。层次结构如下：</p>
<ol>
<li><code>城市</code></li>
<li><code>国</code></li>
<li><code>cc</code></li>
</ol>
<p>例如，如果您的查询包含以下参数 <code>客户名称-cc-美国-城市-巴黎-美国-加利福尼亚州</code>, 您将收到来自美国巴黎的代理服务器。</p>
<hr />
<h3 id="entry-node-for-china">中国入境节点</h3>
<pre>https://a81298871.com:8000 - 香港
</pre>
<pre>https://cnt9t1is.com:8000 - 北京
</pre>
<p>为了更好地连接中国，我们在香港和北京地区配置了入口节点。请注意，这是一个 HTTPS 代理节点。所有用户名参数都与普通入口节点相同。</p>
<p>请注意，某些第三方工具目前无法使用香港和北京的入口节点。可与上述入口节点配合使用的第三方工具有</p>
<ol>
<li style="list-style-type: none;">
<ol>
<li style="list-style-type: none;">
<ol>
<li><a href="#oxylabs-proxy-manager">Oxylabs 代理管理器</a></li>
<li><a href="#switchyomega">SwitchyOmega</a></li>
<li><a href="#shadowrocket">暗影火箭</a></li>
<li><a href="#postern">邮政</a></li>
</ol>
</li>
</ol>
</li>
</ol>
<p><span style="font-size: 16px;">我们目前正在修复支持 HTTPS 协议的其他集成。</span></p>
<p>如果您从中国连接到我们的住宅网络，但仍然遇到所提供的入口节点问题，请通过以下方式联系我们 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 我们将一起找出解决方案。</p>
<hr />
<h2 id="basic-query">基本查询</h2>
<p>基本查询只需通过 <code>用户名</code> 和 <code>暗号</code>.无需其他参数。这种查询将导致从一个随机 IP 地址（代理）发出请求。每次新请求都将使用不同的代理。</p>
<p>在本例中，查询 <code>ipinfo.io</code> 是通过随机 IP 执行的：</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME:PASSWORD" https://ipinfo.io
</pre>
<hr />
<h2 id="select-country">选择国家</h2>
<p><img decoding="async" class="size-full wp-image-8123 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Select-Country.png" alt="OxyLabs Residential Proxies Select Country" width="270" height="22" /></p>
<p>添加 <code>cc</code> 标记可用于指定使用哪个国家的 IP 处理请求。该参数的值是一个不区分大小写的双字母国家代码。 <a class="custom_link" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" target="_blank" rel="nofollow noopener">3166-1 alpha-2 格式</a>.例如 <code>可选择丢弃</code> 德国、 <code>GB</code> 联合王国、 <code>TH</code> 为泰国代理。更多详情，请参阅示例。</p>
<p>在本例中，查询 <code>ipinfo.io</code> 是从德国的一个随机 IP 地址执行的：</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-DE:PASSWORD" https://ipinfo.io
</pre>
<hr />
<h2 id="select-state">选择国家</h2>
<p><img decoding="async" class="size-full wp-image-8124 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Select-State.png" alt="OxyLabs Residential Proxies Select State" width="272" height="24" /></p>
<p>要从指定的美国州获取代理，请添加 <code>站</code> 标记到授权字符串中。例如 <code>美国加利福尼亚州</code>, <code>我们_伊利诺伊州</code>.可下载 TXT 格式的受支持城市完整列表 <a class="custom_link" href="https://docs.oxylabs.io/resources/us_states.txt" target="_blank" rel="nofollow noopener">这里</a>.</p>
<p>在本例中，查询 <code>ipinfo.io</code> 是从美国加利福尼亚州的一个随机 IP 地址执行的：</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-st-us_california:PASSWORD" https://ipinfo.io
</pre>
<hr />
<h2 id="select-city">选择城市</h2>
<p><img decoding="async" class="size-full wp-image-8125 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Select-City.png" alt="OxyLabs Residential Proxies Select City" width="271" height="31" /></p>
<p>为了缩小城市一级的目标范围，一个 <code>城市</code> 参数。例如 <code>cc-DE-city-munich</code> 表示将由德国慕尼黑的代理处理查询。我们支持世界上的所有城市，但并不保证在这些城市都有代理。大多数热门城市都有代理服务器可供选择。</p>
<p>以下是几个有效组合的例子 <code>cc</code> 和 <code>城市</code> 参数<br />
<code>cc-US-city-los_angeles</code><br />
<code>cc-IT-city-rome</code><br />
<code>cc-TH-city-bangkok</code><br />
<code>cc-JP-city-tokyo</code><br />
<code>cc-AU-城市-悉尼</code><br />
<code>cc-ES-city-barcelona</code></p>
<p>在本例中，查询 <code>ipinfo.io</code> 是从德国慕尼黑的一个随机 IP 地址执行的：</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-DE-city-munich:PASSWORD" https://ipinfo.io
</pre>
<hr />
<h2 id="session-control">会话控制</h2>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8126 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Session-Control.png" alt="OxyLabs Residential Proxies Session Control" width="268" height="29" /></p>
<p>添加 <code>sessid</code> 参数，例如 <code>sessid-abc12345</code>启用会话控制。这意味着，代理不会随以下请求而改变。下面的示例展示了会话控制的工作原理：</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8127" src="https://www.proxysp.com/wp-content/uploads/2021/09/session-control.gif" alt="session-control" width="853" height="378" /></p>
<p>只要有活动（请求），系统就会保持与特定会话 ID 关联的相同 IP。60 秒无活动后，IP 会自动更换为另一个。</p>
<p>例如* 您的初始查询与 <code>sessid-random123</code> 获得分配的代理 IP 地址 <code>1.1.1.1</code> * 只要您不断发送具有相同会话 ID 的新请求，且该 IP 地址在线并可用，系统就会通过以下方式路由您的查询 <code>1.1.1.1</code> * 如果您停止发送请求或 IP 地址不再在线，系统将在 60 秒后分配一个新的代理 IP。* 这意味着您下一次查询 <code>sessid-random123</code> 将通过不同的 IP 地址路由。</p>
<p>标准会话时间为 10 分钟，但可以延长。请联系您的客户经理了解详情。</p>
<p>第一次请求将选择德国 IP，然后新的查询将保留相同的 IP（会话控制）：</p>
<pre>curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-DE-sessid-abcde12345:PASSWORD" https://ipinfo.io
</pre>
<hr />
<h2 id="country-specific-entry-nodes">国家特定入口节点</h2>
<h3 id="random-proxy-entry-nodes">随机代理入口节点</h3>
<p>Oxylabs 住宅网络覆盖全球几乎所有国家。针对特定国家的随机代理入口点会在每次新请求时返回新 IP。</p>
<p>您无需传递任何其他参数，只需 <code>客户用户名：密码</code>.如果您已将 IP 列入白名单，则无需传递登录凭证。特定国家/地区的端口不支持城市级结果。</p>
<p>请查看仪表板上的入口点信息，或下载 XLS 格式的随机入口点完整列表 <a class="custom_link" href="https://docs.oxylabs.io/resources/random-proxy-entry-points-oxylabs.xls" target="_blank" rel="nofollow noopener">这里</a>.</p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="443">
<tbody>
<tr>
<td style="font-weight: 400;" width="138">随机</td>
<td style="font-weight: 400;" width="140">美国</td>
<td style="font-weight: 400;" width="165">加拿大</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">pr.oxylabs.io:7777</td>
<td style="font-weight: 400;" width="140">us-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="165">ca-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">GB</td>
<td style="font-weight: 400;" width="140">德国</td>
<td style="font-weight: 400;" width="165">法国</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">gb-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="140">de-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="165">fr-pr.oxylabs.io:40000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">西班牙</td>
<td style="font-weight: 400;" width="140">意大利</td>
<td style="font-weight: 400;" width="165">瑞典</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">es-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="140">it-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="165">se-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">希腊</td>
<td style="font-weight: 400;" width="140">葡萄牙</td>
<td style="font-weight: 400;" width="165">荷兰</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">gr-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="140">pt-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="165">nl-pr.oxylabs.io:20000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">比利时</td>
<td style="font-weight: 400;" width="140">俄罗斯</td>
<td style="font-weight: 400;" width="165">乌克兰</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">be-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="140">ru-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="165">ua-pr.oxylabs.io:10000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">波兰</td>
<td style="font-weight: 400;" width="140">以色列</td>
<td style="font-weight: 400;" width="165">土耳其</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">pl-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="140">il-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="165">tr-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">澳大利亚</td>
<td style="font-weight: 400;" width="140">马来西亚</td>
<td style="font-weight: 400;" width="165">泰国</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">au-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="140">my-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="165">th-pr.oxylabs.io:20000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">韩国</td>
<td style="font-weight: 400;" width="140">日本</td>
<td style="font-weight: 400;" width="165">菲律宾</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">kr-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="140">jp-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="165">ph-pr.oxylabs.io:10000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">新加坡</td>
<td style="font-weight: 400;" width="140">中国</td>
<td style="font-weight: 400;" width="165">香港</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">sg-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="140">cn-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="165">hk-pr.oxylabs.io:40000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">台湾</td>
<td style="font-weight: 400;" width="140">印度</td>
<td style="font-weight: 400;" width="165">巴基斯坦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">tw-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="140">in-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="165">pk-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">伊朗</td>
<td style="font-weight: 400;" width="140">印度尼西亚</td>
<td style="font-weight: 400;" width="165">阿塞拜疆</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ir-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="140">id-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="165">az-pr.oxylabs.io:20000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">哈萨克斯坦</td>
<td style="font-weight: 400;" width="140">阿联酋</td>
<td style="font-weight: 400;" width="165">墨西哥</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">kz-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="140">ae-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="165">mx-pr.oxylabs.io:10000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">巴西</td>
<td style="font-weight: 400;" width="140">阿根廷</td>
<td style="font-weight: 400;" width="165">智利</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">br-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="140">ar-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="165">cl-pr.oxylabs.io:40000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">秘鲁</td>
<td style="font-weight: 400;" width="140">厄瓜多尔</td>
<td style="font-weight: 400;" width="165">哥伦比亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">pe-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="140">ec-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="165">co-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">南非</td>
<td style="font-weight: 400;" width="140">埃及</td>
<td style="font-weight: 400;" width="165">安哥拉</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">za-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="140">eg-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="165">ao-pr.oxylabs.io:40000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">喀麦隆</td>
<td style="font-weight: 400;" width="140">中非共和国</td>
<td style="font-weight: 400;" width="165">乍得</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">cm-pr.oxylabs.io:41000</td>
<td style="font-weight: 400;" width="140">cf-pr.oxylabs.io:42000</td>
<td style="font-weight: 400;" width="165">td-pr.oxylabs.io:43000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">贝宁</td>
<td style="font-weight: 400;" width="140">埃塞俄比亚</td>
<td style="font-weight: 400;" width="165">吉布提</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">bj-pr.oxylabs.io:44000</td>
<td style="font-weight: 400;" width="140">et-pr.oxylabs.io:45000</td>
<td style="font-weight: 400;" width="165">dj-pr.oxylabs.io:46000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">冈比亚</td>
<td style="font-weight: 400;" width="140">加纳</td>
<td style="font-weight: 400;" width="165">科特迪瓦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">gm-pr.oxylabs.io:47000</td>
<td style="font-weight: 400;" width="140">gh-pr.oxylabs.io:48000</td>
<td style="font-weight: 400;" width="165">ci-pr.oxylabs.io:49000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">肯尼亚</td>
<td style="font-weight: 400;" width="140">利比里亚</td>
<td style="font-weight: 400;" width="165">马达加斯加</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ke-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="140">lr-pr.oxylabs.io:11000</td>
<td style="font-weight: 400;" width="165">mg-pr.oxylabs.io:12000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">马里</td>
<td style="font-weight: 400;" width="140">毛里塔尼亚</td>
<td style="font-weight: 400;" width="165">毛里求斯</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ml-pr.oxylabs.io:13000</td>
<td style="font-weight: 400;" width="140">mr-pr.oxylabs.io:14000</td>
<td style="font-weight: 400;" width="165">mu-pr.oxylabs.io:15000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">摩洛哥</td>
<td style="font-weight: 400;" width="140">莫桑比克</td>
<td style="font-weight: 400;" width="165">尼日利亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ma-pr.oxylabs.io:16000</td>
<td style="font-weight: 400;" width="140">mz-pr.oxylabs.io:17000</td>
<td style="font-weight: 400;" width="165">ng-pr.oxylabs.io:18000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">塞内加尔</td>
<td style="font-weight: 400;" width="140">塞舌尔</td>
<td style="font-weight: 400;" width="165">津巴布韦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">sn-pr.oxylabs.io:19000</td>
<td style="font-weight: 400;" width="140">sc-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="165">zw-pr.oxylabs.io:21000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">南苏丹</td>
<td style="font-weight: 400;" width="140">苏丹</td>
<td style="font-weight: 400;" width="165">多哥</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ss-pr.oxylabs.io:22000</td>
<td style="font-weight: 400;" width="140">sd-pr.oxylabs.io:23000</td>
<td style="font-weight: 400;" width="165">tg-pr.oxylabs.io:24000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">突尼斯</td>
<td style="font-weight: 400;" width="140">乌干达</td>
<td style="font-weight: 400;" width="165">赞比亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">tn-pr.oxylabs.io:25000</td>
<td style="font-weight: 400;" width="140">ug-pr.oxylabs.io:26000</td>
<td style="font-weight: 400;" width="165">zm-pr.oxylabs.io:27000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">阿富汗</td>
<td style="font-weight: 400;" width="140">巴林</td>
<td style="font-weight: 400;" width="165">孟加拉国</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">af-pr.oxylabs.io:28000</td>
<td style="font-weight: 400;" width="140">bh-pr.oxylabs.io:29000</td>
<td style="font-weight: 400;" width="165">bd-pr.oxylabs.io:30000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">亚美尼亚</td>
<td style="font-weight: 400;" width="140">不丹</td>
<td style="font-weight: 400;" width="165">缅甸</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">am-pr.oxylabs.io:31000</td>
<td style="font-weight: 400;" width="140">bt-pr.oxylabs.io:32000</td>
<td style="font-weight: 400;" width="165">mm-pr.oxylabs.io:33000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">柬埔寨</td>
<td style="font-weight: 400;" width="140">格鲁吉亚</td>
<td style="font-weight: 400;" width="165">伊拉克</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">kh-pr.oxylabs.io:34000</td>
<td style="font-weight: 400;" width="140">ge-pr.oxylabs.io:36000</td>
<td style="font-weight: 400;" width="165">iq-pr.oxylabs.io:37000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">约旦</td>
<td style="font-weight: 400;" width="140">黎巴嫩</td>
<td style="font-weight: 400;" width="165">马尔代夫</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">jo-pr.oxylabs.io:38000</td>
<td style="font-weight: 400;" width="140">lb-pr.oxylabs.io:39000</td>
<td style="font-weight: 400;" width="165">mv-pr.oxylabs.io:40000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">蒙古</td>
<td style="font-weight: 400;" width="140">阿曼</td>
<td style="font-weight: 400;" width="165">卡塔尔</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">mn-pr.oxylabs.io:41000</td>
<td style="font-weight: 400;" width="140">om-pr.oxylabs.io:42000</td>
<td style="font-weight: 400;" width="165">qa-pr.oxylabs.io:43000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">沙特阿拉伯</td>
<td style="font-weight: 400;" width="140">越南</td>
<td style="font-weight: 400;" width="165">土库曼斯坦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">sa-pr.oxylabs.io:44000</td>
<td style="font-weight: 400;" width="140">vn-pr.oxylabs.io:45000</td>
<td style="font-weight: 400;" width="165">tm-pr.oxylabs.io:46000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">乌兹别克斯坦</td>
<td style="font-weight: 400;" width="140">也门</td>
<td style="font-weight: 400;" width="165">阿尔巴尼亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">uz-pr.oxylabs.io:47000</td>
<td style="font-weight: 400;" width="140">ye-pr.oxylabs.io:48000</td>
<td style="font-weight: 400;" width="165">al-pr.oxylabs.io:49000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">安道尔</td>
<td style="font-weight: 400;" width="140">奥地利</td>
<td style="font-weight: 400;" width="165">波斯尼亚和黑塞哥维那</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ad-pr.oxylabs.io:10000</td>
<td style="font-weight: 400;" width="140">at-pr.oxylabs.io:11000</td>
<td style="font-weight: 400;" width="165">ba-pr.oxylabs.io:13000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">保加利亚</td>
<td style="font-weight: 400;" width="140">白俄罗斯</td>
<td style="font-weight: 400;" width="165">克罗地亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">bg-pr.oxylabs.io:14000</td>
<td style="font-weight: 400;" width="140">by-pr.oxylabs.io:15000</td>
<td style="font-weight: 400;" width="165">hr-pr.oxylabs.io:16000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">塞浦路斯</td>
<td style="font-weight: 400;" width="140">捷克共和国</td>
<td style="font-weight: 400;" width="165">丹麦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">cy-pr.oxylabs.io:35000</td>
<td style="font-weight: 400;" width="140">cz-pr.oxylabs.io:18000</td>
<td style="font-weight: 400;" width="165">dk-pr.oxylabs.io:19000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">爱沙尼亚</td>
<td style="font-weight: 400;" width="140">芬兰</td>
<td style="font-weight: 400;" width="165">匈牙利</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ee-pr.oxylabs.io:20000</td>
<td style="font-weight: 400;" width="140">fi-pr.oxylabs.io:21000</td>
<td style="font-weight: 400;" width="165">hu-pr.oxylabs.io:23000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">冰岛</td>
<td style="font-weight: 400;" width="140">爱尔兰</td>
<td style="font-weight: 400;" width="165">拉脱维亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">is-pr.oxylabs.io:24000</td>
<td style="font-weight: 400;" width="140">iepr.oxylabs.io:25000</td>
<td style="font-weight: 400;" width="165">lv-pr.oxylabs.io:26000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">列支敦士登</td>
<td style="font-weight: 400;" width="140">立陶宛</td>
<td style="font-weight: 400;" width="165">卢森堡</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">li-pr.oxylabs.io:27000</td>
<td style="font-weight: 400;" width="140">lt-pr.oxylabs.io:28000</td>
<td style="font-weight: 400;" width="165">lu-pr.oxylabs.io:29000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">马耳他</td>
<td style="font-weight: 400;" width="140">摩纳哥</td>
<td style="font-weight: 400;" width="165">摩尔多瓦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">mt-pr.oxylabs.io:30000</td>
<td style="font-weight: 400;" width="140">mc-pr.oxylabs.io:31000</td>
<td style="font-weight: 400;" width="165">md-pr.oxylabs.io:32000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">黑山共和国</td>
<td style="font-weight: 400;" width="140">挪威</td>
<td style="font-weight: 400;" width="165">罗马尼亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">me-pr.oxylabs.io:33000</td>
<td style="font-weight: 400;" width="140">no-pr.oxylabs.io:34000</td>
<td style="font-weight: 400;" width="165">ro-pr.oxylabs.io:35000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">塞尔维亚</td>
<td style="font-weight: 400;" width="140">斯洛伐克</td>
<td style="font-weight: 400;" width="165">斯洛文尼亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">rs-pr.oxylabs.io:36000</td>
<td style="font-weight: 400;" width="140">sk-pr.oxylabs.io:37000</td>
<td style="font-weight: 400;" width="165">si-pr.oxylabs.io:38000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">瑞士</td>
<td style="font-weight: 400;" width="140">马其顿</td>
<td style="font-weight: 400;" width="165">巴哈马</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">ch-pr.oxylabs.io:39000</td>
<td style="font-weight: 400;" width="140">mk-pr.oxylabs.io:40000</td>
<td style="font-weight: 400;" width="165">bs-pr.oxylabs.io:41000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">伯里兹</td>
<td style="font-weight: 400;" width="140">英属维尔京群岛</td>
<td style="font-weight: 400;" width="165">哥斯达黎加</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">bz-pr.oxylabs.io:42000</td>
<td style="font-weight: 400;" width="140">vg-pr.oxylabs.io:43000</td>
<td style="font-weight: 400;" width="165">cr-pr.oxylabs.io:44000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">古巴</td>
<td style="font-weight: 400;" width="140">多米尼克</td>
<td style="font-weight: 400;" width="165">海地</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">cu-pr.oxylabs.io:45000</td>
<td style="font-weight: 400;" width="140">dm-pr.oxylabs.io:46000</td>
<td style="font-weight: 400;" width="165">ht-pr.oxylabs.io:47000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">洪都拉斯</td>
<td style="font-weight: 400;" width="140">牙买加</td>
<td style="font-weight: 400;" width="165">阿鲁巴</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">hn-pr.oxylabs.io:48000</td>
<td style="font-weight: 400;" width="140">jm-pr.oxylabs.io:49000</td>
<td style="font-weight: 400;" width="165">aw-pr.oxylabs.io:10000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">巴拿马</td>
<td style="font-weight: 400;" width="140">波多黎各</td>
<td style="font-weight: 400;" width="165">特立尼达和多巴哥</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">pa-pr.oxylabs.io:11000</td>
<td style="font-weight: 400;" width="140">pr-pr.oxylabs.io:12000</td>
<td style="font-weight: 400;" width="165">tt-pr.oxylabs.io:13000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">斐济</td>
<td style="font-weight: 400;" width="140">新西兰</td>
<td style="font-weight: 400;" width="165">玻利维亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">fj-pr.oxylabs.io:14000</td>
<td style="font-weight: 400;" width="140">nz-pr.oxylabs.io:15000</td>
<td style="font-weight: 400;" width="165">bo-pr.oxylabs.io:16000</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">巴拉圭</td>
<td style="font-weight: 400;" width="140">乌拉圭</td>
<td style="font-weight: 400;" width="165">委内瑞拉</td>
</tr>
<tr>
<td style="font-weight: 400;" width="138">py-pr.oxylabs.io:17000</td>
<td style="font-weight: 400;" width="140">uy-pr.oxylabs.io:18000</td>
<td style="font-weight: 400;" width="165">ve-pr.oxylabs.io:19000</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，查询 <code>ipinfo.io</code> 是通过随机的土耳其 IP 执行的：</p>
<pre>curl -x tr-pr.oxylabs.io:30000 -U "customer-USERNAME:PASSWORD" https://ipinfo.io
</pre>
<pre>pr.oxylabs.io:7777
us-pr.oxylabs.io:10000
ca-pr.oxylabs.io:30000
gb-pr.oxylabs.io:20000
de-pr.oxylabs.io:30000
fr-pr.oxylabs.io:40000
es-pr.oxylabs.io:10000
it-pr.oxylabs.io:20000
se-pr.oxylabs.io:30000
gr-pr.oxylabs.io:40000
pt-pr.oxylabs.io:10000
nl-pr.oxylabs.io:20000
be-pr.oxylabs.io:30000
ru-pr.oxylabs.io:40000
ua-pr.oxylabs.io:10000
pl-pr.oxylabs.io:20000
il-pr.oxylabs.io:20000
tr-pr.oxylabs.io:30000
au-pr.oxylabs.io:40000
my-pr.oxylabs.io:10000
th-pr.oxylabs.io:20000
kr-pr.oxylabs.io:30000
jp-pr.oxylabs.io:40000
ph-pr.oxylabs.io:10000
sg-pr.oxylabs.io:20000
cn-pr.oxylabs.io:30000
hk-pr.oxylabs.io:40000
tw-pr.oxylabs.io:10000
in-pr.oxylabs.io:20000
pk-pr.oxylabs.io:30000
ir-pr.oxylabs.io:40000
id-pr.oxylabs.io:10000
AZ-pr.oxylabs.io:20000
kz-pr.oxylabs.io:30000
ae-pr.oxylabs.io:40000
mx-pr.oxylabs.io:10000
br-pr.oxylabs.io:20000
ar-pr.oxylabs.io:30000
cl-pr.oxylabs.io:40000
pe-pr.oxylabs.io:10000
ec-pr.oxylabs.io:20000
co-pr.oxylabs.io:30000
za-pr.oxylabs.io:40000
eg-pr.oxylabs.io:10000
sa-pr.oxylabs.io:44000
dk-pr.oxylabs.io:19000
ao-pr.oxylabs.io:40000
cm-pr.oxylabs.io:41000
cf-pr.oxylabs.io:42000
td-pr.oxylabs.io:43000
bj-pr.oxylabs.io:44000
et-pr.oxylabs.io:45000
dj-pr.oxylabs.io:46000
gm-pr.oxylabs.io:47000
gh-pr.oxylabs.io:48000
ci-pr.oxylabs.io:49000
ke-pr.oxylabs.io:10000
lr-pr.oxylabs.io:11000
mg-pr.oxylabs.io:12000
ml-pr.oxylabs.io:13000
mr-pr.oxylabs.io:14000
mu-pr.oxylabs.io:15000
ma-pr.oxylabs.io:16000
mz-pr.oxylabs.io:17000
ng-pr.oxylabs.io:18000
sn-pr.oxylabs.io:19000
sc-pr.oxylabs.io:20000
zw-pr.oxylabs.io:21000
ss-pr.oxylabs.io:22000
sd-pr.oxylabs.io:23000
tg-pr.oxylabs.io:24000
tn-pr.oxylabs.io:25000
ug-pr.oxylabs.io:26000
zm-pr.oxylabs.io:27000
af-pr.oxylabs.io:28000
bh-pr.oxylabs.io:29000
bd-pr.oxylabs.io:30000
am-pr.oxylabs.io:31000
bt-pr.oxylabs.io:32000
mm-pr.oxylabs.io:33000
kh-pr.oxylabs.io:34000
ge-pr.oxylabs.io:36000
iq-pr.oxylabs.io:37000
jo-pr.oxylabs.io:38000
lb-pr.oxylabs.io:39000
mv-pr.oxylabs.io:40000
mn-pr.oxylabs.io:41000
om-pr.oxylabs.io:42000
qa-pr.oxylabs.io:43000
sa-pr.oxylabs.io:44000
vn-pr.oxylabs.io:45000
tm-pr.oxylabs.io:46000
uz-pr.oxylabs.io:47000
ye-pr.oxylabs.io:48000
al-pr.oxylabs.io:49000
ad-pr.oxylabs.io:10000
at-pr.oxylabs.io:11000
ba-pr.oxylabs.io:13000
bg-pr.oxylabs.io:14000
by-pr.oxylabs.io:15000
hr-pr.oxylabs.io:16000
cy-pr.oxylabs.io:35000
cz-pr.oxylabs.io:18000
dk-pr.oxylabs.io:19000
ee-pr.oxylabs.io:20000
fi-pr.oxylabs.io:21000
hu-pr.oxylabs.io:23000
is-pr.oxylabs.io:24000
i-pr.oxylabs.io:25000
lv-pr.oxylabs.io:26000
li-pr.oxylabs.io:27000
LT-pr.oxylabs.io:28000
lu-pr.oxylabs.io:29000
mt-pr.oxylabs.io:30000
mc-pr.oxylabs.io:31000
md-pr.oxylabs.io:32000
me-pr.oxylabs.io:33000
no-pr.oxylabs.io:34000
ro-pr.oxylabs.io:35000
rs-pr.oxylabs.io:36000
sk-pr.oxylabs.io:37000
si-pr.oxylabs.io:38000
ch-pr.oxylabs.io:39000
mk-pr.oxylabs.io:40000
bs-pr.oxylabs.io:41000
bz-pr.oxylabs.io:42000
vg-pr.oxylabs.io:43000
cu-pr.oxylabs.io:44000
cu-pr.oxylabs.io:45000
dm-pr.oxylabs.io:46000
ht-pr.oxylabs.io:47000
hn-pr.oxylabs.io:48000
jm-pr.oxylabs.io:49000
aw-pr.oxylabs.io:10000
pa-pr.oxylabs.io:11000
pr-pr.oxylabs.io:12000
tt-pr.oxylabs.io:13000
fj-pr.oxylabs.io:14000
nz-pr.oxylabs.io:15000
bo-pr.oxylabs.io:16000
py-pr.oxylabs.io:17000
uy-pr.oxylabs.io:18000
ve-pr.oxylabs.io:19000
kw-pr.oxylabs.io:20000
</pre>
<hr />
<h3 id="sticky-proxy-entry-nodes">粘性代理入口节点</h3>
<p>特定国家的粘性代理入口点会在每次新请求时返回相同的 IP，而您将使用相同的端口。IP 粘性最长可持续 10 分钟。之后，IP 会被新的 IP 取代。</p>
<p>您无需传递任何其他参数，只需 <code>客户用户名：密码</code>.如果您已将 IP 列入白名单，则无需传递登录凭证。特定国家/地区的端口不支持城市级结果。</p>
<p>请查看仪表板上的入口点信息，或以 XLS 格式下载完整的粘性入口点列表 <a class="custom_link" href="https://docs.oxylabs.io/resources/sticky-proxy-entry-points-oxylabs.xls" target="_blank" rel="nofollow noopener">这里</a>.</p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="678">
<tbody>
<tr>
<td style="font-weight: 400;" width="197">随机</td>
<td style="font-weight: 400;" width="223">美国</td>
<td style="font-weight: 400;" width="258">加拿大</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">pr.oxylabs.io:10000 - 49999</td>
<td style="font-weight: 400;" width="223">us-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="258">ca-pr.oxylabs.io:30001 - 39999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">大不列颠</td>
<td style="font-weight: 400;" width="223">德国</td>
<td style="font-weight: 400;" width="258">法国</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">gb-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="223">de-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="258">fr-pr.oxylabs.io:40001 - 49999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">西班牙</td>
<td style="font-weight: 400;" width="223">意大利</td>
<td style="font-weight: 400;" width="258">瑞典</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">es-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="223">it-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="258">se-pr.oxylabs.io:30001 - 39999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">希腊</td>
<td style="font-weight: 400;" width="223">葡萄牙</td>
<td style="font-weight: 400;" width="258">荷兰</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">gr-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="223">pt-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="258">nl-pr.oxylabs.io:20001 - 29999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">比利时</td>
<td style="font-weight: 400;" width="223">俄罗斯</td>
<td style="font-weight: 400;" width="258">乌克兰</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">be-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="223">ru-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="258">ua-pr.oxylabs.io:10001 - 19999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">波兰</td>
<td style="font-weight: 400;" width="223">以色列</td>
<td style="font-weight: 400;" width="258">土耳其</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">pl-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="223">il-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="258">tr-pr.oxylabs.io:30001 - 39999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">澳大利亚</td>
<td style="font-weight: 400;" width="223">马来西亚</td>
<td style="font-weight: 400;" width="258">泰国</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">au-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="223">my-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="258">th-pr.oxylabs.io:20001 - 29999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">韩国</td>
<td style="font-weight: 400;" width="223">日本</td>
<td style="font-weight: 400;" width="258">菲律宾</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">kr-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="223">jp-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="258">ph-pr.oxylabs.io:10001 - 19999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">新加坡</td>
<td style="font-weight: 400;" width="223">中国</td>
<td style="font-weight: 400;" width="258">香港</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">sg-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="223">cn-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="258">hk-pr.oxylabs.io:40001 - 49999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">台湾</td>
<td style="font-weight: 400;" width="223">印度</td>
<td style="font-weight: 400;" width="258">巴基斯坦</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">tw-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="223">in-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="258">pk-pr.oxylabs.io:30001 - 39999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">伊朗</td>
<td style="font-weight: 400;" width="223">印度尼西亚</td>
<td style="font-weight: 400;" width="258">阿塞拜疆</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">ir-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="223">id-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="258">az-pr.oxylabs.io:20001 - 29999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">哈萨克斯坦</td>
<td style="font-weight: 400;" width="223">阿联酋</td>
<td style="font-weight: 400;" width="258">墨西哥</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">kz-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="223">ae-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="258">mx-pr.oxylabs.io:10001 - 19999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">巴西</td>
<td style="font-weight: 400;" width="223">阿根廷</td>
<td style="font-weight: 400;" width="258">智利</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">br-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="223">ar-pr.oxylabs.io:30001 - 39999</td>
<td style="font-weight: 400;" width="258">cl-pr.oxylabs.io:40001 - 49999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">秘鲁</td>
<td style="font-weight: 400;" width="223">厄瓜多尔</td>
<td style="font-weight: 400;" width="258">哥伦比亚</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">pe-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="223">ec-pr.oxylabs.io:20001 - 29999</td>
<td style="font-weight: 400;" width="258">co-pr.oxylabs.io:30001 - 39999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">南非</td>
<td style="font-weight: 400;" width="223">埃及</td>
<td style="font-weight: 400;" width="258">沙特阿拉伯</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">za-pr.oxylabs.io:40001 - 49999</td>
<td style="font-weight: 400;" width="223">eg-pr.oxylabs.io:10001 - 19999</td>
<td style="font-weight: 400;" width="258">sa-pr.oxylabs.io:44001 - 44999</td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">丹麦</td>
<td style="font-weight: 400;" rowspan="2" width="223"></td>
<td style="font-weight: 400;" rowspan="2" width="258"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="197">dk-pr.oxylabs.io:19001 - 19999</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，查询 <code>ipinfo.io</code> 是通过土耳其 IP 执行的，每次请求都会在同一 IP 上停留长达 10 分钟。我们选择的是 30001 端口，但土耳其的粘性入口点覆盖 30001 至 39999 端口。</p>
<pre>curl -x tr-pr.oxylabs.io:30001 -U "customer-USERNAME:PASSWORD" https://ipinfo.io
</pre>
<pre>pr.oxylabs.io:10000 - 49999
us-pr.oxylabs.io:10001 - 19999
ca-pr.oxylabs.io:30001 - 39999
gb-pr.oxylabs.io:20001 - 29999
de-pr.oxylabs.io:30001 - 39999
fr-pr.oxylabs.io:40001 - 49999
es-pr.oxylabs.io:10001 - 19999
it-pr.oxylabs.io:20001 - 29999
se-pr.oxylabs.io:30001 - 39999
gr-pr.oxylabs.io:40001 - 49999
pt-pr.oxylabs.io:10001 - 19999
nl-pr.oxylabs.io:20001 - 29999
be-pr.oxylabs.io:30001 - 39999
ru-pr.oxylabs.io:40001 - 49999
ua-pr.oxylabs.io:10001 - 19999
pl-pr.oxylabs.io:20001 - 29999
il-pr.oxylabs.io:20001 - 29999
tr-pr.oxylabs.io:30001 - 39999
au-pr.oxylabs.io:40001 - 49999
my-pr.oxylabs.io:10001 - 19999
th-pr.oxylabs.io:20001 - 29999
kr-pr.oxylabs.io:30001 - 39999
jp-pr.oxylabs.io:40001 - 49999
ph-pr.oxylabs.io:10001 - 19999
sg-pr.oxylabs.io:20001 - 29999
cn-pr.oxylabs.io:30001 - 39999
hk-pr.oxylabs.io:40001 - 49999
tw-pr.oxylabs.io:10001 - 19999
in-pr.oxylabs.io:20001 - 29999
pk-pr.oxylabs.io:30001 - 39999
ir-pr.oxylabs.io:40001 - 49999
id-pr.oxylabs.io:10001 - 19999
AZ-pr.oxylabs.io:20001 - 29999
kz-pr.oxylabs.io:30001 - 39999
ae-pr.oxylabs.io:40001 - 49999
mx-pr.oxylabs.io:10001 - 19999
br-pr.oxylabs.io:20001 - 29999
ar-pr.oxylabs.io:30001 - 39999
cl-pr.oxylabs.io:40001 - 49999
pe-pr.oxylabs.io:10001 - 19999
ec-pr.oxylabs.io:20001 - 29999
co-pr.oxylabs.io:30001 - 39999
za-pr.oxylabs.io:40001 - 49999
eg-pr.oxylabs.io:10001 - 19999
sa-pr.oxylabs.io:44001 - 44999
dk-pr.oxylabs.io:19001 - 19999
</pre>
<hr />
<h2 id="additional-information">其他信息</h2>
<h3 id="country-state-city-mapping">国家、州、城市地图</h3>
<p>我们使用 <a class="custom_link" href="https://www.maxmind.com/en/geoip2-databases" target="_blank" rel="nofollow noopener">MaxMind GeoIP2</a> 数据库来分配我们的出口节点 <code>cc</code>, <code>站</code> 和 <code>城市</code> 值。该数据库每周更新一次。</p>
<p>其他一些公共 IP 数据库可能会显示不同的位置。在位置不匹配至关重要的情况下，我们建议仔细检查所分配代理的位置是否与目标网站使用的 IP 数据库中的位置相同。</p>
<hr />
<h3 id="response-codes">响应代码</h3>
<p>这些是您在使用我们的住宅代理池时可能收到的最常见的响应代码。如果您收到任何其他响应代码，请联系您的专属客户经理了解更多信息。</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>400</code> 糟糕的请求</td>
<td>如果请求中不包含要连接的主机，或在解析 HTTP 请求时出现一般错误，代理服务器会返回此错误代码。请确保您的请求格式正确，并在请求中包含 URL，然后再试一次。</td>
</tr>
<tr>
<td><code>407</code> 需要代理验证</td>
<td>请求缺少代理验证信息或用户名或密码无效。请在请求中包含代理授权标头，并确保用户名和密码正确无误，然后再试一次。</td>
</tr>
<tr>
<td><code>500</code> 内部服务器错误</td>
<td>代理服务器遇到内部错误。请稍后重试。</td>
</tr>
<tr>
<td><code>502</code> 坏网关</td>
<td>代理服务器收到上游服务器的无效响应。重试请求。</p>
<p>响应代码 <code>502</code> 表示分配给您会话 ID 的 IP 已不可用。如果遇到这种错误，有两种方法可以解决。第一种是等待一分钟，系统会自动为你的会话 ID 分配一个新的 IP 地址。另一种方法是直接切换到新的会话 ID（即更改 sessid 参数），这样您就会收到一个新的 IP 地址。</td>
</tr>
<tr>
<td><code>522</code> 超时</td>
<td>代理服务器未及时收到上游服务器的响应。重试请求。</td>
</tr>
<tr>
<td><code>525</code> 未找到出口</td>
<td>自定义 HTTP 状态代码 - 这表示代理无法找到满足请求的退出节点。更改请求过滤参数或稍后再试。</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h3 id="backconnect-entry-ips">反向连接入口 IP</h3>
<p>如果您想使用自己的 backconnect 入口节点 DNS 名称，可以将您的子域/域指向我们的入口节点。为此，您需要添加一个 DNS <code>CNAME</code> 记录了 <code>pr.oxylabs.io</code> 作为目标。以下是这种设置在 Cloudflare DNS 管理器上的显示方式 <code>条目</code> 子域：</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8129" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Backconnect-Entry-IPs.jpg" alt="OxyLabs Residential Proxies Backconnect Entry IPs" width="878" height="85" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Backconnect-Entry-IPs.jpg 878w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Backconnect-Entry-IPs-300x29.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxies-Backconnect-Entry-IPs-768x74.jpg 768w" sizes="(max-width: 878px) 100vw, 878px" /></p>
<p>如需了解更多信息，请联系 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或您的客户经理。</p>
<hr />
<h3 id="restricted-urls">受限 URL</h3>
<p>为避免滥用和不明确的活动，我们的住宅代理网络限制访问某些网站。这些网站包括但不限于所有谷歌域名（包括 Play）、linkedin.com、sonyentertainmentnetwork.com、所有苹果域名（包括 iTunes）、netflix.com 等。如需了解更多信息，请通过以下方式联系我们的支持人员 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="public-api">公共应用程序接口</h2>
<p>要通过公共 API 管理代理用户，请参考以下文档 <a class="custom_link" href="https://residential-api.oxylabs.io/v1/docs#/" target="_blank" rel="nofollow noopener">OpenAPI 格式</a>.API 允许创建、删除和修改代理用户，设置其限制并查看当前使用情况，禁用和启用代理用户。</p>
<hr />
<h2 id="3rd-party-integrations">第三方集成</h2>
<p>请注意，访问时必须使用 HTTPS 协议。 <strong>中国入口节点</strong> 以便第三方工具正常工作。</p>
<h3 id="oxylabs-proxy-manager">Oxylabs 代理管理器</h3>
<p><a class="custom_link" href="https://chrome.google.com/webstore/detail/oxylabs-proxy-manager/infajoaodhhdogakhloedbppcbeajhoo" target="_blank" rel="nofollow noopener">Oxylabs 代理管理器</a> 是 Chrome 浏览器的代理管理扩展。它不仅是免费的，而且可以与您选择的任何代理提供商配合使用。无需通过设置和菜单选项即可启用代理。该扩展还有一个专为 Oxylabs 住宅代理服务器设计的附加功能，无需编辑用户名即可轻松更改 Oxylabs 住宅代理服务器会话。从 Chrome 网上商店下载扩展 <a class="custom_link" href="https://chrome.google.com/webstore/detail/oxylabs-proxy-manager/infajoaodhhdogakhloedbppcbeajhoo" target="_blank" rel="nofollow noopener">这里</a></p>
<ul>
<li>单击扩展图标打开应用程序</li>
<li>如果您还没有添加任何代理，您会看到 <code>添加新代理</code> 按钮。点击后继续。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8130" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager1.jpg" alt="OxyLabs Residential Proxy Manager1" width="426" height="422" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager1.jpg 426w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager1-300x297.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager1-150x150.jpg 150w" sizes="(max-width: 426px) 100vw, 426px" /></p>
<ul>
<li>添加代理配置文件。在 <strong>输入名称</strong>.进入 <code>pr.oxylabs.io</code> 作为 <strong>代理服务器 IP</strong> 和 <code>7777</code> 作为 <strong>港口</strong>.填写您的 <strong>用户名</strong> 和 <strong>密码</strong>.不要忘记添加 <code>顾客</code> 在您的用户名之前。最后，点击 <strong>保存更改</strong>.</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <code>us-pr.oxylabs.io</code> 根据 <strong>代理服务器 IP</strong> 和 <code>10001</code> 根据 <strong>港口</strong>, 您将收到带有粘性会话的 US 退出节点。</p>
<p>如果您已将自己的 IP 列为白名单，则可以跳过此步骤。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8131" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager2.png" alt="OxyLabs Residential Proxy Manager2" width="964" height="445" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager2.png 964w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager2-300x138.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager2-768x355.png 768w" sizes="(max-width: 964px) 100vw, 964px" /></p>
<ul>
<li>打开扩展，点击 <strong>连接</strong>.就是这样，您现在使用的是代理服务器。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8132" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager3.jpg" alt="OxyLabs Residential Proxy Manager3" width="420" height="366" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager3.jpg 420w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager3-300x261.jpg 300w" sizes="(max-width: 420px) 100vw, 420px" /></p>
<ul>
<li>Chrome 浏览器会缓存代理凭据，在许多代理管理扩展上，通过用户名字符串粘住会话是行不通的。如果使用会话的主入口节点 (<code>pr.oxylabs.io:7777</code>)，我们创建了一个特殊功能，可以更方便地轮换会话。首先，用 <code>sessid</code> 参数，就像这样：</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8133" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager4.jpg" alt="OxyLabs Residential Proxy Manager4" width="963" height="450" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager4.jpg 963w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager4-300x140.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager4-768x359.jpg 768w" sizes="(max-width: 963px) 100vw, 963px" /></p>
<ul>
<li>然后，打开扩展窗口。连接到代理后，你会看到一个新按钮--"......"。 <strong>刷新会议</strong>.点击它可更改会话 ID 并获取新的代理。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8134" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager5.jpg" alt="OxyLabs Residential Proxy Manager5" width="433" height="419" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager5.jpg 433w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Manager5-300x290.jpg 300w" sizes="(max-width: 433px) 100vw, 433px" /></p>
<hr />
<h3 id="switchyomega">SwitchyOmega</h3>
<p>SwitchyOmega 是一款功能强大、性能可靠的代理管理器，可与多种常用浏览器配合使用。首先，您需要获取插件。对于 Chrome 浏览器，请单击 <a class="custom_link" href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en" target="_blank" rel="nofollow noopener">这里</a>点击 <a class="custom_link" href="https://addons.mozilla.org/en-US/firefox/addon/switchyomega/" target="_blank" rel="nofollow noopener">这里</a>.安装完成后，您应该</p>
<ul>
<li>打开 Switchy Omega 选项。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8135" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega1.png" alt="OxyLabs Residential Proxy SwitchyOmega1" width="203" height="236" /></p>
<ul>
<li>点击 <strong>新资料...</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8136" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega2.jpg" alt="OxyLabs Residential Proxy SwitchyOmega2" width="594" height="555" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega2.jpg 594w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega2-300x280.jpg 300w" sizes="(max-width: 594px) 100vw, 594px" /></p>
<ul>
<li>为新的配置文件命名，选择 <strong>代理简介</strong> 类型，然后点击 <strong>创建</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8137" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega3.jpg" alt="OxyLabs Residential Proxy SwitchyOmega3" width="598" height="610" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega3.jpg 598w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega3-294x300.jpg 294w" sizes="(max-width: 598px) 100vw, 598px" /></p>
<ul>
<li>改变 <strong>规程</strong> 至 <strong>超文本传输协定</strong>.根据 <strong>服务器</strong> 进入我们的后连接入口节点 <code>pr.oxylabs.io</code>.根据 <strong>港口</strong> 增加 <code>7777</code></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8138" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega4.jpg" alt="OxyLabs Residential Proxy SwitchyOmega4" width="854" height="195" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega4.jpg 854w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega4-300x69.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega4-768x175.jpg 768w" sizes="(max-width: 854px) 100vw, 854px" /></p>
<ul>
<li>您还可以使用特定国家的条目。例如，如果您将 <code>us-pr.oxylabs.io</code> 根据 <strong>服务器</strong> 和 <code>10001</code> 根据 <strong>港口</strong>, 您将收到带有粘性会话的 US 退出节点。</li>
<li>接下来，点击右侧的锁定按钮。填写您的 <strong>用户名</strong> 和 <strong>密码</strong>.不要忘记添加 <code>顾客</code> 在您的用户名之前。最后，点击 <strong>保存更改</strong>.</li>
</ul>
<p>如果您已将自己的 IP 列入白名单，请跳过此步骤。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8139" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega5.jpg" alt="OxyLabs Residential Proxy SwitchyOmega5" width="599" height="266" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega5.jpg 599w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega5-300x133.jpg 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<ul>
<li>点击 <strong>应用更改</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8140" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega6.jpg" alt="OxyLabs Residential Proxy SwitchyOmega6" width="380" height="383" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega6.jpg 380w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega6-298x300.jpg 298w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega6-150x150.jpg 150w" sizes="(max-width: 380px) 100vw, 380px" /></p>
<ul>
<li>最后一步，点击 SwitchyOmega 图标，选择新配置的代理。现在就可以开始了！</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8141" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-SwitchyOmega7.jpg" alt="OxyLabs Residential Proxy SwitchyOmega7" width="209" height="256" /></p>
<hr />
<h3 id="shadowrocket">暗影火箭</h3>
<p>如果您想在 Shadowrocket 上使用我们的住宅代理，只需按照下面的说明操作即可。</p>
<ul>
<li>打开 Shadowrocket 应用程序。</li>
<li>点击 <strong>添加服务器</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8143" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket1.png" alt="OxyLabs Residential Proxy Shadowrocket1" width="296" height="341" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket1.png 296w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket1-260x300.png 260w" sizes="(max-width: 296px) 100vw, 296px" /></p>
<ul>
<li>在以下窗口中点击 <strong>类型</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8144" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket2.png" alt="OxyLabs Residential Proxy Shadowrocket2" width="297" height="415" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket2.png 297w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket2-215x300.png 215w" sizes="(max-width: 297px) 100vw, 297px" /></p>
<ul>
<li>选择 <strong>超文本传输协定</strong> 并返回上一屏幕。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8145" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket3.png" alt="OxyLabs Residential Proxy Shadowrocket3" width="292" height="440" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket3.png 292w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket3-199x300.png 199w" sizes="(max-width: 292px) 100vw, 292px" /></p>
<ul>
<li>输入代理和身份验证信息。在 <strong>主持人</strong> 键入 <code>pr.oxylabs.io</code>. <strong>港口</strong> 是 <code>7777</code> 以使用我们的后台连接入口。请不要忘记您的以下证书 <strong>用户</strong> 和 <strong>密码</strong>.不要忘记添加 <code>顾客</code> 在您指定的用户名之前。完成后，按 "返回 "箭头返回上一屏幕。</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <code>us-pr.oxylabs.io</code> 根据 <strong>主持人</strong> 和 <code>10001</code> 根据 <strong>港口</strong>，您将收到带有粘性会话的 US 退出节点。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8146" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket4.png" alt="OxyLabs Residential Proxy Shadowrocket4" width="297" height="448" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket4.png 297w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket4-199x300.png 199w" sizes="(max-width: 297px) 100vw, 297px" /></p>
<ul>
<li>您需要打开代理。方法是激活 <strong>未连接</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8147" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket5.png" alt="OxyLabs Residential Proxy Shadowrocket5" width="301" height="344" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket5.png 301w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket5-263x300.png 263w" sizes="(max-width: 301px) 100vw, 301px" /></p>
<ul>
<li>如果这是您第一次使用 Shadowrocket，您会收到 iOS 提示，要求将 Shadowrocket 添加到 VPN 配置中。点击 <strong>添加</strong>.您需要输入 iPhone 密码进行确认。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8148" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket6.png" alt="OxyLabs Residential Proxy Shadowrocket6" width="296" height="413" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket6.png 296w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket6-215x300.png 215w" sizes="(max-width: 296px) 100vw, 296px" /></p>
<ul>
<li>就是这样。应用程序顶部的切换按钮现在应该已经激活。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8149" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket7.png" alt="OxyLabs Residential Proxy Shadowrocket7" width="298" height="324" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket7.png 298w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket7-276x300.png 276w" sizes="(max-width: 298px) 100vw, 298px" /></p>
<ul>
<li>您可以通过访问 <strong>icanhazip.com</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8150" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket8.png" alt="OxyLabs Residential Proxy Shadowrocket8" width="298" height="311" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket8.png 298w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Shadowrocket8-287x300.png 287w" sizes="(max-width: 298px) 100vw, 298px" /></p>
<hr />
<h3 id="proxifier">Proxifier</h3>
<p>如果您想将我们的住宅代理服务器与 Proxfier 一起使用，只需按照以下说明操作即可。</p>
<ul>
<li>打开 Proxifier 应用程序。</li>
<li>添加代理。点击 <strong>代理 (1)</strong>.点击 <strong>添加(2)</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8151" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier1.png" alt="OxyLabs Residential Proxy Proxifier1" width="596" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier1.png 596w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier1-300x252.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></p>
<ul>
<li>在以下窗口中输入所需信息。 <strong>地址(1)</strong>即 <code>pr.oxylabs.io</code>, <strong>端口(2)</strong> 即 <code>7777</code>选择 <strong>HTTPS(3)</strong> 协议。在身份验证框中点击 <strong>启用(4)</strong> 并输入所提供的 <strong>用户名(5)</strong> 和 <strong>密码(6)</strong>.不要忘记添加 <code>顾客</code> 在用户名开头。如果您已将设备列入白名单，请不要点击 <strong>启用</strong>，您的身份验证无需用户名/密码。如果您愿意，可以启用 <strong>显示为网络浏览器</strong> 选项。点击 <strong>好的</strong>.</li>
<li>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>地址(1)* 和 **10001</strong> 根据 <strong>端口(2)</strong>, 您将收到带有粘性会话的 US 退出节点。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8152" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier2.jpg" alt="OxyLabs Residential Proxy Proxifier2" width="479" height="499" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier2.jpg 479w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier2-288x300.jpg 288w" sizes="(max-width: 479px) 100vw, 479px" /></p>
<ul>
<li>您将看到一个窗口，询问 <strong>如果希望 Proxifier 默认使用该代理</strong>?这意味着该设置将适用于您的所有浏览器。这取决于您的决定。如果您选择 <strong>是</strong>即可完成设置。如果您希望在特定浏览器上使用代理，请按照以下步骤操作。</li>
<li>点击 <strong>规则(1)</strong> 然后点击 <strong>添加...(2)</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8153" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier3.jpg" alt="OxyLabs Residential Proxy Proxifier3" width="851" height="464" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier3.jpg 851w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier3-300x164.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier3-768x419.jpg 768w" sizes="(max-width: 851px) 100vw, 851px" /></p>
<ul>
<li>点击 <strong>+(1)</strong> 按钮添加要使用代理设置的应用程序。选择要使用这些代理设置的浏览器，然后点击它。最后，您必须更改 <strong>行动(2)</strong>.单击它并选择您创建的代理。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8154" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier4.png" alt="OxyLabs Residential Proxy Proxifier4" width="538" height="546" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier4.png 538w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Proxifier4-296x300.png 296w" sizes="(max-width: 538px) 100vw, 538px" /></p>
<ul>
<li>这样，您在使用 Proxifier 规则中定义的浏览器时，所有请求都将通过代理完成。</li>
</ul>
<hr />
<h3 id="multilogin">多重登录</h3>
<p>我们的代理还可与 Multilogin 应用程序配合使用。设置非常简单，只需按照以下说明操作即可。</p>
<ul>
<li>开放 <strong>多重登录</strong> 应用程序</li>
<li>添加代理。点击 <strong>创建新的</strong> 浏览器配置文件下。</li>
<li>在以下窗口中输入 <strong>浏览器配置文件名称</strong> （例如 <strong>Oxylabs</strong>).然后点击 <strong>编辑代理设置</strong>.</li>
<li>选择 <strong>HTTP 代理</strong> 作为 <strong>连接类型</strong>.现在填写所需的详细信息： 下 <strong>新地址</strong> 和 <strong>港口</strong> 镶嵌 <code>pr.oxylabs.io</code> 和 <code>7777</code>.根据 <strong>登录</strong> 输入您的用户名，然后 <strong>密码</strong>.不要忘记添加 <code>顾客</code> 在用户名开头。如果您已将设备列入白名单，则无需提供登录凭证。</li>
<li>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>新地址</strong> 和 <strong>10001</strong> 根据 <strong>港口</strong>，您将收到带有粘性会话的 US 退出节点。</li>
<li>点击 <strong>检查代理</strong>.如果一切正常，您应该会收到回复，显示 <strong>外部 IP</strong>.</li>
<li>点击 <strong>创建个人资料</strong>.</li>
<li>就这样，你可以走了。</li>
</ul>
<hr />
<h3 id="postern">邮政</h3>
<p>Postern 是一款非常受欢迎的 Android 代理/VPN 管理应用程序。你可以在 <a class="custom_link" href="https://play.google.com/store/apps/details?id=com.tunnelworkshop.postern&hl=en" target="_blank" rel="nofollow noopener">Google Play 商店</a>.以下是如何在 Postern 上配置住宅代理的分步指南：</p>
<ul>
<li>打开应用程序。</li>
<li>点击 <strong>添加代理</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8156" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern1.png" alt="OxyLabs Residential Proxy Postern1" width="348" height="350" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern1.png 348w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern1-298x300.png 298w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern1-150x150.png 150w" sizes="(max-width: 348px) 100vw, 348px" /></p>
<ul>
<li>在以下窗口中输入所需的代理信息。 <strong>服务器名称</strong> 是 <strong>Oxylabs</strong>, <strong>服务器地址</strong> 是 <strong>pr.oxylabs.io</strong>.根据 <strong>服务器端口</strong> 走进 <strong>7777</strong>.点击 <strong>服务器类型</strong> 并选择 <strong>https/http 连接</strong>.然后在 <strong>用户名</strong> 和 <strong>密码</strong>.为此，您必须键入 <strong>顾客</strong> 在输入用户名之前，例如 <strong>用户名</strong>.最后，点击 <strong>节省</strong>.</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>服务器地址</strong> 和 <strong>10001</strong> 根据 <strong>服务器端口</strong>您将收到带有粘性会话的美国退出节点。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8157" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern2.png" alt="OxyLabs Residential Proxy Postern2" width="351" height="611" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern2.png 351w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern2-172x300.png 172w" sizes="(max-width: 351px) 100vw, 351px" /></p>
<ul>
<li>现在，打开应用程序菜单并转到 <strong>规则</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8158" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern3.png" alt="OxyLabs Residential Proxy Postern3" width="348" height="496" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern3.png 348w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern3-210x300.png 210w" sizes="(max-width: 348px) 100vw, 348px" /></p>
<ul>
<li>点击 <strong>添加规则</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8159" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern4.png" alt="OxyLabs Residential Proxy Postern4" width="346" height="405" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern4.png 346w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern4-256x300.png 256w" sizes="(max-width: 346px) 100vw, 346px" /></p>
<ul>
<li>根据 <strong>匹配方法</strong> 遴选 <strong>全部匹配</strong>.选择 <strong>代理/隧道</strong> 作为 <strong>规则</strong>. <strong>代理/代理组</strong> 应自动填充 <strong>Oxylabs - pr.oxylabs.io:7777″</strong>.点击 <strong>节省</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8160" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern5.png" alt="OxyLabs Residential Proxy Postern5" width="348" height="457" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern5.png 348w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern5-228x300.png 228w" sizes="(max-width: 348px) 100vw, 348px" /></p>
<ul>
<li>现在，你需要打开 VPN。打开应用程序菜单，点击 <strong>关闭 VPN</strong> 来激活连接。这样，您就可以使用代理了。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8161" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern6.png" alt="OxyLabs Residential Proxy Postern6" width="346" height="499" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern6.png 346w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Postern6-208x300.png 208w" sizes="(max-width: 346px) 100vw, 346px" /></p>
<h4></h4>
<hr />
<h3 id="gologin">登录</h3>
<p>GoLogin 是一款适用于 Windows、Linux 和 Mac OS 的多登录浏览器管理应用程序。从其官方网站获取 <a class="custom_link" href="https://gologin.app/" target="_blank" rel="nofollow noopener">这里</a>.以下是如何在 Windows 版 GoLogin 上配置住宅代理的分步指南：</p>
<ul>
<li>打开应用程序。</li>
<li>点击 <strong>创建您的第一份个人档案</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8164" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin1.png" alt="OxyLabs Residential Proxy GoLogin1" width="915" height="275" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin1.png 915w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin1-300x90.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin1-768x231.png 768w" sizes="(max-width: 915px) 100vw, 915px" /></p>
<ul>
<li>在下面的窗口中输入所需的代理信息。在 <strong>简介名称</strong> 写道 <strong>Oxylabs</strong>.接下来，选择 <strong>连接类型</strong> 作为 <strong>HTTP 代理服务器</strong>.根据 <strong>代理主机和端口</strong> 走进 <strong>pr.oxylabs.io</strong> 和 <strong>7777</strong>.然后在 <strong>用户名</strong> 和 <strong>密码</strong>.最后，点击 <strong>创建简介</strong>.</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 和 <strong>10001</strong> 根据 <strong>代理主机和端口</strong>，您将收到带有粘性会话的美国退出节点。要充分利用所有可用的住宅代理服务器功能，如 <a href="#session-control">会议</a> 和 <a href="#select-country">国家</a>, <a href="#select-state">国</a>, <a href="#select-city">城市</a> 请参阅文档中的相应章节。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8165" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin2.png" alt="OxyLabs Residential Proxy GoLogin2" width="574" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin2.png 574w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin2-300x261.png 300w" sizes="(max-width: 574px) 100vw, 574px" /></p>
<ul>
<li>一切就绪，现在只需点击 <strong>运行</strong> 并等待浏览器加载。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8166" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin3.png" alt="OxyLabs Residential Proxy GoLogin3" width="915" height="344" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin3.png 915w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin3-300x113.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin3-768x289.png 768w" sizes="(max-width: 915px) 100vw, 915px" /></p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>如果一切正常，网站 http://myip.gologin.app 将打开并显示 IP 信息。</li>
</ul>
</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8167" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin4.png" alt="OxyLabs Residential Proxy GoLogin4" width="692" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin4.png 692w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-GoLogin4-300x217.png 300w" sizes="(max-width: 692px) 100vw, 692px" /></p>
<hr />
<h3 id="kameleo">Kameleo</h3>
<p>Kameleo 是一款适用于 Windows 和 Android 的多登录浏览器管理应用程序。在其官方网站上获取 <a class="custom_link" href="https://kameleo.io/downloads/" target="_blank" rel="nofollow noopener">这里</a>.以下是如何在 Windows 版 Kameleo 上配置住宅代理的分步指南：</p>
<ul>
<li>打开应用程序。</li>
<li>点击 <strong>应用程序设置</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8168" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo1.png" alt="OxyLabs Residential Proxy Kameleo1" width="605" height="400" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo1.png 605w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo1-300x198.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<ul>
<li>在以下窗口中输入所需的代理信息 <strong>全局代理设置</strong>.对于 <strong>上游代理类型</strong> 选择 <strong>Http</strong>.接下来，填写 <strong>代理 IP 或主机名</strong> 与 <strong>pr.oxylabs.io</strong>.根据 <strong>代理端口</strong> 走进 <strong>7777</strong>.最后，在 <strong>用户名</strong> 和 <strong>密码</strong>.关闭窗口保存设置。</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>代理 IP 或主机名</strong> 和 <strong>10001</strong> 根据 <strong>代理端口</strong>您将收到带有粘性会话的美国退出节点。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8169" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo2.png" alt="OxyLabs Residential Proxy Kameleo2" width="606" height="339" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo2.png 606w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Kameleo2-300x168.png 300w" sizes="(max-width: 606px) 100vw, 606px" /></p>
<ul>
<li>就这样，您就可以开始了。创建一个 <strong>新简介</strong> 或点击 <strong>快速简介</strong> 来启动浏览器，现在浏览器已启用代理。</li>
</ul>
<hr />
<h3 id="clonbrowser">克隆浏览器</h3>
<p>ClonBrowser 是另一款适用于 Windows 和 Mac 的多登录浏览器管理应用程序。从其官方网站获取 <a class="custom_link" href="https://www.clonbrowser.com/download" target="_blank" rel="nofollow noopener">这里</a>.以下是如何在 Windows 版 ClonBrowser 上配置住宅代理的分步指南：</p>
<ul>
<li>打开应用程序。</li>
<li>点击 <strong>创建新的浏览器配置文件</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8170" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser1.jpg" alt="OxyLabs Residential Proxy ClonBrowser1" width="783" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser1.jpg 783w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser1-300x192.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser1-768x490.jpg 768w" sizes="(max-width: 783px) 100vw, 783px" /></p>
<ul>
<li>点击 <strong>设置</strong> 邻接 <strong>代理设置</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8171" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser2.png" alt="OxyLabs Residential Proxy ClonBrowser2" width="715" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser2.png 715w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser2-300x210.png 300w" sizes="(max-width: 715px) 100vw, 715px" /></p>
<ul>
<li>在下面的窗口中选择 <strong>Http</strong> 作为 <strong>连接类型</strong>.根据 <strong>IP 或主机</strong> 走进 <strong>pr.oxylabs.io</strong>.填写 <strong>7777</strong> 对于 <strong>港口</strong>.最后，在 <strong>用户名</strong> 于 <strong>用户名</strong> 格式和 <strong>密码</strong>.</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>代理 IP 或主机名</strong> 和 <strong>10001</strong> 根据 <strong>代理端口</strong>您将收到带有粘性会话的美国退出节点。</p>
<p>您可以点击 <strong>连接测试</strong>.如果一切正常，点击 <strong>创建个人资料</strong>.</p>
<ul>
<li>仅此而已，现在您可以点击 <strong>开始</strong> 根据 <strong>选项</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8172" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser3.png" alt="OxyLabs Residential Proxy ClonBrowser3" width="858" height="236" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser3.png 956w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser3-300x83.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-ClonBrowser3-768x211.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></p>
<hr />
<h3 id="adspower">AdsPower</h3>
<p>AdsPower 是一款适用于 Windows 和 Mac 的多登录浏览器管理应用程序。你可以在其官方网站上获取 <a class="custom_link" href="https://www.adspower.net/?code=fmtc1m&source=oxylabs" target="_blank" rel="nofollow noopener">这里</a>.以下是如何在 AdsPower for Windows 上配置住宅代理的分步指南：</p>
<ul>
<li>打开应用程序。</li>
<li>点击 <strong>上传。</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8173" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower1.png" alt="OxyLabs Residential Proxy AdsPower1" width="258" height="191" /></p>
<ul>
<li>根据 <strong>代理类型</strong> 选择 <strong>http</strong>.现在填写下表。输入 <strong>pr.oxylabs.io</strong> 对于 <strong>代理主机</strong> 和 <strong>7777</strong> 对于 <strong>代理端口</strong>.输入登录凭证 <strong>用户名</strong> 根据 <strong>代理用户</strong> 和您的 <strong>暗号</strong> 对于 <strong>密码</strong>.</li>
</ul>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据 <strong>代理主机</strong> 和 <strong>10001</strong> 下<em>代理端口</em>, 您将收到带有粘性会话的 US 退出节点。</p>
<p>您可以点击 <strong>检查代理</strong>.如果一切正常，点击 <strong>创建个人资料</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8174" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower2.png" alt="OxyLabs Residential Proxy AdsPower2" width="689" height="393" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower2.png 689w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower2-300x171.png 300w" sizes="(max-width: 689px) 100vw, 689px" /></p>
<ul>
<li>就这样，您现在可以通过点击 <strong>开放</strong> 根据 <strong>账户管理</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8175" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower3.png" alt="OxyLabs Residential Proxy AdsPower3" width="564" height="250" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower3.png 564w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-AdsPower3-300x133.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></p>
<hr />
<h3 id="vmlogin">VML 登录</h3>
<p>虚拟多重登录（或 VMLogin）是一种用于创建虚拟浏览器配置文件的工具，可帮助控制浏览器指纹、设置业务工作流和开发网络自动化等。要将 VMLogin 与 Oxylabs 住宅代理一起使用，请下载最新版本的 VMLogin <a class="custom_link" href="https://vmlogin.us/download.html" target="_blank" rel="nofollow noopener">这里</a>.</p>
<ul>
<li>启动 VMLogin 并创建新的浏览器配置文件。您可以点击 <strong>获取随机配置文件</strong> (1) 或选择您的设置。</li>
<li>点击 <strong>设置代理服务器</strong> (2)</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8177" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin1.png" alt="OxyLabs Residential Proxy VMLogin1" width="675" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin1.png 675w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin1-300x222.png 300w" sizes="(max-width: 675px) 100vw, 675px" /></p>
<ul>
<li>创建新的住宅代理用户。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8178" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin2.png" alt="OxyLabs Residential Proxy VMLogin2" width="815" height="317" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin2.png 961w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin2-300x117.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin2-768x299.png 768w" sizes="(max-width: 815px) 100vw, 815px" /></p>
<ul>
<li>点击 <strong>设置代理服务器</strong> 并选择 <strong>HTTP 代理服务器</strong> 作为连接类型。在 IP 或主机下输入 <strong>pr.oxylabs.io</strong>.填写 <strong>7777</strong> 对于 <strong>港口</strong>.最后，在 <strong>用户名</strong> (客户用户名格式）和 <strong>密码</strong>.您可以点击 <strong>测试代理</strong>.如果一切正常，请保存配置文件并启动浏览器。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8179" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin3.png" alt="OxyLabs Residential Proxy VMLogin3" width="686" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin3.png 686w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin3-300x219.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></p>
<ul>
<li>您还可以使用特定国家的条目。例如，如果您将 <strong>us-pr.oxylabs.io</strong> 根据代理 <strong>IP 地址</strong> 和 <strong>10001</strong> 根据代理 <strong>港口</strong>您将收到一个带有粘性会话的 US 退出节点。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8180" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin4.png" alt="OxyLabs Residential Proxy VMLogin4" width="714" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin4.png 714w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-VMLogin4-300x210.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></p>
<ul>
<li>至此，您就可以使用 VMLogin 的住宅代理了。</li>
</ul>
<hr />
<h3 id="undetectable">检测不到</h3>
<p>首先，您需要获得 "无法检测 "功能。为此，只需前往 <a class="custom_link" href="https://undetectable.io/" target="_blank" rel="nofollow noopener">undetectable.io</a>注册并下载浏览器。</p>
<p>然后，打开应用程序，点击 "+"创建新的个人资料。</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8181" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable1.png" alt="OxyLabs Residential Proxy Undetectable1" width="679" height="456" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable1.png 745w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable1-300x201.png 300w" sizes="(max-width: 679px) 100vw, 679px" /></p>
<p>在下面的窗口中，在 <em>新简介</em>输入新的配置文件名称。选择网站识别浏览器的设置（操作系统、浏览器、配置和屏幕）。</p>
<p>此外，您还可以选择主要语言和附加语言，而地理位置将由您的代理决定。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8182" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable2.png" alt="OxyLabs Residential Proxy Undetectable2" width="749" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable2.png 749w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable2-300x200.png 300w" sizes="(max-width: 749px) 100vw, 749px" /></p>
<p>前往 <em>目的</em> 选项卡，并选择 <em>"新代理"</em> 选项。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8183" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable3.png" alt="OxyLabs Residential Proxy Undetectable3" width="747" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable3.png 747w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable3-300x201.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></p>
<p>您可以选择 SOCKS5 或 HTTP（选择 HTTP 代理作为连接类型）。现在填写代理和身份验证详细信息：键入 <strong>pr.oxylabs.io</strong> 供主机使用 <strong>7777</strong> 对于 <em>港口</em>.在 <em>登录</em> 和 <em>密码</em> 空格。不要忘记在用户名开头添加 customer-。如果您已将设备列入白名单，则无需提供登录凭证。</p>
<p>您还可以使用特定国家的条目。例如，如果您将 <strong>us- pr.oxylabs.io</strong> 根据 <em>主持人</em> 和 <strong>10001</strong> 端口下，您将收到带有粘性会话的 US 退出节点。请查看我们的 <a href="#country-specific-entry-nodes">国家特定入口节点完整列表</a>.</p>
<p>点击 <em>检查</em> 按钮。如果一切正常，您应该会收到一个显示外部 IP 的回复。按保存代理按钮确认更改。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8184" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable4.png" alt="OxyLabs Residential Proxy Undetectable4" width="750" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable4.png 750w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable4-300x200.png 300w" sizes="(max-width: 750px) 100vw, 750px" /></p>
<p>现在按 <em>节省</em> 按钮，就会看到它出现在左侧菜单中。只需点击即可轻松编辑您的个人资料。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8185" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable5.png" alt="OxyLabs Residential Proxy Undetectable5" width="748" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable5.png 748w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Residential-Proxy-Undetectable5-300x201.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></p>
<p>就是这样！您已成功使用 Undetectable.io 设置了代理服务器。</p>
<hr />
<h3 id="puppeteer">木偶师</h3>
<p>在开始使用 Puppeteer 之前，你需要安装一些基本工具：Node.js 和你选择的代码编辑器。然后，创建一个 Node.js 项目并安装所需的软件包。关于如何安装和运行 Puppeteer，您可以在我们的 <a href="https://oxylabs.io/blog/puppeteer-tutorial" target="_blank" rel="nofollow noopener">博文</a>.</p>
<p>一切就绪后，我们就可以进入下一部分--Oxylabs 住宅代理与 Puppeteer 的集成。</p>
<ul>
<li>例如，在 Puppeteer 中填写数值：</li>
</ul>
<p><code>pr.oxylabs.io:7777</code></p>
<ul>
<li>在 "page.authenticate "下的 "username "值中输入您的 Oxylabs 代理子用户用户名和密码。</li>
<li>代码示例如下</li>
</ul>
<pre>const puppeteer = require('puppeteer')；
(async () =&gt; {
  const browser = await puppeteer.launch({
    headless: false、
    args: ['--代理服务器=pr.oxylabs.io:7777］
});
  const page = await browser.newPage()；
    await page.authenticate({
        username: 'USERNAME'、
        password: 'PASSWORD
    });
    await page.goto('https://ip.oxylabs.io')；
    await page.screenshot({path: 'example.png'})；
    await browser.close()；
})();
</pre>
<p>您还可以使用特定国家的条目。例如，如果您将 <code>us-pr.oxylabs.io</code> 下的 "主机 "和 <code>10001</code> 端口 "下，您将收到一个带有粘性会话的 US 退出节点。请查看我们的 <a href="#quick-start">文献资料</a> 获取特定国家/地区入口节点的完整列表。</p>
<p>就是这样！您已成功将 Oxylabs 住宅代理与 Puppeteer 集成。</p>
<hr />
<h4>参考资料</h4>
<p><a href="https://docs.oxylabs.io/residential/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/residential/index.html</a></p>
<hr />
<blockquote><p><strong>免责声明</strong>:这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-residential-proxies/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7621</post-id>	</item>
		<item>
		<title>How to Use OxyLabs Proxy [Part 1]: OxyLabs Datacenter Proxies Manual</title>
		<link>https://proxysp.com/zh/oxylabs-datacenter-proxies/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-datacenter-proxies</link>
					<comments>https://proxysp.com/zh/oxylabs-datacenter-proxies/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7589</guid>

					<description><![CDATA[想使用 OxyLabs 的数据中心代理？那就不能错过这篇文章。它是最全面的 OxyLabs 数据中心代理用户指南。快速入门 在我们 ...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-datacenter-proxies/"> <span class="screen-reader-text">如何使用 OxyLabs 代理服务器 [第 1 部分]：OxyLabs 数据中心代理手册</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>想使用 OxyLabs 的数据中心代理？那就不能错过这篇文章。它是最全面的 OxyLabs 数据中心代理用户指南。</p></blockquote>
<h2>快速入门</h2>
<p>在我们开始之前，请确保您已从销售代表、专用客户经理或支持团队处收到用户名、密码和链接到您 IP 列表的所有 URL。</p>
<p>有两种方法可以访问 IP 列表。您可以通过浏览器直接访问 IP 列表，打开您收到的 URL（例如： <code>https://proxy.oxylabs.io/all</code>).然后会要求您输入登录凭证（HTTP Basic Auth）。</p>
<p>或者，您也可以通过对收到的 URL 发出 GET 请求（例如 <code>https://proxy.oxylabs.io/all</code>).不要忘记更换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<div class="inside-code">
<pre>卷曲 <span class="nt">-u</span> <span class="s2">"用户名:密码"</span> https://proxy.oxylabs.io/all</pre>
<p><span style="font-size: 16px;">要使用代理进行请求，你需要从获取的列表中选择一个 IP 地址，并在请求参数中指定它。下面是一个 cURL 示例。您还可以找到更多其他语言的代码示例 </span><a href="#making-requests">这里</a> <span style="font-size: 16px;">或</span><span style="font-size: 16px;"> 我们的 </span><a class="custom_link" style="font-size: 16px; background-color: #ffffff;" href="https://github.com/oxylabs/product-integrations/tree/master/datacenter-proxies" target="_blank" rel="nofollow noopener">GitHub</a>.</p>
</div>
<div class="inside-code">
<pre>卷曲 <span class="nt">-x</span> 1.2.3.4:60000 <span class="nt">-U</span> <span class="s2">"用户名:密码"</span> http://ip.oxylabs.io</pre>
<p><span style="font-size: 16px;">如果有任何本文档未涉及的问题，请联系您的专职客户经理或我们的支持人员，电话号码是 </span><a class="custom_link" style="font-size: 16px; background-color: #ffffff;" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a><span style="font-size: 16px;">.</span></p>
</div>
<hr />
<h2>代理列表</h2>
<hr />
<h3>基础</h3>
<p>您的专用账户经理或我们的支持人员会向您提供代理列表的 URL，该 URL 应如下所示：</p>
<pre>https://proxy.oxylabs.io/key/a27c5343ce4c4637a85a9297ddf1cace</pre>
<p>只需在浏览器（或任何其他首选软件）中打开此 URL 即可。然后会要求您输入登录凭证（HTTP Basic Auth）：</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8075" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxy-Authentication-Required.jpg" alt="OxyLabs Proxy Authentication Required" width="358" height="238" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxy-Authentication-Required.jpg 358w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxy-Authentication-Required-300x199.jpg 300w" sizes="(max-width: 358px) 100vw, 358px" /></p>
<p>完成此操作后，代理列表将以纯文本形式显示。</p>
<p>如果您有多个列表，并希望获得分配给您账户的所有 IP，可以使用此 URL：</p>
<pre>https://proxy.oxylabs.io/all</pre>
<p>还可以包括 <code>显示国家</code> 或 <code>显示城市</code> 来获取 IP 及其对应位置。</p>
<hr />
<h3>RESTful</h3>
<h4 id="showing-all-available-proxy-lists">显示所有可用的代理列表</h4>
<p>通过该端点，您可以检索属于您用户的代理列表：</p>
<div class="endpoint">
<pre class="endpoint-body">GET https://api.oxylabs.io/v1/proxies/lists</pre>
</div>
<pre>curl -U username:password "https://api.oxylabs.io/v1/proxies/lists"
</pre>
<p><strong>输出示例</strong></p>
<pre class="highlight json tab-json">[
{
"uuid"："123e4567-e89b-12d3-a456-426655440000",
"key"："12345678",
"updated_timestamp"："2016-09-28T13:03:50+0300",
"ips_count"：2000,
"href"："http://api.oxylabs.io/v1/proxies/lists/123e4567-e89b-12d3-a456-426655440000"
}
]</pre>
<hr />
<h4>检索特定代理列表</h4>
<p>通过该端点，您可以检索特定的代理列表：</p>
<pre class="endpoint-body">GET https://api.oxylabs.io/v1/proxies/lists/{uuid}</pre>
<p>请求参数：<br />
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>参数</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>uuid</code></td>
<td>要检索的代理列表的 uuid</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -u username:password "https://api.oxylabs.io/v1/proxies/lists/{uuid}"
</pre>
<p><strong>输出示例</strong></p>
<pre>[
{
"ip"："127.0.0.1",
端口"60000",
"country"："美国"
},
{
"IP"："127.0.0.2",
"端口"："60000",
"country"："GB
}
]</pre>
<hr />
<h2 id="making-requests">提出要求</h2>
<p>默认情况下，Oxylabs 代理服务器和 Proxy Rotator 使用基本的 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">HTTP 验证</a> 需要您提供用户名和密码。您可以通过以下方式联系您的专用账户经理或我们的支持团队获取您的证书 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<p>我们还支持基于白名单 IP 地址的身份验证。请参见 <a href="#whitelisting-ips">白名单 IP</a>.</p>
<p>根据您的身份验证方法，您可能需要更改代理端口：</p>
<p><strong>目的</strong></p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>港口</th>
<th>使用方法</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>60000</code></td>
<td>当使用登录凭证（用户名和密码）时，需要与代理一起使用。该端口用于代理 <a href="#proxy-rotator">代理旋转器 </a>在使用登录凭证和白名单 IP 时也是如此。</td>
</tr>
<tr>
<td><code>65432</code></td>
<td>通过白名单 IP 进行授权时，需要使用代理服务器</td>
</tr>
</tbody>
</table>
</div>
<p>如果您想通过用户/通行证验证方法使用数据中心代理：</p>
<pre>curl -x 1.2.3.4:60000 -U user1:pass1 http://ip.oxylabs.io</pre>
<p>如果要通过白名单 IP 验证方法使用数据中心代理：</p>
<pre>curl -x 1.2.3.4:65432 http://ip.oxylabs.io</pre>
<hr />
<h2 id="whitelisting-ips">白名单 IP</h2>
<h3 id="dashboard">仪表板</h3>
<p>我们还支持基于 IP 地址的验证。如果您直接使用代理服务器（不使用代理服务器 <a class="custom_link" href="#proxy-rotator">代理旋转器</a>)，你可以自己将 IP 列入白名单。只需登录 <a class="custom_link" href="https://stats.oxylabs.io/" target="_blank" rel="nofollow noopener">https://stats.oxylabs.io</a> 并在底部侧边栏看到一个名为 "添加白名单 "的部分。点击链接后，您将进入自我白名单页面，如下所示：</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8076" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Whitelisting-IPs.png" alt="OxyLabs Whitelisting IPs" width="607" height="195" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Whitelisting-IPs.png 607w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Whitelisting-IPs-300x96.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></p>
<h2></h2>
<p>在这里，您可以管理白名单 IP，并使用这些 IP 访问代理服务器。您可以将单个 IP 和最多 24 个子网列入白名单。如果您想将更大的子网列入白名单，请通过以下方式联系您的专用账户经理或支持团队 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<p>如果使用代理 <a class="custom_link" href="#proxy-rotator">代理旋转器</a> 或 <a href="https://www.proxysp.com/socks-proxy/" target="_blank" rel="noopener">SOCKS 代理服务器</a>您不能自行将 IP 地址列入白名单。相反，您必须向我们提供您希望用于连接代理服务器的 IP 地址列表。我们将把它们列入白名单（添加到防火墙例外规则中）。这样，您就可以在没有登录凭证的情况下访问代理服务器了。</p>
<p>请注意，如果您使用白名单 IP 访问代理，则需要使用端口 <code>65432</code>.代理 <a class="custom_link" href="#proxy-rotator">代理旋转器</a>端口保持 <code>60000</code>.</p>
<hr />
<h3 id="restful-2">RESTful</h3>
<p>您也可以直接向我们的端点发送查询，将 IP 列入白名单。请注意，确认白名单 IP 列表的任何更改都需要 5 分钟的冷却时间。</p>
<h4 id="getting-whitelisted-ips-list">获取白名单 IP 列表</h4>
<pre>GET https://api.oxylabs.io/v1/whitelisted_ips</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>200</code></td>
<td>成功。响应体包含所有当前列入白名单的 IP 及其 ID。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -U username:password "https://api.oxylabs.io/v1/whitelisted_ips"</pre>
<p>输出示例</p>
<pre>{
"数据"：[
{
"id"：9765,
"address"："127.0.0.1"
},
{
"id"：9766,
"address"："127.0.0.2"
}
]
}</pre>
<hr />
<h4 id="adding-a-whitelisted-ip">添加白名单 IP</h4>
<pre>邮寄 https://api.oxylabs.io/v1/whitelisted_ips</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>201</code></td>
<td>成功。IP 地址已添加到列表中。响应体包含新添加的 <code>地址</code> 和 <code>本我</code>.</td>
</tr>
<tr>
<td><code>422</code></td>
<td>错误。请求正文包含无效 IP 地址。响应体包含错误信息。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -X POST -u username:password "https://api.oxylabs.io/v1/whitelisted_ips"
--header "Content-Type: application/json" --data '{"address"："127.0.0.1"}'</pre>
<pre>{
"错误"：{
"message"："This is not a valid IP address."、
"code"：422
}
}</pre>
<p>输出示例</p>
<pre>{
"id"：9767,
"address"："127.0.0.1"
}</pre>
<hr />
<h4 id="removing-a-whitelisted-ip">删除白名单 IP</h4>
<pre>DELETE https://api.oxylabs.io/v1/whitelisted_ips/{id}</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>参数</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>本我</code></td>
<td>"(《世界人权宣言》) <code>本我</code> 您要删除的 IP 地址（可从 GET 白名单 IP 端点获取）</td>
</tr>
</tbody>
</table>
</div>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th>  说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>成功。IP 地址已从列表中删除。响应体为空。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>错误。请求包含无效的 <code>本我</code>.响应体包含错误信息 "拒绝访问"。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -X DELETE -u username:password "https://api.oxylabs.io/v1/whitelisted_ips/{id}"</pre>
<hr />
<h4 id="saving-changes-5min-cooldown">保存变化（5 分钟冷却时间）</h4>
<pre>邮寄 https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>202</code></td>
<td>成功。已确认对白名单 IP 列表的更改。响应正文为空。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>错误。更改尚未确认，端点处于 5 分钟冷却状态。响应体包含错误信息 "您已超过端点的速率限制。请稍后再试"。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -X POST -u username:password "https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers"</pre>
<hr />
<h2>数据中心代理 API</h2>
<h3 id="replacing-subnet-ips">替换子网 IP</h3>
<pre>POST https://api.oxylabs.io/v1/proxy-list/rest/proxy-lists/{PROXY_LIST_UUID}/by-uuid/network-modification-requests/replace</pre>
<p>要想在使用代理管理 API 时替换现有代理列表中特定子网的 IP，您需要向上述端点发出 POST 请求，并说明您要替换的特定子网。为使其正常工作，您必须插入一个可从 API 查询到的代理列表 UUID（如所述 <a href="#showing-all-available-proxy-lists">这里</a>).</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>本我</code></td>
<td>启动更换程序 ID</td>
</tr>
<tr>
<td><code>地位</code></td>
<td>状态描述已启动的替换程序的状态</td>
</tr>
<tr>
<td><code>信息</code></td>
<td>启动的流程类型</td>
</tr>
<tr>
<td><code>创建时间</code></td>
<td>启动进程的时间戳</td>
</tr>
<tr>
<td><code>link_too_list_plain</code></td>
<td>纯文本代理列表链接</td>
</tr>
<tr>
<td><code>link_too_list_json</code></td>
<td>指向 JSON 格式代理列表的链接</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -X POST -H "Content-Type: application/json" -d '{"subnets"：["x.x.x.0/24", "y.y.y.0/24"]}' https://api.oxylabs.io/v1/proxy-list/rest/proxy-lists/{PROXY_LIST_UUID}/by-uuid/subnet-replacement-requests -u user:pass</pre>
<p>输出示例</p>
<pre>{
    "id"："1",
    "状态"："处理中"、
    "消息"：无、
    "类型"："替换"、
    "创建时间"： "2021-01-01T00:00:00+00:00"："2021-01-01T00:00:00+00:00",
    "link_to_list_plain"："https://proxy.oxylabs.io/key/4f34fe5862603138c1bc5ce28b181aef",
    "link_too_list_json"："https://api.oxylabs.io/v1/proxies/lists/8f11274c-a900-11eb-b910-901b0ec4424b"
}
</pre>
<hr />
<h3 id="checking-replacement-status">检查更换状态</h3>
<pre>获取 https://api.oxylabs.io/v1/proxy-list/rest/subnet-replacement-requests/{initiated_replacement_process_id}
</pre>
<p>要确认子网替换成功，必须向上述端点发出 GET 请求，同时插入 <em>启动更换程序 ID</em> 从之前启动的替换程序中删除。</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>本我</code></td>
<td>启动更换程序 ID</td>
</tr>
<tr>
<td><code>地位</code></td>
<td>状态描述已启动的替换程序的状态</td>
</tr>
<tr>
<td><code>信息</code></td>
<td>启动的流程类型</td>
</tr>
<tr>
<td><code>创建时间</code></td>
<td>启动进程的时间戳</td>
</tr>
<tr>
<td><code>link_too_list_plain</code></td>
<td>纯文本代理列表链接</td>
</tr>
<tr>
<td><code>link_too_list_json</code></td>
<td>指向 JSON 格式代理列表的链接</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -u user:pass https://api.oxylabs.io/v1/proxy-list/rest/subnet-replacement-requests/{INITIATED_REPLACEMENT_PROCESS_ID}"
</pre>
<p>输出示例</p>
<pre>{
    "created_at"："2021-01-01T00:00:00+00:00",
    "id"："1",
    "link_too_list_json"："https://api.oxylabs.io/v1/proxies/lists/8f11274c-a900-11eb-b910-901b0ec4424b",
    "link_too_list_plain"："https://proxy.oxylabs.io/key/4f34fe5862603138c1bc5ce28b181aef",
    "消息"：无、
    "状态"："已完成"、
    "类型"："替换"
}
</pre>
<hr />
<h3 id="listing-replaced-and-new-ips">列出被替换和新的 IP</h3>
<pre>GET https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips
</pre>
<p>当替换请求处理完毕后，可通过向上述端点发出 GET 请求，同时从之前启动的替换进程中插入已启动的替换进程 ID，来查找已删除的 IP。</p>
<p>初始请求将只显示 100 个被替换的 IP，分页元数据将出现在响应中。要获取剩余的被替换 IP 列表，必须使用分页。如需分页，请格式化以下端点：</p>
<pre>GET https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips?fields=metadata.total&amp;after={metadata_after}
</pre>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>项目</code></td>
<td>包含被替换 IP ID、IP 地址和子网地址的列表</td>
</tr>
<tr>
<td><code>本我</code></td>
<td>替换过程中的代理 ID</td>
</tr>
<tr>
<td><code>ip</code></td>
<td>代理 IP 地址</td>
</tr>
<tr>
<td><code>子网</code></td>
<td>分配 IP 的子网</td>
</tr>
<tr>
<td><code>类型</code></td>
<td><code>冗员</code> - 已更换的 IP、 <code>新</code>- 已分配的新 IP，而不是 <code>冗员</code>一种</td>
</tr>
<tr>
<td><code>元数据</code></td>
<td>光标分页数据显示从被替换 IP 列表数据中的哪个 IP 地址获取的界限</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -u user:pass "https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips"
</pre>
<p>输出示例</p>
<pre>{
  "项目"：[
    {
      "id"："1",
      "ip"："127.1.0.1",
      "子网"："127.1.0.0/24",
      "类型"： "冗余"：冗余
    },
    {
      "id"："2",
      "IP"："127.1.1.2",
      "子网"："127.1.1.0/24",
      "类型"："新"
    }
  ],
  "元数据"：{
    "后"："'100'",
    "之前"："'无'"、
    "总数"： 100
  }
}
</pre>
<hr />
<h2 id="proxy-rotator">代理旋转器 - 可选</h2>
<p>该服务为可选服务，不包含在订购中。我们为您提供的不是连接到单个 IP 的端点，而是连接到您指定的代理列表的端点。每次请求，端点都会获取一个不同的 IP。要了解如何将端点用作代理，请参阅右侧示例。</p>
<p><strong>备注</strong>:代理旋转器只能与端口 <code>60000</code>.</p>
<pre>curl --proxy vm.oxylabs.io:60000 http://ip.oxylabs.io
</pre>
<hr />
<h3>使用代理旋转器进行会话控制</h3>
<p>使用代理旋转器可以保持相同的 IP 地址。首先，你需要知道 Proxy Rotator 有多少个代理。然后只需添加 <code>--proxy-header "代理服务器：sXXX"</code> 标头，其中 <code>sXXX</code> 是代理的编号，例如 <code>s5</code> 或 <code>s2541</code>.</p>
<pre>user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10"
1.2.30.40
user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10"
1.2.30.40
user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10"
1.2.30.40
</pre>
<hr />
<h2>响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>回应</th>
<th> 错误信息</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>407</code></td>
<td>需要代理验证</td>
<td>您正通过 60000 端口访问代理，但您未提供授权标头，或者您的凭据不正确。</td>
</tr>
<tr>
<td><code>504</code></td>
<td>网关超时</td>
<td>代理服务器超时。等待目标服务器的响应。通常约 60 秒。</td>
</tr>
<tr>
<td><code>503</code></td>
<td>服务不可用</td>
<td>连接目标服务器失败。DNS 无法解析目标服务器地址。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未经授权</td>
<td>证书不正确。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>找不到指定的资源。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>内部服务器错误</td>
<td>我们的服务器出了问题。稍后再试。</td>
</tr>
</tbody>
</table>
</div>
<p>这些是使用我们的数据中心代理时最常见的响应代码。如果您收到任何其他响应代码，请联系您的专用账户经理了解更多信息。</p>
<hr />
<h2>第三方集成</h2>
<h3 id="oxylabs-proxy-manager">Oxylabs 代理管理器</h3>
<p><a class="custom_link" href="https://chrome.google.com/webstore/detail/oxylabs-proxy-manager/infajoaodhhdogakhloedbppcbeajhoo" target="_blank" rel="nofollow noopener">Oxylabs 代理管理器</a> 是 Chrome 浏览器的代理管理扩展。它不仅是免费的，而且可以与您选择的任何代理提供商配合使用。启用代理无需通过设置和菜单选项。从 Chrome 网上商城下载该扩展 <a class="custom_link" href="https://chrome.google.com/webstore/detail/oxylabs-proxy-manager/infajoaodhhdogakhloedbppcbeajhoo" target="_blank" rel="nofollow noopener">这里</a></p>
<ul>
<li>单击扩展图标打开应用程序</li>
<li>如果您还没有添加任何代理，您会看到 <strong>添加新代理</strong> 按钮。点击后继续。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8078" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Add-new-proxy.jpg" alt="OxyLabs Add new proxy" width="434" height="431" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Add-new-proxy.jpg 434w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Add-new-proxy-300x298.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Add-new-proxy-150x150.jpg 150w" sizes="(max-width: 434px) 100vw, 434px" /></p>
<ul>
<li>添加代理配置文件。在 <strong>输入名称</strong>.输入您从我们这里购买的代理作为 <strong>代理服务器 IP</strong> 和 <code>60000</code> 作为 <strong>港口</strong> 如果使用的是用户名：密码身份验证方法，以及 <code>65432</code> 如果您使用的是白名单 IP。</li>
</ul>
<p>填写您的 <strong>用户名</strong> 和 <strong>密码</strong>.最后，点击 <strong>保存更改</strong>.如果您已将自己的 IP 列为白名单，则根本不需要执行此步骤。</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8079" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Save-changes.png" alt="OxyLabs Save changes" width="829" height="383" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Save-changes.png 963w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Save-changes-300x139.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Save-changes-768x355.png 768w" sizes="(max-width: 829px) 100vw, 829px" /></p>
<ul>
<li>打开扩展，点击 <strong>连接</strong>.就这样，您就可以使用数据中心代理了。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8080" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-click-Connect.jpg" alt="OxyLabs click Connect" width="430" height="371" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-click-Connect.jpg 430w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-click-Connect-300x259.jpg 300w" sizes="(max-width: 430px) 100vw, 430px" /></p>
<hr />
<h3 id="switchyomega">SwitchyOmega</h3>
<p>SwitchyOmega 是一款功能强大、性能可靠的代理管理器，可与多种流行浏览器配合使用。根据我们的经验，它是最好的代理插件之一。我们强烈推荐您使用 SwitchyOmega 代理。为此，您需要获取该插件。对于 Chrome 浏览器，请单击 <a class="custom_link" href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en" target="_blank" rel="nofollow noopener">这里</a>点击 <a class="custom_link" href="https://addons.mozilla.org/en-US/firefox/addon/switchyomega/" target="_blank" rel="nofollow noopener">这里</a>.安装完成后，您应该</p>
<ul>
<li>打开 Switchy Omega 选项。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8081" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega1.png" alt="OxyLabs SwitchyOmega1" width="195" height="230" /></p>
<ul>
<li>点击 <strong>新资料...</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8082" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega2.jpg" alt="OxyLabs SwitchyOmega2" width="537" height="461" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega2.jpg 579w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega2-300x258.jpg 300w" sizes="(max-width: 537px) 100vw, 537px" /></p>
<ul>
<li>为新配置文件命名，选择 <strong>代理简介</strong> 类型，然后点击 <strong>创建</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8083" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega3.jpg" alt="OxyLabs SwitchyOmega3" width="543" height="557" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega3.jpg 590w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega3-293x300.jpg 293w" sizes="(max-width: 543px) 100vw, 543px" /></p>
<ul>
<li>改变 <strong>规程</strong> 至 <strong>超文本传输协定</strong>.根据 <strong>服务器</strong> 输入您从我们这里购买的代理之一。在 <strong>港口</strong> 增加 <code>60000</code> 如果使用的是用户名：密码身份验证方法，以及 <code>65432</code> 如果您使用的是白名单 IP。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8084" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega4.jpg" alt="OxyLabs SwitchyOmega4" width="793" height="177" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega4.jpg 856w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega4-300x67.jpg 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega4-768x171.jpg 768w" sizes="(max-width: 793px) 100vw, 793px" /></p>
<ul>
<li>接下来，点击右侧的锁定按钮。填写您的 <strong>用户名</strong> 和 <strong>密码</strong>.点击 <strong>保存更改</strong>.</li>
</ul>
<p>如果您已将自己的 IP 列为白名单，则根本不需要执行此步骤。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8085" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega5.jpg" alt="OxyLabs SwitchyOmega5" width="297" height="230" /></p>
<ul>
<li>点击 <strong>应用更改</strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8086" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega6.jpg" alt="OxyLabs SwitchyOmega6" width="378" height="380" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega6.jpg 378w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega6-298x300.jpg 298w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega6-150x150.jpg 150w" sizes="(max-width: 378px) 100vw, 378px" /></p>
<ul>
<li>最后一步，点击 SwitchyOmega 图标，选择新配置的代理。现在就可以开始了！</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8087" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-SwitchyOmega7.png" alt="OxyLabs SwitchyOmega7" width="198" height="255" /></p>
<hr />
<h3 id="foxyproxy">FoxyProxy</h3>
<p>FoxyProxy 是一款简单的代理管理器，可与许多常用浏览器配合使用。首先，您需要获取 FoxyProxy。对于 Chrome 浏览器，请单击 <a class="custom_link" href="https://chrome.google.com/webstore/detail/foxyproxy-standard/gcknhkkoolaabfmlnjonogaaifnjlfnp?hl=en" target="_blank" rel="nofollow noopener">这里</a>点击 <a class="custom_link" href="https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/" target="_blank" rel="nofollow noopener">这里</a>.安装完成后，您应该</p>
<ul>
<li>打开 FoxyProxy 选项。</li>
<li>点击 <strong>添加</strong>.</li>
<li>在 <strong>IP 地址、DNS 名称、服务器名称</strong> 字段输入其中一个代理。</li>
<li>在 <strong>港口</strong> 字段输入端口。如果使用用户/通行证身份验证，端口为 <code>60000</code>.如果您的 IP 已列入白名单，则端口为 <code>65432</code>.</li>
<li>在 <strong>用户名（可选）</strong> 字段中输入您的用户名。如果您已将自己的 IP 列为白名单，请将该字段留空，因为插件会通过它进行授权，并忽略您在该字段中写入的所有内容。</li>
<li>在 <strong>密码（可选）</strong> 字段中输入您的密码。如果您已将自己的 IP 列入白名单，并希望通过它进行授权，请将此字段留空。</li>
<li>填写完所有字段后，按 <strong>节省</strong>.</li>
<li>为了让所有请求都能通过此设置运行，您必须按下 FoxyProxy 插件图标 (1)，然后点击 <em>使用代理 对所有 URL 使用代理（忽略模式）</em> (2).</li>
</ul>
<p>(1)</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8089" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy1.jpg" alt="OxyLabs FoxyProxy1" width="421" height="326" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy1.jpg 421w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy1-300x232.jpg 300w" sizes="(max-width: 421px) 100vw, 421px" /></p>
<p>(2)</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-8090" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy2.png" alt="OxyLabs FoxyProxy2" width="851" height="436" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy2.png 955w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy2-300x154.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-FoxyProxy2-768x393.png 768w" sizes="(max-width: 851px) 100vw, 851px" /></p>
<ul>
<li>就这样，你完成了！</li>
</ul>
<hr />
<h3 id="proxifier">Proxifier</h3>
<p>要在 Proxfier 中使用数据中心代理，只需按照以下步骤操作即可：</p>
<ul>
<li>打开 Proxifier 应用程序。</li>
<li>添加代理。点击 <strong>代理 (1)</strong>.点击 <strong>添加(2)</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8091" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier1.png" alt="OxyLabs Proxifier1" width="592" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier1.png 592w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier1-300x253.png 300w" sizes="(max-width: 592px) 100vw, 592px" /></p>
<ul>
<li>在以下窗口中输入所需信息。 <strong>IP 地址(1)</strong>, <strong>端口(2)</strong> 其中的用户名/密码验证是 <code>60000</code> 以及用于白名单 IP 验证的 <code>65432</code> 选择 <strong>HTTPS(3)</strong> 协议。在验证框中单击 <strong>启用(4)</strong> 并输入所提供的 <strong>用户名(5)</strong> 和 <strong>密码(6)</strong>.</li>
</ul>
<p>不要忘记添加 <code>顾客</code> 在用户名开头。如果您已将设备列入白名单，请不要点击 <strong>启用</strong>，您的身份验证无需用户名/密码。如果您愿意，可以启用 <strong>显示为网络浏览器</strong> 选项。点击 <strong>好的</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8092" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier2.png" alt="OxyLabs Proxifier2" width="468" height="510" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier2.png 468w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier2-275x300.png 275w" sizes="(max-width: 468px) 100vw, 468px" /></p>
<ul>
<li>您将被要求 <strong>您是否希望 Proxifier 默认使用该代理？</strong>?这意味着您的所有浏览器都将使用此设置。您可以自行决定是否要这样做。如果选择 <strong>是</strong>即可完成设置。如果只想在特定浏览器上使用代理，请按照以下步骤操作。</li>
<li>点击 <strong>规则(1)</strong> 然后点击 <strong>添加...(2)</strong>.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8093" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier3.png" alt="OxyLabs Proxifier3" width="846" height="461" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier3.png 846w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier3-300x163.png 300w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier3-768x418.png 768w" sizes="(max-width: 846px) 100vw, 846px" /></p>
<ul>
<li>点击 <strong>+(1)</strong> 按钮添加要使用代理设置的应用程序。选择要使用代理设置的浏览器并点击。最后，您必须更改 <strong>行动(2)</strong>.单击它并选择您创建的代理。</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8094" src="https://www.proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier4.png" alt="OxyLabs Proxifier4" width="527" height="543" srcset="https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier4.png 527w, https://proxysp.com/wp-content/uploads/2021/09/OxyLabs-Proxifier4-291x300.png 291w" sizes="(max-width: 527px) 100vw, 527px" /></p>
<ul>
<li>就是这样。现在，您的所有请求（使用浏览器时）都将通过代理进行。</li>
</ul>
<hr />
<h4>参考资料</h4>
<p><a href="https://docs.oxylabs.io/dc/index.html#quick-start" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/dc/index.html</a></p>
<hr />
<p>&nbsp;</p>
<blockquote><p><strong>免责声明</strong>:这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>
<p>&nbsp;</p>
<pre></pre>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-datacenter-proxies/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7589</post-id>	</item>
		<item>
		<title>How to Use OxyLabs Proxy [Part 3]: OxyLabs Next-Gen Residential Proxies</title>
		<link>https://proxysp.com/zh/oxylabs-next-gen-residential-proxies/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-next-gen-residential-proxies</link>
					<comments>https://proxysp.com/zh/oxylabs-next-gen-residential-proxies/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7622</guid>

					<description><![CDATA[您听说过 Oxylabs 的新一代住宅代理吗？本文将详细介绍如何使用它。快速启动新一代住宅代理...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-next-gen-residential-proxies/"> <span class="screen-reader-text">如何使用 OxyLabs 代理服务器 [第 3 部分]：OxyLabs 新一代住宅代理服务器</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>您听说过 Oxylabs 的新一代住宅代理吗？本文将向您详细介绍如何使用它。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>新一代住宅代理专为重型数据检索操作而设计。它们可以毫不费力地提取网络数据，不会出现任何延迟或错误。该产品与普通代理一样可定制，但同时能保证更高的成功率。除了可重复使用的 cookies 和 POST 请求外，还支持自定义标题和 IP 粘性。</p>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成下一代住宅代理将轻而易举。唯一不同的是，我们要求用户接受我们的证书，或完全忽略它。 <code>-k</code> 或 <code>--不安全</code> cURL 标志（或您选择的语言中的等效表达式）。</p>
<p>要使用新一代住宅代理进行请求，我们需要使用 <code>ngrp.oxylabs.io:60000</code> 端点。下面是一个 cURL 示例。您还可以找到其他语言的代码示例 <a href="#making-requests">这里</a> 或我们的 <a class="custom_link" href="https://github.com/oxylabs/product-integrations/tree/master/next-gen-residential-proxies" target="_blank" rel="nofollow noopener">GitHub</a>.</p>
<pre>curl -k -x ngrp.oxylabs.io:60000 -U "USERNAME:PASSWORD" http://ip.oxylabs.io
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="making-requests">提出要求</h2>
<pre>GET ngrp.oxylabs.io:60000
</pre>
<p>最简单的方法是向我们发送一个不带任何自定义选项的简单查询。我们将在我们的终端添加所有标准标头，选择最快的代理并向您发送响应正文。</p>
<p>要使用下一代住宅代理所需的功能，如设置代理地理位置或通过会话控制重复使用同一 IP，我们需要在请求中发送额外的标头。</p>
<p>以下是受支持的功能和标头的完整列表：</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>X-Oxylabs-Session-Id</code></td>
<td>如果需要在多个请求中重复使用同一个 IP，可添加一个会话 ID，它可以是一个随机字符串</td>
<td></td>
</tr>
<tr>
<td><code>X-Oxylabs-地理位置</code></td>
<td>要使用特定位置的 IP 地址，请指定国家或城市，例如 <code>德国</code>.可找到支持的地理位置 <a class="custom_link" href="https://docs.oxylabs.io/resources/universal-supported-geo_location-values.csv" target="_blank" rel="noopener">这里</a>.</td>
<td></td>
</tr>
<tr>
<td><code>页眉</code></td>
<td>您可以添加自己的标题，例如 <code>用户代理</code>或任何其他信息，而不是使用预先生成的信息。</td>
<td></td>
</tr>
<tr>
<td><code>曲奇</code></td>
<td>您可以添加自己的 cookie，例如 <code>Cookie：NID=1234567890</code>您的要求。</td>
<td></td>
</tr>
<tr>
<td><code>X-Oxylabs-Status-Code</code></td>
<td>如果目标返回成功响应的自定义状态代码，您可以发送响应的状态代码，我们的系统将不会重试请求。</td>
<td></td>
</tr>
<tr>
<td><code>X-Oxylabs-Render</code></td>
<td>如果您希望呈现 JavaScript，请使用 <code>网页</code> 获取渲染的 HTML 或 <code>png</code> 获取页面截图。</td>
<td></td>
</tr>
<tr>
<td><code>X-Oxylabs-Parser-Type</code></td>
<td>该标头可用于选择解析器类型。目前 <code>电子商务产品</code> 是支持的。</td>
<td></td>
</tr>
<tr>
<td><code>X-Oxylabs-Parse</code></td>
<td>标头用于解析网站数据。数值 <code>1</code> 必须通过才能进行解析。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io"
</pre>
<hr />
<h3 id="session">会议</h3>
<p>如果您想使用同一个代理发出多个请求，可以通过添加 <code>X-Oxylabs-Session-Id</code> 头，其中包含一个随机生成的会话 ID 字符串。我们将为该 ID 分配一个代理，并最多保留 10 分钟。之后，我们将为该特定会话 ID 分配一个新的代理。</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "X-Oxylabs-Session-Id：123randomString"
</pre>
<hr />
<h3 id="geo-location">地理位置</h3>
<p>如果从不受支持的地理位置访问，某些网站将不提供内容。您可以在请求中指定要从哪个国家访问目标网站。只需添加 <code>X-Oxylabs-地理位置</code> 标头，其值设置为国家名称（例如）、 <code>德国</code> 德国或 <code>美国</code> 美国。</p>
<p>新一代住宅代理还支持城市级目标定位。如果要添加城市，只需在国家前添加城市名称即可，例如：： <code>德国慕尼黑</code>.</p>
<p>支持的地理位置参数值的完整列表如下所示 <a class="custom_link" href="https://docs.oxylabs.io/resources/universal-supported-geo_location-values.csv" target="_blank" rel="noopener">这里</a>.</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "X-Oxylabs-Geo-Location：慕尼黑,德国"
</pre>
<hr />
<h3 id="headers">页眉</h3>
<p>如果您比我们更了解某个特定目标，您可以在请求中添加自己的标头。它既可以是标准标头，如 <code>用户代理</code> 或 <code>接受语言</code>以及完全定制和针对特定目标的内容。</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "Your-Custom-Header: interesting header content" -H "User-Agent：Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/73.0.3683.86 Chrome/73.0.3683.86 Safari/537.36" -H "Accept-Language: en-US" -H "接受语言：en-US" -K
</pre>
<hr />
<h3 id="cookies">曲奇</h3>
<p>系统还允许为目标网站设置自定义 cookie。通过您的首次请求，我们将返回所有响应标头和 cookie。您可以在自己的终端修改它们，并在下一次请求时将它们发送回我们的系统。如果您使用相同的 IP 地址连续进行几次请求，重复使用 cookie 可能是个好主意（参见 <a href="#session">会议</a> 更多)</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "Cookie：NID=1234567890; 1P_JAR=0987654321"
</pre>
<hr />
<h3 id="custom-status-code">自定义状态代码</h3>
<p>默认情况下，只要返回 2xx 或 4xx 状态代码，我们就认为请求成功。不过，有时网站会在返回所需内容的同时返回非标准 HTTPS 状态代码。如果您的某个目标出现这种情况，您可以指出哪些状态代码是可接受的，并且对您有实际价值。只需添加 <code>X-Oxylabs-Status-Code</code> 头，其中包含所有对您有效的 HTTP 响应代码。请注意，2xx 和 4xx 仍会被自动标记为成功。</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "X-Oxylabs-Status-Code：500,501,502,503" 
</pre>
<hr />
<h3 id="post-requests">POST 请求</h3>
<p>下一代住宅代理服务器不仅支持发送 <code>获取</code> 请求，还可以让您 <code>职位</code> 到你选择的网络端点。这意味着您可以向目标网站发送数据，然后让网站返回不同的结果。</p>
<pre>curl -X POST -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -d "@/path/to/file.json"
</pre>
<hr />
<h3 id="javascript-rendering">JavaScript 渲染</h3>
<p>启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。该参数有两个可用值： <code>网页</code> (获取原始输出）和 <code>png</code> (获取 Base64 编码的截图）。</p>
<pre>curl -k -v -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "X-Oxylabs-Render: html"
</pre>
<hr />
<h3 id="adaptive-parsing">自适应解析</h3>
<p>自适应解析能够解析任何电子商务产品页面中最重要的字段。要启用电子商务产品页面的自适应解析功能，需要发送两个附加标头： <code>X-Oxylabs-Parser-Type: ecommerce_product</code> 来选择解析器类型，而 <code>X-Oxylabs-Parse: 1</code> 来解析检索到的页面。</p>
<p>可由下一代住宅代理自适应解析电子商务产品页面的字段：</p>
<ul>
<li>标题</li>
<li>正常价格</li>
<li>报价</li>
<li>货币</li>
<li>产品说明</li>
<li>产品 ID</li>
<li>图片 URL</li>
<li>网页中的 URL</li>
</ul>
<pre>curl -v -k -x ngrp.oxylabs.io:60000 -U user:pass1 "https://ip.oxylabs.io" -H "X-Oxylabs-Parser-Type: ecommerce_product" -H "X-Oxylabs-Parse: 1"
</pre>
<p>输出示例</p>
<pre>{
    "结果"：[
        {
            "内容"：{
                "url"："https://ip.oxylabs.io/product/product_example.html"、
                "body"：{
                    "price"：11.99,
                    "标题"："产品标题示例"、
                    "货币"："$"、
                    "old_price"：15.99,
                    "description": null、
                    "image_links"：[
                        "https://ip.oxylabs.io/img/product_example.png"
                    ],
                    "ids_from_url"：[],
                    "simple_links"：[
                        {
                            "链接"："https://ip.oxylabs.io/product/another_example.html"、
                            "description"："另一个产品示例"
                        }
                    ],
                    "ids_from_html"：[
                        {
                            "产品编号"："14158288"
                        }
                    ],
                    "price_range_lower": null、
                    "price_range_upper": null
                },
                "元"：{
                    "标题"："产品元标题示例"、
                    "关键字"：[],
                    "description"："产品描述示例"
                },
                "parse_status_code"：12000
            },
            "创建时间"："2020-01-01 10:00:00",
            "更新时间"："2020-01-01 10:00:07",
            "id"：29964797,
            "页"：1,
            "url"："https://ip.oxylabs.io/product/product_example.html"、
            "job_id"："6699272813062145025",
            "status_code"：200
        }
    ]
}
</pre>
<hr />
<h2 id="usage-statistics">使用统计</h2>
<p>您可以访问我们的 <a class="custom_link" href="https://client-monitor.oxylabs.io/v1/dashboard" target="_blank" rel="nofollow noopener">仪表板</a> 或通过查询以下端点：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数据。流量以字节为单位显示。</p>
<p>该查询将返回所有时间的统计数据。您可以通过添加以下任一选项来查询您每天和每月的使用量 <code>group_by=day</code> 或 <code>group_by=month</code>.流量以字节为单位显示。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "元"：{
        "group_by": null、
        "date_from": null、
        "date_to": null、
        "source": null
    },
    "数据"：{
        "来源"：[
            {
                "results_count_all"："1482",
                "results_count"："0",
                "realtime_results_count"："0",
                "super_api_results_count"："12777",
                "渲染"："0",
                "geo_location"："0",
                "平均响应时间2.18,
                "request_traffic"："6629",
                "响应流量"："17850",
                "标题"："通用"
            }
        ]
    }
}
</pre>
<hr />
<h2 id="sample-response">答复样本</h2>
<p>这就是响应的样子。要查看报头和 cookie，必须启用 "详细 "模式。</p>
<pre>http/1.1 200 ok
X-Job-Id：1234567890123456
X-Session-Id：123randomString
cf-cache-status：动态
cf-ray：55c2ab837eddcba8-VIE
content-encoding: gzip
content-length: 72657
content-type: text/html
date: Tue, 1 Jan 2020 00:00:01 GMT,expect-ct: max-age=604800,report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
last-modified：Tue, 1 Dec 2020 00:00:00 GMT
服务器: cloudflare
status: 200
strict-transport-security: max-age=31536000
X-DNS-Prefetch-Control: off
Set-Cookie：NID=1234567890; expires=Wed, 29-Jul-2020 10:56:21 GMT
Set-Cookie：1P_JAR=0987654321; expires=Wed, 29-Jul-2020 10:56:21 GMT
x-cache：MISS from localhost
x-cache-lookup：MISS from localhost:3129content here
</pre>
<p>&nbsp;</p>
<hr />
<h4>参考资料</h4>
<p><a href="https://docs.oxylabs.io/next-gen-residential-proxies/index.html#quick-start" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/next-gen-residential-proxies/index.html#quick-start</a></p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-next-gen-residential-proxies/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7622</post-id>	</item>
		<item>
		<title>How to Use OxyLabs Real-Time Crawler [Part 1]: Real-Time Crawler for Google</title>
		<link>https://proxysp.com/zh/oxylabs-real-time-crawler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-real-time-crawler</link>
					<comments>https://proxysp.com/zh/oxylabs-real-time-crawler/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7623</guid>

					<description><![CDATA[你知道如何使用 OxyLabs Real-time Crawler for Google 吗？这是 OxyLabs 官方最全面的介绍。快速入门实时爬虫内置了...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-real-time-crawler/"> <span class="screen-reader-text">如何使用 OxyLabs 实时爬虫 [第 1 部分]：谷歌实时爬虫</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote>
<p class="src grammarSection" data-group="1-1">你知道如何使用 OxyLabs Real-time Crawler for Google 吗？这是 OxyLabs 官方最全面的介绍。</p>
</blockquote>
<h2 id="quick-start">快速入门</h2>
<p>Real-Time Crawler 专为重型数据检索操作而设计。您可以使用 Real-Time Crawler 访问各种谷歌页面，包括常规搜索、酒店空房情况和谷歌购物。它可以毫不费力地从搜索引擎中提取网页数据，不会出现任何延迟或错误。</p>
<p>用于谷歌的实时抓取器 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用 Google 实时爬虫的最快方法。您将发送一个查询 <code>阿迪达斯</code> 至 <code>谷歌搜索</code> 使用 <a href="#realtime">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："google_search", "domain"："com", "query"："adidas"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="postman">邮递员</h2>
<p>下载和导入 <a class="custom_link" href="https://docs.oxylabs.io/resources/Real-Time%20Crawler%20-%20Google.postman_collection.json" target="_blank" rel="noopener">邮差系列 </a>来试用本页面记录的所有 Google 爬虫功能和数据传输方法。</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8201" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Postman.png" alt="Real-Time Crawler for Google Postman" width="296" height="442" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Postman.png 296w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Postman-201x300.png 201w" sizes="(max-width: 296px) 100vw, 296px" /></p>
<hr />
<h2 id="integration-methods">整合方法</h2>
<p>Real-Time Crawler for Google 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅 <a href="#callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。您可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。这样，一旦作业准备就绪，我们就会给你发送一条回调消息。在本例中，结果将自动 <a href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<p>您还可以尝试通过 Postman 了解推拉法的工作原理。下载 <a class="custom_link" href="https://docs.oxylabs.io/resources/Real-Time%20Crawler%20-%20Google.postman_collection.json" target="_blank" rel="noopener">此文件</a> 开始。</p>
<hr />
<h4><strong>单一查询</strong></h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_search", "domain"："com", "query"："adidas", "callback_url"："https://your.callback.url"，"storage_type"："s3"，"storage_url"："your_bucket_name"}'
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "callback_url"："https://your.callback.url"、
  "client_id"：5,
  "context"：[
    {
      "key"："results_language"、
      "value": null
    },
    {
      "key"："safe_search"、
      "value": null
    },
    {
      "key"："tbm"、
      "value": null
    },
    {
      "key"："cr"、
      值"：空
    },
    {
      "key"："filter"、
      "value": null
    }
  ],
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "查询"："adidas"、
  "来源"："google_search"、
  "start_page"：1,
  "状态"："pending"、
  "存储类型"s3",
  "storage_url"："YOUR_BUCKET_NAME/12345678900987654321.json",
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:01",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<h4 id="check-job-status"><strong>检查工作状态</strong></h4>
<p>如果您的查询有 <code>回调URL</code>一旦完成刮擦任务，我们将向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}
</pre>
<p>查询该链接将返回工作信息，包括其 <code>地位</code>.有 3 种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出了问题，我们无法完成，很可能是目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321'
</pre>
<p>API 将在响应正文中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre>{
  "client_id"：5,
  "context"：[
    {
      "key"："results_language"、
      "value": null
    },
    {
      "key"："safe_search"、
      "value": null
    },
    {
      "key"："tbm"、
      "value": null
    },
    {
      "key"："cr"、
      值"：空
    },
    {
      "key"："filter"、
      "value": null
    }
  ],
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "查询"："adidas"、
  "来源"："google_search"、
  "start_page"：1,
  "状态"："done"、
  "子域"："www"、
  "updated_at"："2019-10-01 00:00:15",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="retrieve-job-content"><strong>检索工作内容</strong></h4>
<p>通过检查作业状态或接收我们的回调，一旦知道作业已准备就绪，您就可以使用以下 URL 获取作业 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应或回调信息中。看起来应该类似于下面这样： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}/results
</pre>
<p>通过设置 "任务状态"，可以自动检索结果，而无需定期检查任务状态。 <a href="#callback">回调</a> 服务。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项任务时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如 <a href="#callback">回调实现示例</a>.</p>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321/results'
</pre>
<p>API 将返回工作内容：</p>
<pre>{
  "结果"：[
    {
      "content"："&lt;!
        内容
      &quot;,
      &quot;created_at&quot;：&quot;2019-10-01 00:00:01&quot;,
      &quot;更新时间&quot;：&quot;2019-10-01 00:00:15&quot;,
      &quot;页&quot;：1,
      &quot;url&quot;：&quot;https://www.google.com/search?q=adidas&amp;hl=en&amp;gl=US&quot;、
      &quot;job_id&quot;：&quot;12345678900987654321&quot;,
      &quot;status_code&quot;：200
    }
  ]
}
</pre>
<hr />
<h4 id="callback"><strong>回调</strong></h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a href="#check-job-status">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a href="#retrieve-job-content">取回</a>.</p>
<pre># 请查看 Python 和 PHP 代码示例。
</pre>
<p>回调输出示例</p>
<pre>{
   "created_at":"2019-10-01 00:00:01",
   "updated_at":"2019-10-01 00:00:15",
   "locale":null、
   "client_id":163、
   "user_agent_type": "desktop"、
   "源": "google_search"、
   "页面":1、
   "子域": "www"、
   "status": "done"、
   "start_page":1、
   "parse":0、
   "render":null、
   "priority":0、
   "ttl":0、
   "origin": "api"、
   "persist":true、
   "id":"12345678900987654321",
   "callback_url": "http://your.callback.url/"、
   "query": "adidas"、
   "domain": "com"、
   "limit":10、
   "geo_location":null、
   {...}
   "_links":[
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321",
         "method": "GET"、
         "rel": "self"
      },
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321/results",
         "method": "GET"、
         "rel": "results" }
      }
   ],
}
</pre>
<hr />
<h4 id="batch-query"><strong>批量查询</strong></h4>
<p>实时爬虫还支持执行多个关键字，每批最多可执行 1,000 个关键字。以下端点将向提取队列提交多个关键词。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries/batch
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键词作为一个单独请求处理。如果您提供了回调 URL，您将为每个关键字收到单独的调用。否则，我们的初始响应将包含工作 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries/batch' -H 'Content-Type: application/json' -d '@keywords.json
 -d'@keywords.json'（关键词
</pre>
<p><code>keywords.json</code> 内容：</p>
<pre>{
   "query":[
      "阿迪达斯"、
      "耐克"、
      "蕾博克"
   ],
   "来源"："google_search"、
   "域"："com"、
   "callback_url"："https://your.callback.url"
}
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "查询"：[
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678900987654321",
      {...}
      "查询"："阿迪达斯"、
      "来源"："google_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678901234567890",
      {...}
      "查询"："NIKE"、
      "来源"："google_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678901234567890/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："01234567899876543210",
      {...}
      "查询"："reebok"、
      "来源"："google_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/01234567899876543210/results",
          "method"："GET"
        }
      ]
    }
  ]
}
</pre>
<hr />
<h4 id="get-notifier-ip-address-list"><strong>获取通知程序 IP 地址列表</strong></h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/info/callbacker_ips'
</pre>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre>{
    "ips"：[
        "x.x.x.x"、
        "y.y.y.y"
    ]
}
</pre>
<hr />
<h4 id="upload-to-storage"><strong>上传到存储器</strong></h4>
<p>默认情况下，RTC 任务结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优势在于，您无需为了获取结果而发出额外请求，所有内容都会直接存储到您的存储桶中。</p>
<p>我们支持亚马逊 S3 和谷歌云存储。如果您想使用其他类型的存储，请联系您的客户经理，讨论功能交付时间表。</p>
<p id="amazon-s3"><strong>亚马逊 S3</strong></p>
<p>要将作业结果上传到 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请访问 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8202" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage1.png" alt="Real-Time Crawler for Google Upload to Storage1" width="478" height="324" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage1.png 478w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage1-300x203.png 300w" sizes="(max-width: 478px) 100vw, 478px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://docs.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记在 <code>您的邮筒名称</code>.通过该策略，我们可以向您的邮筒写入内容，允许您访问上传的文件，并了解邮筒的位置。</p>
<p id="google-cloud-storage"><strong>谷歌云存储</strong></p>
<p>要将作业结果上传到您的 Google Cloud Storage 存储桶，请为我们的服务设置特殊权限。为此，请使用 <code>存储.对象.创建</code> 权限并将其分配给 Oxylabs 服务帐户电子邮件 <code>oxyserps-storage@oxyserps-storage.iam.gserviceaccount.com</code>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8203" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage2.png" alt="Real-Time Crawler for Google Upload to Storage2" width="480" height="305" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage2.png 480w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage2-300x191.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8204" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage3.png" alt="Real-Time Crawler for Google Upload to Storage3" width="483" height="667" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage3.png 483w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Upload-to-Storage3-217x300.png 217w" sizes="(max-width: 483px) 100vw, 483px" /></p>
<p id="usage"><strong>使用方法</strong></p>
<p>要使用此功能，请在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到职位 ID。在 <a href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre>{
    "版本"："2012-10-17",
    "Id"："Policy1577442634787",
    "声明"：[
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"："s3:GetBucketLocation"、
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME" }.
        },
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"：[
                "s3:PutObject"、
                "s3:PutObjectAcl"。
            ],
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME/*"。
        }
    ]
}
</pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交方式与推拉方式相同，但在实时情况下，我们将在连接打开时返回内容。您向我们发送查询，连接保持打开，我们检索内容并发送给您。处理的端点如下：</p>
<pre>邮寄 https://realtime.oxylabs.io/v1/queries
</pre>
<p>开放连接的超时限制为 150 秒，因此在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_search", "domain"："com", "query"："adidas"}'
</pre>
<p>打开连接时将返回的响应体示例：</p>
<pre>{
  "结果"：[
    {
      "content"："
      内容
      "
      "created_at"："2019-10-01 00:00:01",
      "更新时间"："2019-10-01 00:00:15",
      "id": null、
      "page"：1,
      "url"："https://www.google.com/search?q=adidas&amp;hl=en&amp;gl=US"、
      "job_id"："12345678900987654321",
      "status_code"：200
    }
  ]
}
</pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。只需将我们的入口节点用作代理，使用实时爬虫凭据进行授权，并忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<pre>GET realtime.oxylabs.io:60000
</pre>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是可接受的参数列表：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a href="#user-agent">这里</a>.</td>
</tr>
<tr>
<td><code>X-OxySERPs-地理位置</code></td>
<td>在某些情况下，您可能需要指明结果应适应的地理位置。该参数对应于 <code>地理位置</code>.了解我们的建议 <code>地理位置</code> 参数结构 <a href="#geo_location">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<p>如果您在设置超级用户接口时需要帮助，请致电 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 -H "X-OxySERPs-User-Agent-Type: desktop_chrome" -H "X-OxySERPs-Geo-Location：New York,New York,United States" "https://www.google.com/search?q=adidas"
</pre>
<hr />
<h2 id="content-type">内容类型</h2>
<p>实时爬虫可以返回 <strong>原始HTML</strong>或 <strong>结构化（解析）的 JSON</strong>.请注意，并非所有数据源都能以结构化方式返回。本文档中每个数据源下的图标将表明我们是否能解析它，或者我们只能返回原始的 HTML。</p>
<p>请参见 <a href="#parsed-data">解析数据</a> 来查看每个数据源会返回哪些字段。</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>使用实时爬虫从 Google 检索数据有多种方法。您可以通过以下方式向我们提供完整的 URL <a href="#direct">直接</a>或通过专门构建的数据源指定参数，例如 <a href="#search">搜索</a>, <a href="#shopping-product">购物产品</a> 或 <a href="#images">图片</a>.</p>
<p>从技术上讲，这不是一种内容类型，但实时抓取器可以在抓取时呈现 JavaScript。这在某些 Google 页面（如航班和专利）中是必要的。在 <code>渲染 JS</code> 将指示特定数据源是否可以在启用 JavaScript 的情况下进行刮擦。</p>
<p>如果您不确定选择哪种方式，请给我们留言 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8206 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Direct-1.png" alt="Real-Time Crawler for Google Direct" width="473" height="19" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Direct-1.png 473w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Direct-1-300x12.png 300w" sizes="(max-width: 473px) 100vw, 473px" /></p>
<p><code>谷歌</code> 源设计用于检索各种 Google 页面的直接 URL 内容。这意味着，您可以向我们提供所需谷歌页面的直接 URL，而无需发送多个参数。我们不会删除任何参数或以任何其他方式更改您的 URL。</p>
<p>只要提交的 URL 是 Google 搜索（SERP 页面），该数据源还支持解析数据（解析 JSON）。如果我们无法确认这是一个 SERP 页面请求，则会返回一条失败消息。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">谷歌页面的直接 URL（链接</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回已解析的数据，只要提交的 URL 是用于 Google 搜索。请参见 <a href="#parsed-data">解析数据 </a>了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，应用程序接口将检索谷歌学术搜索的关键字 <code>牛顿</code> 推拉法</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source": "google", "url": "https://scholar.google.com/scholar?hl=en&q=newton&btnG=&as_sdt=1%2C5&as_sdtp="}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source": "google", "url": "https://scholar.google.com/scholar?hl=en&q=newton&btnG=&as_sdt=1%2C5&as_sdtp="}'
</pre>
<p>并通过超级用户接口（SuperAPI）：</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://scholar.google.com/scholar?hl=en&q=newton&btnG=&as_sdt=1%2C5&as_sdtp="
</pre>
<hr />
<h3 id="search">搜索</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8207 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Search.png" alt="Real-Time Crawler for Google Search" width="561" height="24" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Search.png 561w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Search-300x13.png 300w" sizes="(max-width: 561px) 100vw, 561px" /></p>
<p><code>谷歌搜索</code> 源旨在检索谷歌搜索结果（SERP）。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌搜索</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">限额</td>
<td style="font-weight: 400;" width="72">每页要检索的结果数量</td>
<td style="font-weight: 400;" width="72">10</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回解析后的数据。参见 <a href="#parsed-data">解析数据 </a>了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析器类型</td>
<td style="font-weight: 400;" width="72">留空以获取默认布局，或将该值设为 v2 以使用更新后的 Google Search 解析输出模式和/或接收 CSV 格式的结果（仅适用于 Google Web Search）。参见<a href="#parsed-data"> 解析数据 </a>了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">将 fpstate 值设置为 aig 会使 Google 加载更多应用程序。该参数只有与 render 参数一起使用时才有用。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">fpstate</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">true 将关闭拼写自动更正功能。</td>
<td style="font-weight: 400;" rowspan="2" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">nfpr</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">结果语言。支持的 Google 语言列表如下<a href="#results-language"> 这里。</a></td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">待匹配参数或 tbm 参数。可接受的值：App、BLG、BKS、DSC、ISCH、NWS、PTS、PLCS、RCP、LCL</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">tbm</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">tbs 参数。该参数就像一个容器，可容纳更多晦涩难懂的 google 参数，如按日期对结果进行限制/排序，以及其他过滤器，其中一些取决于 tbm 参数（例如，tbs=app_os:1 仅适用于 tbm 值为 app 的情况）。更多信息<a href="https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/" target="_blank" rel="noopener"> 这里。</a></td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">药材</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在  <a class="custom_link" href="https://docs.oxylabs.io/rtc/source/google/index.html?shell#upload-to-storage" target="_blank" rel="noopener">上传到存储器</a>  页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>API 向 <code>google.nl</code> 检索关键字从第 11 到第 20 的搜索结果页面 <code>阿迪达斯</code>.结果将以法语显示，因为 <code>results_language</code> 参数也通过 <code>背景</code>.API 将向 <code>your.callback.url</code> 包含 URL，以便在数据检索任务成功完成后下载原始 HTML 输出。这就是推拉式：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_search", "domain"："nl", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"，"context"：{"key"："results_language"，"value"："fr"}]}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_search", "domain"："nl", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"，"context"：{"key"："results_language"，"value"："fr"}]}'
</pre>
<hr />
<h3 id="ads">广告</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8210 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Ads.png" alt="Real-Time Crawler for Google Ads" width="472" height="26" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Ads.png 472w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Ads-300x17.png 300w" sizes="(max-width: 472px) 100vw, 472px" /></p>
<p><code>谷歌广告</code> 源进行了优化，以检索带有付费广告的 Google 搜索结果页面（SERP）。该源每页只返回 10 个结果，确保付费结果显示的最高变化。除此以外，它还支持与常规来源相同的参数 <a href="#search">搜索</a></p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌广告</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表<a href="#locale"> 这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构<a href="#geo_location"> 这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回解析后的数据。参见 <a href="#parsed-data">解析数据</a> 了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">true 将关闭拼写自动更正功能。</td>
<td style="font-weight: 400;" rowspan="2" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">nfpr</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">待匹配参数或 tbm 参数。可接受的值：App、BLG、BKS、DSC、ISCH、NWS、PTS、PLCS、RCP、LCL</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">tbm</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">tbs 参数。该参数就像一个容器，可容纳更多晦涩难懂的 google 参数，如按日期对结果进行限制/排序，以及其他过滤器，其中一些取决于 tbm 参数（例如，tbs=app_os:1 仅适用于 tbm 值为 app 的情况）。更多信息<a href="https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/" target="_blank" rel="nofollow noopener"> 这里。</a></td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">药材</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>API 向 <code>google.nl</code> 检索关键字 <code>阿迪达斯</code>.API 将向 <code>your.callback.url</code> 包含 URL，以便在数据检索任务成功完成后下载原始 HTML 输出。这就是推拉式：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_ads", "domain"："nl", "query"："adidas", "callback_url"："https://your.callback.url"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_ads", "domain"："nl", "query"："adidas"}'
</pre>
<hr />
<h3 id="hotels">酒店</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8211 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Hotels.png" alt="Real-Time Crawler for Google Hotels" width="480" height="24" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Hotels.png 480w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Hotels-300x15.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></p>
<p><code>谷歌酒店</code> 数据源旨在检索 Google 酒店搜索结果。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌酒店</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">限额</td>
<td style="font-weight: 400;" width="72">每页要检索的结果数量</td>
<td style="font-weight: 400;" width="72">10</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
<td style="font-weight: 400;" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">true 将关闭拼写自动更正功能。</td>
<td style="font-weight: 400;" rowspan="2" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">nfpr</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">客人数量</td>
<td style="font-weight: 400;" rowspan="2" width="72">2</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">酒店入住率</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">在酒店的停留时间，从 - 到。例如：2017-07-12,2017-07-13</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">酒店日期</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>请注意，使用 Google hotels 时，您始终需要发送一个包含 "hotels "的关键词，例如 "洛杉矶的酒店"、"法国巴黎的酒店 "等。酒店 "和 "hotels "均可。Google 还支持当地语言，因此您可以发送 "Hotelli Helsingissä "查询赫尔辛基的酒店，或发送 "viešbučiai Vilnius "查询维尔纽斯的酒店。</p>
<p>在此示例中，API 将检索前 3 页的酒店空房情况，包括 <code>1</code> 客 <code>2019-10-01</code> 和 <code>2019-10-10</code> 对于 <code>巴黎的酒店</code> 从 <code>谷歌网站</code>.这就是推拉法。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_hotels", "domain"："com", "pages"：3, "query"："hotels in Paris", "context"：[{"key"："hotel_occupancy", "value": 1}, {"key"："hotel_dates", "value"："2019-10-01,2019-10-10"}]}'
</pre>
<p>这是实时的：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_hotels", "domain"："com", "pages"：3, "query"："hotels in Paris", "context"：[{"key"："hotel_occupancy", "value": 1}, {"key"："hotel_dates", "value"："2019-10-01,2019-10-10"}]}'
</pre>
<hr />
<h3 id="travel-hotels">旅行酒店</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8212 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Travel-Hotels.png" alt="Real-Time Crawler for Google Travel Hotels" width="470" height="20" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Travel-Hotels.png 470w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Travel-Hotels-300x13.png 300w" sizes="(max-width: 470px) 100vw, 470px" /></p>
<p><code>谷歌旅游酒店</code> 数据源旨在检索 Google 旅行服务的酒店搜索结果。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌旅游酒店</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获得正确的数据极为重要。请注意，该数据源可接受的地理位置值数量有限，请检查 <a href="https://docs.oxylabs.io/resources/google_travel_hotels-bad_geo_locations.csv" target="_blank" rel="noopener">此文件 </a>来查看无法获得准确结果的地理位置值。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的屏幕截图）。请注意，如果没有 JavaScript 渲染，Google Travel Hotels 将不会返回任何有用的内容。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">客人数量</td>
<td style="font-weight: 400;" rowspan="2" width="72">2</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">酒店入住率</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">按 # 酒店星级筛选结果。您可以指定一个或多个介于 2 和 5 之间的值。例如[3,4]</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">酒店类别</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">入住酒店的日期，从 - 到。例如：2017-07-12,2017-07-13</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">酒店日期</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。目前只支持亚马逊 S3：s3。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> page.</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的 Amazon S3 存储桶名称</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>请注意，使用 Google hotels 时，您始终需要发送一个包含 "hotels "的关键词，例如 "洛杉矶的酒店"、"法国巴黎的酒店 "等。酒店 "和 "hotels "均可。Google 还支持当地语言，因此您可以发送 "Hotelli Helsingissä "查询赫尔辛基的酒店，或发送 "viešbučiai Vilnius "查询维尔纽斯的酒店。</p>
<p>在此示例中，API 将检索第 2 页的酒店空房情况结果，内容为 <code>2</code> 客人之间 <code>2020-10-01</code> 和 <code>2020-10-10</code> 对于 <code>巴黎的酒店</code> 从 <code>谷歌网站</code>.过滤后的结果将只显示 2 星级和 4 星级酒店。这是推拉法。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_travel_hotels", "domain"："com"，"start_page"：2, "query"："巴黎的酒店"，"callback_url"："https://your.callback.url"，"context"：[{"key"："hotel_occupancy", "value": 2}，{"key"："hotel_dates", "value"："2020-10-01,2020-10-10"}, {"key":"hotel_classes", "value": [2,4]}]}'
</pre>
<p>这是实时的：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_travel_hotels", "domain"："com"，"start_page"：2, "query"："巴黎的酒店"，"上下文"：[{"key"："hotel_occupancy", "value": 2}, {"key"："hotel_dates", "value"："2020-10-01,2020-10-10"}, {"key":"hotel_classes", "value": [2,4]}]}'
</pre>
<hr />
<h3 id="shopping-search">购物搜索</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8213 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search.png" alt="Real-Time Crawler for Google Shopping Search" width="474" height="26" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search.png 474w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search-300x16.png 300w" sizes="(max-width: 474px) 100vw, 474px" /></p>
<p><code>谷歌购物搜索</code> 来源旨在检索 Google 购物搜索结果。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>查询参数</p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌购物搜索</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
<td style="font-weight: 400;" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回 <a href="#parsed-data">解析后的数据</a>.更多信息请参阅解析数据。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">true 将关闭拼写自动更正功能。</td>
<td style="font-weight: 400;" rowspan="2" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">nfpr</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">r 应用默认的 Google 排序，rv - 按评论得分排序，p - 按价格升序排序，pd - 按价格降序排序</td>
<td style="font-weight: 400;" rowspan="2" width="72">r</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">sort_by</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">筛选产品的最低价格</td>
<td style="font-weight: 400;" rowspan="2" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">最低价格</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">筛选产品的最高价格</td>
<td style="font-weight: 400;" rowspan="2" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">最高价格</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在<a href="#upload-to-storage"> 上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>首先下载应用程序接口 <code>4</code> 搜索关键字 <code>阿迪达斯</code>，按降序价格和 $20 的最低价格排序。这就是 "推-拉 "的方法：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_search", "domain"："com"，"query"："adidas", "pages"：4, "context"：{"key"："sort_by"，"value"："pd"}，{"key"："min_price"，"value"：20}]}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_search", "domain"："com"，"query"："adidas", "pages"：4, "context"：{"key"："sort_by"，"value"："pd"}，{"key"："min_price"，"value"：20}]}'
</pre>
<hr />
<h3 id="shopping-product">购物产品</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8214 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product.png" alt="Real-Time Crawler for Google Shopping Product" width="467" height="26" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product.png 467w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-300x17.png 300w" sizes="(max-width: 467px) 100vw, 467px" /></p>
<p><code>谷歌购物产品</code> 源用于检索指定产品的 Google Shopping 产品页面。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌购物产品</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的产品代码</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
<td style="font-weight: 400;" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回解析后的数据。参见 <a href="#parsed-data">解析数据</a> 了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在此，应用程序接口将下载产品 ID 的产品页面 <code>5007040952399054528</code> 谷歌购物 <code>谷歌网站</code>.它还将获得前 4 页的定价信息。这就是推拉页面的样子：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_product", "domain"："com", "query"："5007040952399054528"}'
</pre>
<p>在实时系统中也是如此：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_product", "domain"："com", "query"："5007040952399054528"}'
</pre>
<hr />
<h3 id="shopping-product-pricing">购物产品定价</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8215 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing.png" alt="Real-Time Crawler for Google Shopping Product Pricing" width="475" height="23" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing.png 475w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing-300x15.png 300w" sizes="(max-width: 475px) 100vw, 475px" /></p>
<p><code>谷歌购物定价</code> 源用于检索指定产品的 Google Shopping 产品定价页面。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌购物定价</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的产品代码</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
<td style="font-weight: 400;" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回解析后的数据。参见 <a href="#parsed-data">解析数据</a> 了解更多信息。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在<a href="#upload-to-storage"> 上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在此，应用程序接口将下载产品 ID 的产品定价页面 <code>5007040952399054528</code> 谷歌购物 <code>谷歌网站</code>.下面是一个推拉式示例：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_pricing", "domain"："com", "query"："5007040952399054528"}'
</pre>
<p>在实时系统中也是如此：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_shopping_pricing", "domain"："com", "query"："5007040952399054528"}'
</pre>
<hr />
<h3 id="images">图片</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8216 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Images.png" alt="Real-Time Crawler for Google Images" width="477" height="27" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Images.png 477w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Images-300x17.png 300w" sizes="(max-width: 477px) 100vw, 477px" /></p>
<p><code>谷歌图片</code> 源的目的是检索图像搜索页面，以查找与 <code>询问</code> 参数，以及包含这些图像的网站。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌图片</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">图片的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表 <a href="#locale">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">true 将关闭拼写自动更正功能。</td>
<td style="font-weight: 400;" rowspan="2" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">nfpr</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">结果语言。支持的 Google 语言列表如下 <a href="#results-language">这里。</a></td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">results_language</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在此示例中，应用程序接口将下载类似图像的图像搜索页面，以搜索图像 <code>https://newsneakernews-wpengine.netdna-ssl.com/wp-content/uploads/2017/03/adidas-boost-march-25-2017.jpg</code> 从 <code>谷歌网站</code>.这就是推拉法：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_images", "domain"："com", "query"："https://newsneakernews-wpengine.netdna-ssl.com/wp-content/uploads/2017/03/adidas-boost-march-25-2017.jpg"}'
</pre>
<p>在实时系统中也是同样的要求：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_images", "domain"："com", "query"："https://www.example.com/img/image.jpg"}'
</pre>
<hr />
<h3 id="suggestions">建议</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8217 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Suggestions.png" alt="Real-Time Crawler for Google Suggestions" width="476" height="25" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Suggestions.png 476w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Suggestions-300x16.png 300w" sizes="(max-width: 476px) 100vw, 476px" /></p>
<p><code>谷歌建议</code> 该源代码旨在检索 Google 关键字建议。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">谷歌建议</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">Accept-Language 标头值。这将改变谷歌搜索页面的网页界面语言（而不是搜索结果）。例如，如果使用 com 域名并使用 locale 参数 de-DE，搜索结果仍将是美语，但 Accept-Language 将被设置为 de-DE,de;q=0.8。这将模仿来自美国的人在 com 域名中搜索，而他的浏览器用户界面设置为德语。如果不使用该参数，我们将根据域名设置 "接受语言 "参数（即 com 为 en-US）。可用的 Google 本地语言列表<a href="#locale"> 这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构 <a href="#geo_location">这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在<a href="#upload-to-storage"> 上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>API 向 Google 建议页面发出请求，以检索关键字建议 <code>阿迪达斯</code>.应用程序接口会将一个 JSON 有效载荷发送到 <code>your.callback.url</code> 包含任务完成后下载结果的 URL。下面是一个推拉式示例：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_suggest", "query"："adidas", "callback_url"："https://your.callback.url"}'
</pre>
<p>实时 "也有同样的要求：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："google_suggest", "query"："阿迪达斯"}'
</pre>
<hr />
<h3 id="keyword-data">关键词数据</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8218 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Keyword-Data.png" alt="Real-Time Crawler for Google Keyword Data" width="472" height="23" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Keyword-Data.png 472w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Keyword-Data-300x15.png 300w" sizes="(max-width: 472px) 100vw, 472px" /></p>
<p><code>google_msv</code> 数据源将检索指定关键字的 Google 关键字数据以及建议关键字（除非在上下文中传递 ideas=False）。关键字以字符串形式在查询参数中传递。关键词之间用逗号分隔。不支持关键字内的逗号，因此关键字 "Water Bottle 5,0L "实际上会被解释为 2 个关键字："水瓶 5 "和 "0L"。更多详情，请参阅右侧的输出示例。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">google_msv</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字，用逗号分隔</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">结果应适应的地理位置。正确使用该参数对获取正确数据极为重要。如需了解更多信息，请阅读我们建议的地理位置参数结构<a href="#geo_location"> 这里</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">语言，例如英语或法语。无参数或空值将返回所有语言的结果。</td>
<td style="font-weight: 400;" rowspan="2" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">语言</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">3 个符号的货币代码</td>
<td style="font-weight: 400;" rowspan="2" width="72">欧元</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">货币</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">如果为 "true"，则返回关键字的想法；如果为 "false"，则只返回所请求关键字的数据</td>
<td style="font-weight: 400;" rowspan="2" width="72">真</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">理念</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取想法时，将限制所提供的想法关键字数量，以 50 的整数倍四舍五入（例如，20 -&gt; 50，123 -&gt; 150）。0 表示无限制。</td>
<td style="font-weight: 400;" rowspan="2" width="72">0</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">想法限制</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取创意时，将过滤掉月平均搜索量低于所提供数字的创意关键词。0 表示不过滤。</td>
<td style="font-weight: 400;" rowspan="2" width="72">0</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">min_amsv</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取创意时，将过滤掉月平均搜索量高于所提供数字的创意关键词。0 表示不过滤。</td>
<td style="font-weight: 400;" rowspan="2" width="72">0</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">max_amsv</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取创意时，将过滤掉不属于所提供类别的创意关键词。可用的类别有.NET、.NET/.NET、.NET/.NET 和.NET。</td>
<td style="font-weight: 400;" rowspan="2" width="72">无效</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">类别</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
在本例中，API 将为 <code>最佳餐厅</code> 和所有建议的关键词。关键词语言是 <code>法语</code>地理位置为 <code>法国巴黎法兰西岛</code> 货币是 <code>欧元</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
-d '{"source"："google_msv", "query"："meilleur restaurant", "geo_location"："Paris,Ile-de-France,France", "context"：[{"key"："语言"，"值"："法语"},{"键"："currency", "value"："EUR"}, {"key"："想法"，"值"：true}]}'

# 或者，如果您不需要创意：

curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
-d '{"source"："google_msv", "query"："meilleur restaurant", "geo_location"："Paris,Ile-de-France,France", "context"：[{"key"："语言"，"值"："法语"},{"键"："currency", "value"："EUR"}, {"key"："想法"，"值"：false}]}'
</pre>
<p>输出示例（historicalSearchVolume 条目和想法条目切割）：</p>
<pre>{
    "结果"：[
    {
        "内容"：
        {
            "想法"：[
            {
                "cpc"：4.712038,
                "keyword"："meilleur restaurant a paris"、
                "currency"："EUR"、
                "竞争"：0.3385383889238515,
                "averageSearchVolume"：1900,
                "historicalSearchVolume"：[
                {
                    "日期"："201803",
                    "搜索量"：1600
                },
                {
                    "日期"："201802",
                    "searchVolume"：1900
                }]
            }],
            "种子"：[
            {
                "cpc"：4.05351,
                "keyword"："meilleur restaurant"、
                "currency"："EUR"、
                "竞争"：0.3385341239238515,
                "averageSearchVolume"：2900,
                "historicalSearchVolume"：[
                {
                    "日期"："201803",
                    "搜索量"：3600
                },
                {
                    "日期"："201802",
                    "searchVolume"：2900
                }]
            }]
        }
    }]
}
</pre>
<hr />
<h2 id="parsed-data">解析数据</h2>
<p>谷歌网页搜索（SERP）页面是唯一一个广泛支持解析数据交付的页面。以下是我们解析的 SERP 页面特定字段。结构数据可用 <a href="#search">搜索</a> (一直）和 <a href="#direct">直接</a> (只要提交 SERP 页面 URL）。</p>
<p>谷歌网络搜索 (<code>"来源"："谷歌搜索"</code>) 支持 CSV 输出。要访问它，请在谷歌网络搜索任务中包含以下参数 <code>{"源"："google_search", "parse": true, "parser_type"："v2"}</code>.CSV 作业的结果检索 URL 结构如下： <code>http://data.oxylabs.io/v1/queries/{job_id}/results/normalized?format=csv</code>.</p>
<hr />
<h3 id="search-2">搜索</h3>
<h4 id="organic-amp-paid"><strong>有机和付费</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8220" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Organic-Paid.png" alt="Real-Time Crawler for Google Organic & Paid" width="603" height="437" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Organic-Paid.png 603w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Organic-Paid-300x217.png 300w" sizes="(max-width: 603px) 100vw, 603px" /></p>
<pre>"results": {
  "paid": [
    {
      "pos": 1,
      "url": "https://www.adidas.com/us",
      "desc": "New York · 10 locations nearby",
      "title": "adidas.com | adidas® Official Site | Official adidas® Online Store‎",
      "url_shown": "www.adidas.com/Official/Site",
      "pos_overall": 1
    }
  ],
  "organic": [
    {
      "pos": 1,
      "url": "https://www.adidas.com/us",
      "desc": "Welcome to adidas Shop for adidas shoes, clothing and view new collections for adidas Originals, running, football, training and much more.",
      "title": "adidas Official Website | adidas US",
      "url_shown": "https://www.adidas.com › ...",
      "pos_overall": 2
    },
    {
      "pos": 2,
      "url": "https://www.mena.adidas.com/",
      "desc": "Browse for adidas shoes, clothing and collections, adidas Originals, Running, Football, Training and more on the official adidas website.",
      "title": "adidas Official Website | adidas",
      "url_shown": "https://www.mena.adidas.com",
      "pos_overall": 6
    },
    {
      "pos": 3,
      "url": "https://www.adidas-group.com/",
      "desc": "adidas AG Supervisory Board announces candidates as shareholder ... adidas celebrates its 70th anniversary and the opening of the Arena building. August 9 ...",
      "title": "adidas - Home",
      "url_shown": "https://www.adidas-group.com",
      "pos_overall": 7
    },
    {
      "pos": 4,
      "url": "https://www.nycgo.com/shopping/the-adidas-store",
      "desc": "You don't so much shop in this flagship Adidas store as you experience it. With an interior modeled on a high school stadium, this four-story Midtown outlet—the  ...",
      "title": "The Adidas Store (Midtown) | NYCgo - NYCgo.com",
      "url_shown": "https://www.nycgo.com › shopping › the-adidas-store",
      "pos_overall": 8
    },
    {
      "pos": 5,
      "url": "https://www.yelp.com/search?find_desc=adidas+store&find_loc=Manhattan%2C+NY",
      "desc": "Reviews on Adidas Store in Manhattan, NY - Adidas, Adidas Originals New York SoHo, adidas Sport Performance, Upper 90 Soccer - Manhattan, Nike Soho, ...",
      "title": "Adidas Store Manhattan, NY - Last Updated August 2019 - Yelp",
      "url_shown": "https://www.yelp.com › search › find_desc=adidas+store",
      "pos_overall": 9
    },
    {
      "pos": 6,
      "url": "https://en.wikipedia.org/wiki/Adidas",
      "desc": "Adidas AG is a multinational corporation, founded and headquartered in Herzogenaurach, Germany, that designs and manufactures shoes, clothing and ...",
      "title": "Adidas - Wikipedia",
      "url_shown": "https://en.wikipedia.org › wiki › Adidas",
      "pos_overall": 10
    }
  ]
</pre>
<hr />
<h4 id="product-listing-ads"><strong>产品列表广告</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8221" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Product-Listing-Ads.png" alt="Real-Time Crawler for Google Product Listing Ads" width="605" height="429" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Product-Listing-Ads.png 605w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Product-Listing-Ads-300x213.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<pre>"pla"：[
  {
    "pos"：1,
    "url"："http://www.adidas.com/us/asweego-shoes/F37038.html?cm_mmc=AdieSEM_Feeds-_-GoogleProductAds-_-NA-_-F37038&amp;cm_mmca1=US&amp;cm_mmca2=NA&amp;kpid=F37038&amp;sourceid=543457011",
    价格"$40.00"、
    "标题"："adidas Asweego Shoes Black 10.5 - Mens Running Shoes"、
    "卖家"："adidas"、
    "来源"：""
  },
  {
    "pos": 2、
    "url"："http://www.adidas.com/us/baseline-shoes/AW4299.html?cm_mmc=AdieSEM_Feeds-_-GoogleProductAds-_-NA-_-AW4299&amp;cm_mmca1=US&amp;cm_mmca2=NA&amp;kpid=AW4299&amp;sourceid=543457011",
    "价格"："$50.00"、
    "标题"："adidas Baseline Shoes White 13K - Originals Shoes"、
    卖家"adidas"、
    "来源"：""
  },
  ...
  {
    "pos": 29、
    "url"："https://www.zappos.com/product/8466374/color/21766"、
    "价格"："$79.95"、
    "标题"："adidas Superstar W Originals 女式经典鞋 白色/黑色/白色 : 9 B - Medium"、
    "卖家"："Zappos.com"、
    "来源"：""
  }
]
</pre>
<hr />
<h4 id="top-stories"><strong>热门新闻</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8222" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Top-Stories.png" alt="Real-Time Crawler for Google Top Stories" width="609" height="427" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Top-Stories.png 609w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Top-Stories-300x210.png 300w" sizes="(max-width: 609px) 100vw, 609px" /></p>
<pre>"top_stories"：[
  {
    "url"："https://www.cnet.com/news/spacex-starhopper-prototype-takes-giant-leap-for-elon-musk/"、
    "来源"："Cnet"、
    "标题"："SpaceX Starhopper 火箭原型为埃隆-马斯克带来巨大飞跃"、
    "时间范围"： "13 小时前"："13 小时前
  },
  {
    "url"："https://electrek.co/2019/08/27/elon-musk-tesla-china-made-model-3-rumor/"、
    "来源"："Electrek"、
    "标题"："传伊隆-马斯克将在本周举行的活动上发布首款中国制造的特斯拉 Model 3"、
    "时间范围"16小时前"
  },
  {
    "url"："https://www.bloomberg.com/news/articles/2019-08-28/musk-to-join-china-ai-summit-despite-trump-ordering-firms-out"、
    "来源"："彭博社"、
    "标题"："埃隆-马斯克和马云将在中国峰会上就人工智能展开辩论"、
    "时间范围"："4 小时前
  }
]
</pre>
<hr />
<h4 id="featured-snippet"><strong>精选片段</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8223" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Featured-Snippet.png" alt="Real-Time Crawler for Google Featured Snippet" width="612" height="435" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Featured-Snippet.png 612w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Featured-Snippet-300x213.png 300w" sizes="(max-width: 612px) 100vw, 612px" /></p>
<pre>"featured_snippet"：[
  {
    "url"："https://en.wikipedia.org/wiki/Contract_for_difference"、
    "desc"："在金融领域，差价合约（CFD）是双方之间的一种合约，通常描述为 "买方（buyer）"和 "卖方（seller）"，规定卖方向买方支付资产当前价值与合约时间价值之间的差额（如果差额为负，则买方向卖方支付......"、
    "标题"："差价合约 - 维基百科"、
    "url_shown"："https://en.wikipedia.org ' wiki ' Contract_for_difference"、
    "pos_overall"：1
  }
]
</pre>
<hr />
<h4 id="knowledge-base"><strong>知识库</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8224" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Knowledge-Base.png" alt="Real-Time Crawler for Google Knowledge Base" width="611" height="430" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Knowledge-Base.png 611w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Knowledge-Base-300x211.png 300w" sizes="(max-width: 611px) 100vw, 611px" /></p>
<pre>"知识"：{
  "标题"："阿迪达斯"、
  "事实"：[
    {
      "标题"："股价"、
      "content"："ADDDF（OTCMKTS）$291.81 +2.74 (+0.95%)美国东部时间 8 月 23 日下午 4:00 - 免责声明"
    },
    {
      "标题"："创始人"、
      "内容"："阿道夫-达斯勒"
    },
    {
      "标题"："成立"、
      "内容"："1949年8月18日，德国黑措根奥拉赫"
    },
    {
      "标题"："总部"、
      "内容"："德国黑措根奥拉赫"
    },
    {
      "标题"："子公司"、
      "内容"："锐步、Five Ten Footwear、Runtastic、Ashworth、MORE"
    },
    {
      "标题"："网站"、
      "content"："https://www.adidas.com/us"
    }
  ],
  "副标题"："设计公司"、
  "描述"："描述阿迪达斯公司（Adidas AG）是一家跨国公司，成立于德国黑措根奥拉赫（Herzogenaurach），总部设在德国。它是欧洲最大的运动服装制造商，也是仅次于耐克的世界第二大运动服装制造商。维基百科" }
}
</pre>
<hr />
<h4 id="local-pack"><strong>本地包装</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8225" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Local-Pack.png" alt="Real-Time Crawler for Google Local Pack" width="613" height="434" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Local-Pack.png 613w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Local-Pack-300x212.png 300w" sizes="(max-width: 613px) 100vw, 613px" /></p>
<pre>"local_pack"：[
  {
    "链接"：[
      {
        "href"："https://www.adidas.com/us?utm_source=gmb&amp;utm_medium=organic&amp;utm_campaign=US470198_local"、
        "标题"："网站"
      },
      {
        "href"："#"、
        "标题"："方向"
      }
    ],
    "电话"："",
    "标题"："adidas Originals 旗舰店"、
    "评分"：0,
    "地址"："Open ⋅ Closes 7PM"、
    "副标题"："(212) 966-0954",
    "pos_overall"：3,
    "rating_count"：0
  }
]
</pre>
<hr />
<h4 id="twitter-feed"><strong>推特反馈</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8226" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Twitter-Feed.png" alt="Real-Time Crawler for Google Twitter Feed" width="617" height="433" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Twitter-Feed.png 617w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Twitter-Feed-300x211.png 300w" sizes="(max-width: 617px) 100vw, 617px" /></p>
<pre>"twitter": [
  {
    "pos": 1,
    "url": "https://twitter.com/elonmusk",
    "title": "Elon Musk (@elonmusk) · Twitter",
    "tweets": [
      {
        "url": "https://twitter.com/elonmusk/status/1166081488648949760?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
        "content": "Starhopper flight currently tracking to 5pm Texas time for 150m / ~500ft hover test",
        "timeframe": "11 hours ago"
      },
      {
        "url": "https://twitter.com/elonmusk/status/1165377786338406400?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
        "content": "Looks like @SpaceX Starhopper flight may be as soon as Monday. FAA support is much appreciated!",
        "timeframe": "2 days ago"
      },
      {
        "url": "https://twitter.com/elonmusk/status/1165371975528640512?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet",
        "content": "If you’re a utility or public utilities commission, please consider using the Tesla Megapack. Better for the environment & usually lower cost than fossil fuel peaker plants! www.tesla.com/megapack",
        "timeframe": "2 days ago"
      }
    ],
    "pos_overall": 1
  }
]
</pre>
<hr />
<h4 id="job-listings"><strong>职位列表</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8227" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Job-Listings.png" alt="Real-Time Crawler for Google Job Listings" width="620" height="432" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Job-Listings.png 620w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Job-Listings-300x209.png 300w" sizes="(max-width: 620px) 100vw, 620px" /></p>
<pre>"工作"：{
  "listings"：[
    {
      "title"："高级软件开发人员"、
      "来源"："via LinkedIn"、
      "雇主"："Jobs @ TheJobNetwork"、
      "地点"："Tulsa, OK"、
      "extra_details"：[
        "1天前"、
        全职
      ]
    },
    {
      "title"："自主车辆仿真软件工程师"、
      "来源"："via Built In Colorado"、
      "雇主"："Azevtec"、
      "地点"："美国"、
      "extra_details"：[
        "17小时前"、
        全职
      ]
    },
    {
      "title"："高级软件工程师 - Oracle 运输管理"、
      "来源"："via LinkedIn"、
      "雇主"："XPO Logistics, Inc："XPO Logistics, Inc、
      "地点"："美国"、
      "extra_details"：[
        "21小时前"、
        全职
      ]
    }
  ],
  "location_header"："美国附近"
}
</pre>
<hr />
<h4 id="carousel"><strong>旋转木马</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8229" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Carousel.png" alt="Real-Time Crawler for Google Carousel" width="617" height="437" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Carousel.png 617w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Carousel-300x212.png 300w" sizes="(max-width: 617px) 100vw, 617px" /></p>
<pre>"item_carousel"：{
  "items"：[
    {
      "title"："Chris Evans"、
      "副标题"："美国队长"
    },
    {
      "title"："Mark Ruffalo"、
      "subtitle"："绿巨人"
    },
    {
      "title"："汤姆-霍兰德
      "副标题"："蜘蛛侠"
    },
    {
      "title"："斯坦-李
      "副标题"："电视报道中的老人，巴士司机"
    },
    {
      "标题"："Chris Pratt"、
      {fnMicrosoftYaHeifs15bord1shad03aHCCb0}"字幕"："星爵"
    }
  ],
  "标题"："复仇者联盟/演员"
}
</pre>
<hr />
<h4 id="images-2"><strong>图片</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8230" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Parsed-data-Images.png" alt="Real-Time Crawler for Google Parsed data Images" width="610" height="435" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Parsed-data-Images.png 610w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Parsed-data-Images-300x214.png 300w" sizes="(max-width: 610px) 100vw, 610px" /></p>
<pre>"images": [
  {
    "alt": "Image result for contemporary wall clock",
    "href": "/search?q=contemporary+wall+clock&safe=off&hl=en&gl=US&tbm=isch&source=iu&ictx=1&fir=Qspcw8WiAmXYzM%253A%252C-m-5575uWYilbM%252C_&vet=1&usg=AI4_-kTGLIU9LAzoCJxO8gp7kK322MV8Yg&sa=X&ved=2ahUKEwjFy8rSy7HkAhWkDrkGHck7A24Q9QEwAXoECAkQBg#imgrc=Qspcw8WiAmXYzM:",
    "source": "https://www.allmodern.com/decor-pillows/sb0/wall-clocks-c429917.html"
  },
  {
    "alt": "Image result for contemporary wall clock",
    "href": "/search?q=contemporary+wall+clock&safe=off&hl=en&gl=US&tbm=isch&source=iu&ictx=1&fir=G0pFK8TQ91ls6M%253A%252Cr5nLxZQfxnA3MM%252C_&vet=1&usg=AI4_-kStPZh1tpSdQ5vTAZUIXwW4zThzQg&sa=X&ved=2ahUKEwjFy8rSy7HkAhWkDrkGHck7A24Q9QEwAnoECAkQCQ#imgrc=G0pFK8TQ91ls6M:",
    "source": "https://www.wayfair.com/decor-pillows/cat/modern-wall-clocks-c1869680.html"
  },
  ...
  {
    "alt": "Image result for contemporary wall clock",
    "href": "/search?q=contemporary+wall+clock&safe=off&hl=en&gl=US&tbm=isch&source=iu&ictx=1&fir=o4ZXIngZyr9HAM%253A%252C-m-5575uWYilbM%252C_&vet=1&usg=AI4_-kTIJMWyTs07HFcVKHTfTd6otLL82w&sa=X&ved=2ahUKEwjFy8rSy7HkAhWkDrkGHck7A24Q9QEwCnoECAkQIQ#imgrc=o4ZXIngZyr9HAM:",
    "source": "https://www.allmodern.com/decor-pillows/sb0/wall-clocks-c429917.html"
  }
]
</pre>
<hr />
<h4 id="related-questions"><strong>相关问题</strong></h4>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8231" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Related-Questions.png" alt="Real-Time Crawler for Google Related Questions" width="625" height="433" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Related-Questions.png 625w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Related-Questions-300x208.png 300w" sizes="(max-width: 625px) 100vw, 625px" /></p>
<pre>"相关问题"：[
  {
    "pos"：1,
    "问题"："阿迪达斯代表什么？"
  },
  {
    "pos": 2、
    {fn华文楷体fs121cH0080FFi1}"问题""阿迪达斯是德国的吗？"
  },
  {
    "pos"：3,
    "question"："乔丹鞋是阿迪达斯的吗？"
  },
  {
    "pos"：4,
    "question"："阿迪达斯旗下有哪些鞋类品牌？"
  }
]
</pre>
<hr />
<h3 id="shopping-search-2">购物搜索</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8232" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search2.png" alt="Real-Time Crawler for Google Shopping Search2" width="612" height="398" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search2.png 612w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Search2-300x195.png 300w" sizes="(max-width: 612px) 100vw, 612px" /></p>
<pre>...
"有机"：[
            {
              "pos"：1,
              "url"："/aclk?sa=l&amp;ai=DChcSEwju8fmd84jpAhUPTxgKHQshDIcYABAHGgJsZQ&amp;sig=AOD64_1BTHVcnNzI5775j9xNkILrCU2KYA&amp;ctype=5&amp;q=&amp;ved=0ahUKEwjpr_Sd84jpAhVI2aYKHYn1CeMQvxMI4wQ&amp;adurl="、
              "类型"："网格"、
              价格85,
              "标题"："阿迪达斯白色 Swift Run 女士休闲鞋......"、
              "商家"：{
                "url"："/aclk?sa=l&amp;ai=DChcSEwju8fmd84jpAhUPTxgKHQshDIcYABAHGgJsZQ&amp;sig=AOD64_1BTHVcnNzI5775j9xNkILrCU2KYA&amp;ctype=5&amp;q=&amp;ved=0ahUKEwjpr_Sd84jpAhVI2aYKHYn1CeMQg-UECOoE&amp;adurl="、
                "名称"："终点线"
              },
              "price_str"："$85.00."、
              "pos_overall"：1
            },
            {
              "pos": 2、
              "url"："/shopping/product/4092922174439754197?uule=w+CAIQICIXQ29sb3JhZG8sIFVuaXRlZCBTdGF0ZXM&amp;q=adidas&amp;prds=epd:6096059639745774212,paur:ClkAsKraX5cxKGk1E_r15f66xbFqydL47KoF9cO04jau1Hw_EeaJnz0EV5mb_JEjRlE5_m7N_B5Vg-krR5766rvdESfkczSSBqkGVDV7A5Ts8BlTUCNfpUxgtxIZAFPVH73vXbe47J5qGlzkfYH83D9zVPSv8w,prmr：1&amp;sa=X&amp;ved=0ahUKEwjpr_Sd84jpAhVI2aYKHYn1CeMQvxMI7AQ"、
              "类型"："网格"、
              "价格"：139.97,
              "标题"："阿迪达斯男式 Alphaboost 白色训练鞋......"、
              "商家"：{
                "url"："/aclk?sa=l&amp;ai=DChcSEwju8fmd84jpAhUPTxgKHQshDIcYABAEGgJsZQ&amp;sig=AOD64_3S0xuLlA1GOzNxCvYQdpeTLZkRyQ&amp;ctype=5&amp;q=&amp;ved=0ahUKEwjpr_Sd84jpAhVI2aYKHYn1CeMQg-UECPQE&amp;adurl="、
                "名称"："Baseball Savings.com
              },
              "price_str"："$139.97."、
              "pos_overall"：2
            },
...
</pre>
<hr />
<h3 id="shopping-product-2">购物产品</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8233" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product2.png" alt="Real-Time Crawler for Google Shopping Product2" width="611" height="429" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product2.png 611w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product2-300x211.png 300w" sizes="(max-width: 611px) 100vw, 611px" /></p>
<pre>...
{
  "类型"："捆绑"、
  "项目"：[
    {
      "值"："仅控制台"、
      "selected": true、
      "available": true、
      "product_id"："5007040952399054528"
    },
    {
      "值"："Splatoon 2 捆绑包"、
      "available": false、
      "product_id"："6767220879106424425"
    },
    {
      "值"： false"超级马里奥奥德赛版"、
      "available": false、
      "product_id"："11634753303078094444"
    }
  ]
}
...
</pre>
<hr />
<h3 id="shopping-product-pricing-2">购物产品定价</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8234" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing2.png" alt="Real-Time Crawler for Google Shopping Product Pricing2" width="614" height="432" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing2.png 614w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Google-Shopping-Product-Pricing2-300x211.png 300w" sizes="(max-width: 614px) 100vw, 614px" /></p>
<pre>"内容"：{
  "url"："https://www.google.com/shopping/product/5007040952399054528/online",
  "标题"："Nintendo Switch with Joy-Con - 32 GB - 灰色/黑色"、
  "评分"：4.5,
  "定价"：[
    {
      价格319.99,
      "卖方"："Electronic Express"、
      "详情"："免运费"、
      "货币"："$"、
      "price_tax"：0,
      "price_total": 319.99、
      "seller_link"："/aclk?sa=l&amp;ai=DChcSEwi9t9HqoJ7mAhVCXw0KHdyPBEYYABABGgJxYg&amp;sig=AOD64_2gaL_J1BQ5J5PR-JazDM86N23Nww&amp;adurl=&amp;ctype=5&amp;q="、
      "price_shipping"：0
    },
    {
      "价格"：334.99,
      "卖家"："ShopZodys"、
      "详情"："12 月 9 - 13 日到达"、
      "货币"："$"、
      "价格税"：27.69,
      "price_total": 412.67、
      "seller_link"："/aclk?sa=l&amp;ai=DChcSEwi9t9HqoJ7mAhVCXw0KHdyPBEYYABADGgJxYg&amp;sig=AOD64_1Rqy4wxKvZXAaoX9FNDBy379EAAA&amp;adurl=&amp;ctype=5&amp;q="、
      "price_shipping"：49.99
    }
</pre>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="user-agent">用户代理</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
  {
    "user_agent_type"："桌面"、
    "描述"："随机桌面浏览器用户代理"
  },
  {
    "user_agent_type"："desktop_firefox"、
    "描述"："最新版桌面火狐浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_chrome"、
    "description"："最新版桌面 Chrome 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_opera"、
    "description"："最新版本桌面 Opera 的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_edge"、
    "description"："桌面边缘最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_safari"、
    "description"："桌面 Safari 最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："mobile"、
    "description"："随机移动浏览器用户代理"
  },
  {
    "user_agent_type"："mobile_android"、
    "description"（描述）："最新版本安卓浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："mobile_ios"、
    "描述"："最新版本 iPhone 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："平板电脑"、
    "描述"："随机平板电脑浏览器用户代理"
  },
  {
    "user_agent_type"："tablet_android"、
    "描述"："最新版本安卓平板电脑的随机用户代理"。
  },
  {
    "user_agent_type"："tablet_ios"、
    "description"："最新版本 iPad 平板电脑的随机用户代理"。
  }
]
</pre>
<hr />
<h3 id="locale">地点</h3>
<p>下载完整列表 <code>地点</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/locale.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
   {
      "locale":{
         "en-ai":{
            "description": "Anguilla - English"、
            "domain": "com.ai"。
         },
         "es-pr":{
            "description": "Puerto Rico - Spanish"、
            "域": "com.pr"
         },
         ...
         "en-by":{
            "description": "Belarus - English"、
            "domain": "by" }.
         },
         "en-in":{
            "description": "India - English"、
            domain": "co.in" }, "en-in":{ "description": "India - English", "domain": "co.in"
         }
      }
   }
]
</pre>
<hr />
<h3 id="results-language">结果 语言</h3>
<p>下载完整列表 <code>results_language</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/results_language.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
 {
   "results_language"："af"、
   "语言"："南非荷兰语"
 },
 {
   "results_language"："ar"、
   "语言"："阿拉伯语"
 },
 ...
 {
   "results_language"："vi"、
   "语言"："越南语"
 }
]
</pre>
<hr />
<h3 id="geo_location">地理位置</h3>
<p>有几种方法可以使用 <code>地理位置</code> 参数，以获得正确本地化的 Google 结果。</p>
<ul>
<li><strong>使用 Google 的规范位置名称</strong>.这非常简单。只需将 CSV 下载中的一个值传递给我们即可 <a class="custom_link" href="https://developers.google.com/adwords/api/docs/appendix/geotargeting" target="_blank" rel="nofollow noopener">这里</a>.例如 <code>"geo_location"："纽约州纽约市美国"</code>.</li>
<li><strong>使用州名</strong>.剔除 Google 标准位置名称的前半部分，并传递一个 <code>地理位置</code> 在 <code>"州、国家"</code> 格式。适用于美国、澳大利亚、印度和其他联邦制国家。举例说明 <code>"地理位置"："美国加利福尼亚州"</code>.</li>
<li><strong>使用国家名称</strong>.若要获取某个国家地理中心点的本地化结果，请输入官方国家名称。例如 <code>"geo_location"：英国</code>.</li>
<li><strong>使用坐标和半径</strong>.要获得超本地搜索结果（尤其适用于 "我附近的餐馆 "等搜索），可以传递纬度、经度和半径值。下面的示例传递的是华盛顿州西雅图 Space Needle 的坐标： <code>"geo_location"："lat: 47.6205, lng：-122.3493, rad: 25000"</code>.</li>
</ul>
<p>如果通过拼写错误的 <code>地理位置</code> 参数，我们或 Google 有可能会为您解释并更正。不过，我们建议使用上述参数结构，并结合 <code>地点</code> 和 <code>领域</code> 参数，以获得最准确的结果。</p>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>该查询将返回所有时间的统计数据。您可以通过添加 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "数据"：{
        "sources"：[
            {
                "realtime_results_count"："90",
                "results_count"："10",
                "标题"："谷歌酒店"
            },
            {
                "realtime_results_count"："19",
                "results_count"："87",
                "标题"："谷歌搜索"
            }
        ]
    },
    "元"：{
        "group_by": null
    }
}
</pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下终端将提供您的每月承诺信息以及已使用的金额：</p>
<pre>GET https://data.oxylabs.io/v1/stats/limits
</pre>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats/limits'
</pre>
<p>输出示例</p>
<pre>{
    "monthly_requests_commitment"：4500000,
    "used_requests"：985000
}
</pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
</tbody>
</table>
</div>
<p>解析后的数据响应代码：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>12000</code></td>
<td>成功</td>
<td>返回的解析内容是完整的，不应有缺失或损坏的字段。</td>
</tr>
<tr>
<td><code>12002</code></td>
<td>失败</td>
<td>我们无法完全解析该页面。可能是目标网站更改了 HTML 结构。</td>
</tr>
<tr>
<td><code>12003</code></td>
<td>不支持</td>
<td>不支持您要求我们解析的网页。</td>
</tr>
<tr>
<td><code>12004</code></td>
<td>部分成功</td>
<td>我们能够解析页面的大部分内容，但有几个字段缺失。</td>
</tr>
<tr>
<td><code>12005</code></td>
<td>部分成功</td>
<td>我们能够解析页面的大部分内容，但可能有一些字段带有默认值，因为我们无法在 HTML 中找到它们。</td>
</tr>
<tr>
<td><code>12006</code></td>
<td>失败</td>
<td>意外错误。请告诉我们您收到了这样的回复，我们会检查出错的原因。</td>
</tr>
<tr>
<td><code>12007</code></td>
<td>未知</td>
<td>未知解析数据状态。实际结果可能从完全失败到完全成功不等。</td>
</tr>
<tr>
<td><code>12008</code></td>
<td>失败</td>
<td>解析内容丢失。</td>
</tr>
<tr>
<td><code>12009</code></td>
<td>失败</td>
<td>未找到产品。请检查您提交的 URL。</td>
</tr>
</tbody>
</table>
</div>
<p>云存储上传响应代码：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>10001</code></td>
<td>意外异常</td>
<td>发生了严重的错误。我们可能已经知道，并正在修复。无论如何，请告诉我们。</td>
</tr>
<tr>
<td><code>13000</code></td>
<td>上传成功</td>
<td>一切顺利！</td>
</tr>
<tr>
<td><code>13001</code></td>
<td>上传失败</td>
<td>我们无法上传您的工作结果。</td>
</tr>
<tr>
<td><code>13102</code></td>
<td>没有这样的道路</td>
<td>我们找不到这样名字的水桶。请仔细检查。</td>
</tr>
<tr>
<td><code>13103</code></td>
<td>拒绝访问</td>
<td>Bucket 没有所需的权限。要了解如何授予我们必要的权限，请参阅 <a href="#upload-to-storage">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li><a href="https://docs.oxylabs.io/rtc/source/google/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/source/google/index.html</a></li>
<li><a href="https://docs.oxylabs.io/rtc/source/google/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/index.html</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-real-time-crawler/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7623</post-id>	</item>
		<item>
		<title>How to Use OxyLabs Real-Time Crawler [Part 2]: Real-Time Crawler for Yandex</title>
		<link>https://proxysp.com/zh/oxylabs-yandex-real-time-crawler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-yandex-real-time-crawler</link>
					<comments>https://proxysp.com/zh/oxylabs-yandex-real-time-crawler/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7633</guid>

					<description><![CDATA[你知道如何使用 OxyLabs Real-time Crawler for Yandex 吗？这是 OxyLabs 官方最全面的介绍。快速入门 实时抓取程序是由 OxyLabs 官方开发的...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-yandex-real-time-crawler/"> <span class="screen-reader-text">如何使用 OxyLabs 实时爬虫 [第 2 部分]：用于 Yandex 的实时爬虫</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 OxyLabs Real-time Crawler for Yandex 吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>Real-Time Crawler 专为重型数据检索操作而设计。你可以使用 Real-Time Crawler 访问各种 Yandex 网页。它能毫不费力地从搜索引擎中提取网络数据，不会出现任何延迟或错误。</p>
<p>用于 Yandex 的实时抓取器 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用 Yandex 实时爬虫的最快方法。您将发送一个查询 <code>阿迪达斯</code> 至 <code>搜索</code> 使用 <a href="#realtime">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："yandex_search", "domain"："com"，"query"："adidas"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="integration-methods">整合方法</h2>
<p>Real-Time Crawler for Yandex 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅 <a href="#callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。你可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。</p>
<p>这样，一旦作业准备就绪，我们就会向您发送回调消息。在本例中，结果将自动 <a href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query"><strong>单一查询</strong></h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex_search", "domain"："com"，"query"："adidas", "callback_url"："https://your.callback.url"，"storage_type"："s3"，"storage_url"："your_bucket_name"}'
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "callback_url"："https://your.callback.url"、
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "查询"："adidas"、
  "来源"："yandex_search"、
  "start_page"：1,
  "状态"："pending"、
  "storage_type"："s3",
  "storage_url"："YOUR_BUCKET_NAME/12345678900987654321.json",
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:01",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="check-job-status"><strong>检查工作状态</strong></h4>
<p>如果您的查询有 <code>回调URL</code>一旦完成刮擦任务，我们将向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}
</pre>
<p>查询该链接将返回工作信息，包括其 <code>地位</code>.有 3 种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出了问题，我们无法完成，很可能是目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321'
</pre>
<p>API 将在响应正文中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre>{
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "查询"："adidas"、
  "来源"："yandex_search"、
  "start_page"：1,
  "状态"："done"、
  "子域"："www"、
  "updated_at"："2019-10-01 00:00:15",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="retrieve-job-content"><strong>检索工作内容</strong></h4>
<p>通过检查作业状态或接收我们的回调，一旦知道作业已准备就绪，您就可以使用以下 URL 获取作业 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应或回调信息中。看起来应该类似于下面这样： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}/results
</pre>
<p>通过设置 "任务状态"，可以自动检索结果，而无需定期检查任务状态。 <a href="#callback">回调</a> 服务。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项任务时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如 <a href="#callback">回调实现示例</a>.</p>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321/results'
</pre>
<p>API 将返回工作内容：</p>
<pre>{
  "结果"：[
    {
      "content"："&lt;!
        内容
      &quot;,
      &quot;created_at&quot;：&quot;2019-10-01 00:00:01&quot;,
      &quot;更新时间&quot;：&quot;2019-10-01 00:00:15&quot;,
      &quot;页&quot;：1,
      &quot;url&quot;：&quot;https://www.yandex.com/search?q=adidas&amp;hl=en&amp;gl=US&quot;、
      &quot;job_id&quot;：&quot;12345678900987654321&quot;,
      &quot;status_code&quot;：200
    }
  ]
}
</pre>
<hr />
<h4 id="callback"><strong>回调</strong></h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a href="#check-job-status">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a href="#retrieve-job-content">取回</a>.</p>
<pre># 请查看 Python 和 PHP 代码示例。
</pre>
<p>回调输出示例</p>
<pre>{
   "created_at":"2019-10-01 00:00:01",
   "updated_at":"2019-10-01 00:00:15",
   "locale":null、
   "client_id":163、
   "user_agent_type": "desktop"、
   "来源": "yandex_search"、
   "页面":1、
   "子域": "www"、
   "status": "done"、
   "start_page":1、
   "parse":0、
   "render":null、
   "priority":0、
   "ttl":0、
   "origin": "api"、
   "persist":true、
   "id":"12345678900987654321",
   "callback_url": "http://your.callback.url/"、
   "query": "adidas"、
   "domain": "com"、
   "limit":10、
   "geo_location":null、
   {...}
   "_links":[
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321",
         "method": "GET"、
         "rel": "self"
      },
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321/results",
         "method": "GET"、
         "rel": "results" }
      }
   ],
}
</pre>
<hr />
<h4 id="batch-query"><strong>批量查询</strong></h4>
<p>实时爬虫还支持执行多个关键字，每批最多可执行 1,000 个关键字。以下端点将向提取队列提交多个关键词。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries/batch
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键词作为一个单独请求处理。如果您提供了回调 URL，您将为每个关键字收到单独的调用。否则，我们的初始响应将包含工作 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries/batch' -H 'Content-Type: application/json' -d '@keywords.json
 -d'@keywords.json'（关键词
</pre>
<p><code>keywords.json</code> 内容：</p>
<pre>{
   "query":[
      "阿迪达斯"、
      "耐克"、
      "蕾博克"
   ],
   "来源"："yandex_search"、
   "域"："com"、
   "callback_url"："https://your.callback.url"
}
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "查询"：[
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678900987654321",
      {...}
      "查询"："阿迪达斯"、
      "来源"："yandex_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678901234567890",
      {...}
      "查询"："NIKE"、
      "来源"："yandex_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678901234567890/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："01234567899876543210",
      {...}
      "查询"："reebok"、
      "来源"："yandex_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/01234567899876543210/results",
          "method"："GET"
        }
      ]
    }
  ]
}
</pre>
<hr />
<h4 id="get-notifier-ip-address-list"><strong>获取通知程序 IP 地址列表</strong></h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/info/callbacker_ips'
</pre>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre>{
    "ips"：[
        "x.x.x.x"、
        "y.y.y.y"
    ]
}
</pre>
<hr />
<h4 id="upload-to-storage"><strong>上传到存储器</strong></h4>
<p>默认情况下，RTC 任务结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优势在于，您无需为了获取结果而发出额外请求，所有内容都会直接存储到您的存储桶中。</p>
<p>我们支持亚马逊 S3 和谷歌云存储。如果您想使用其他类型的存储，请联系您的客户经理，讨论功能交付时间表。</p>
<p id="amazon-s3"><strong>亚马逊 S3</strong></p>
<p>要将作业结果上传到 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请访问 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8241" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage1.png" alt="Real-Time Crawler for Yandex Upload to Storage1" width="486" height="325" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage1.png 486w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage1-300x201.png 300w" sizes="(max-width: 486px) 100vw, 486px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://docs.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记在 <code>您的邮筒名称</code>.通过该策略，我们可以向您的邮筒写入内容，允许您访问上传的文件，并了解邮筒的位置。</p>
<p id="google-cloud-storage"><strong>谷歌云存储</strong></p>
<p>要将作业结果上传到您的 Google Cloud Storage 存储桶，请为我们的服务设置特殊权限。为此，请使用 <code>存储.对象.创建</code> 权限并将其分配给 Oxylabs 服务帐户电子邮件 <code>oxyserps-storage@oxyserps-storage.iam.gserviceaccount.com</code>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8242" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage2.png" alt="Real-Time Crawler for Yandex Upload to Storage2" width="480" height="331" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage2.png 480w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage2-300x207.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8243" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage3.png" alt="Real-Time Crawler for Yandex Upload to Storage3" width="481" height="666" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage3.png 481w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Upload-to-Storage3-217x300.png 217w" sizes="(max-width: 481px) 100vw, 481px" /></p>
<p id="usage"><strong>使用方法</strong></p>
<p>要使用此功能，请在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到职位 ID。在 <a href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre>{
    "版本"："2012-10-17",
    "Id"："Policy1577442634787",
    "声明"：[
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"："s3:GetBucketLocation"、
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME" }.
        },
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"：[
                "s3:PutObject"、
                "s3:PutObjectAcl"。
            ],
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME/*"。
        }
    ]
}
</pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交方式与推拉方式相同，但在实时情况下，我们将在连接打开时返回内容。您向我们发送查询，连接保持打开，我们检索内容并发送给您。处理的端点如下：</p>
<pre>邮寄 https://realtime.oxylabs.io/v1/queries
</pre>
<p>开放连接的超时限制为 150 秒，因此在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex_search", "domain"："com", "query"："adidas"}'
</pre>
<p>打开连接时将返回的响应体示例：</p>
<pre>{
  "结果"：[
    {
      "content"："
      内容
      "
      "created_at"："2019-10-01 00:00:01",
      "更新时间"："2019-10-01 00:00:15",
      "id": null、
      "page"：1,
      "url"："https://www.yandex.com/search?q=adidas&amp;hl=en&amp;gl=US"、
      "job_id"："12345678900987654321",
      "status_code"：200
    }
  ]
}
</pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。只需将我们的入口节点用作代理，使用实时爬虫凭据进行授权，并忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<pre>GET realtime.oxylabs.io:60000
</pre>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是可接受的参数列表：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a href="#user-agent">这里</a>.</td>
</tr>
<tr>
<td><code>X-OxySERPs-地理位置</code></td>
<td>Yandex 中的地理位置 <code>rstr</code> 格式</td>
</tr>
</tbody>
</table>
</div>
<p>如果您在设置超级用户接口时需要帮助，请致电 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 -H "X-OxySERPs-User-Agent-Type: desktop_chrome"
-H "X-OxySERPs-Geo-Location：15550" "https://yandex.com/search/?text=nike"
</pre>
<hr />
<h2 id="content-type">内容类型</h2>
<p>实时爬虫返回 <strong>原始HTML</strong>.</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>使用实时爬虫从 Yandex 检索数据有两种方法。您可以通过以下方式向我们提供完整的 URL <a href="#direct">直接</a>或者您可以通过专门构建的数据源--"...... "来指定参数。 <a href="#search">搜索</a>.</p>
<p>从技术上讲，这不是一种内容类型，但实时抓取器能够在抓取时呈现 JavaScript。这在某些 Yandex 页面中可能是必要的。在 <code>渲染 JS</code> 将指示特定数据源是否可以在启用 JavaScript 的情况下进行刮擦。</p>
<p>如果您不确定选择哪种方式，请给我们留言 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8248 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Direct.png" alt="Real-Time Crawler for Yandex Direct" width="442" height="25" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Direct.png 442w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Direct-300x17.png 300w" sizes="(max-width: 442px) 100vw, 442px" /></p>
<p><code>yandex</code> 源的目的是检索各种 Yandex 页面的直接 URL 内容。这意味着您可以向我们提供所需的 Yandex 页面的直接 URL，而无需发送多个参数。我们不会删除任何参数或以任何其他方式更改您的 URL。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">yandex</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">指向 Yandex 页面的直接 URL（链接</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在<a href="#upload-to-storage"> 上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，应用程序接口将检索 Yandex 搜索关键字 <code>耐克</code> 推拉法</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex", "url"："https://yandex.com/search/?text=nike&amp;"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex", "url"："https://yandex.com/search/?text=nike&amp;"}'
</pre>
<p>并通过超级用户接口（SuperAPI）：</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://yandex.com/search/?text=nike&amp;"
</pre>
<hr />
<h3 id="search">搜索</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8250 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Search.png" alt="Real-Time Crawler for Yandex Search" width="424" height="27" srcset="https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Search.png 424w, https://proxysp.com/wp-content/uploads/2021/09/Real-Time-Crawler-for-Yandex-Search-300x19.png 300w" sizes="(max-width: 424px) 100vw, 424px" /></p>
<p><code>搜索</code> 源用于检索 Yandex 搜索结果（SERP）。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">搜索</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化。可用域名：com、ru、ua、by、kz、tr</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">限额</td>
<td style="font-weight: 400;" width="72">每页要检索的结果数量</td>
<td style="font-weight: 400;" width="72">10</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">语言。可用语言：en、ru、by、fr、de、id、kk、tt、tr、uk。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">Yandex rstr 格式的地理位置</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p id="search">API 向 <code>yandex.com</code> 检索关键字从第 11 到第 20 的搜索结果页面 <code>阿迪达斯</code>.API 将向 <code>your.callback.url</code> 包含 URL，以便在数据检索任务成功完成后下载原始 HTML 输出。这就是推拉式：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："yandex_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="user-agent">用户代理</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
  {
    "user_agent_type"："桌面"、
    "描述"："随机桌面浏览器用户代理"
  },
  {
    "user_agent_type"："desktop_firefox"、
    "描述"："最新版桌面火狐浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_chrome"、
    "description"："最新版桌面 Chrome 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_opera"、
    "description"："最新版本桌面 Opera 的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_edge"、
    "description"："桌面边缘最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_safari"、
    "description"："桌面 Safari 最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："mobile"、
    "description"："随机移动浏览器用户代理"
  },
  {
    "user_agent_type"："mobile_android"、
    "description"（描述）："最新版本安卓浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："mobile_ios"、
    "描述"："最新版本 iPhone 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："平板电脑"、
    "描述"："随机平板电脑浏览器用户代理"
  },
  {
    "user_agent_type"："tablet_android"、
    "描述"："最新版本安卓平板电脑的随机用户代理"。
  },
  {
    "user_agent_type"："tablet_ios"、
    "description"："最新版本 iPad 平板电脑的随机用户代理"。
  }
]
</pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>该查询将返回所有时间的统计数据。您可以通过添加 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "数据"：{
        "sources"：[
            {
                "realtime_results_count"："90",
                "results_count"："10",
                "标题"："yandex
            },
            {
                "realtime_results_count"："19",
                "results_count"："87",
                "标题"："yandex_search
            }
        ]
    },
    "元"：{
        "group_by": null
    }
}
</pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下终端将提供您的每月承诺信息以及已使用的金额：</p>
<pre>GET https://data.oxylabs.io/v1/stats/limits
</pre>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats/limits'
</pre>
<p>输出示例</p>
<pre>{
    "monthly_requests_commitment"：4500000,
    "used_requests"：985000
}
</pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
</tbody>
</table>
</div>
<p>云存储上传响应代码：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>10001</code></td>
<td>意外异常</td>
<td>发生了严重的错误。我们可能已经知道，并正在修复。无论如何，请告诉我们。</td>
</tr>
<tr>
<td><code>13000</code></td>
<td>上传成功</td>
<td>一切顺利！</td>
</tr>
<tr>
<td><code>13001</code></td>
<td>上传失败</td>
<td>我们无法上传您的工作结果。</td>
</tr>
<tr>
<td><code>13102</code></td>
<td>没有这样的道路</td>
<td>我们找不到这样名字的水桶。请仔细检查。</td>
</tr>
<tr>
<td><code>13103</code></td>
<td>拒绝访问</td>
<td>Bucket 没有所需的权限。要了解如何授予我们必要的权限，请参阅 <a href="#upload-to-storage">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li><a href="https://docs.oxylabs.io/rtc/source/yandex/index.html#quick-start" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/source/yandex/index.html</a></li>
<li><a href="https://docs.oxylabs.io/rtc/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/index.html</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-yandex-real-time-crawler/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7633</post-id>	</item>
		<item>
		<title>How to Use Bing Real-Time Crawler [Part 3]: Oxylabs Real-Time Crawler for Bing</title>
		<link>https://proxysp.com/zh/oxylabs-bing-real-time-crawler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-bing-real-time-crawler</link>
					<comments>https://proxysp.com/zh/oxylabs-bing-real-time-crawler/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7634</guid>

					<description><![CDATA[你知道如何使用 OxyLabs Real-time Crawler for Bing 吗？这是 OxyLabs 官方最全面的介绍。快速入门 实时抓取程序是由 OxyLabs ...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-bing-real-time-crawler/"> <span class="screen-reader-text">如何使用必应实时爬虫 [第 3 部分]：Oxylabs 必应实时爬虫</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 OxyLabs Real-time Crawler for Bing 吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>Real-Time Crawler 专为重型数据检索操作而设计。你可以使用 Real-Time Crawler 访问各种必应网页。它能毫不费力地从搜索引擎中提取网页数据，不会出现任何延迟或错误。</p>
<p>必应使用的实时爬虫 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是目前开始使用必应实时爬虫的最快方法。您将发送一个查询 <code>阿迪达斯</code> 至 <code>bing_search</code> 使用 <a href="#realtime">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："bing_search", "domain"："com", "query"："adidas"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="integration-methods">整合方法</h2>
<p>Real-Time Crawler for Bing 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅 <a href="#callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。你可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。</p>
<p>这样，一旦作业准备就绪，我们就会向您发送回调消息。在本例中，结果将自动 <a href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query"><strong>单一查询</strong></h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing_search", "domain"："com", "query"："adidas", "callback_url"："https://your.callback.url"，"storage_type"："s3"，"storage_url"："your_bucket_name"}'
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "callback_url"："https://your.callback.url"、
  "client_id"：5,
  "context"：[
    {
      "key"："safe_search"、
      "value": null
    }
  ],
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "render": null、
  "query"："adidas"、
  "来源"："bing_search"、
  "start_page"：1,
  "状态"："pending"、
  "storage_type"："s3",
  "storage_url"："YOUR_BUCKET_NAME/12345678900987654321.json",
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:01",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="check-job-status"><strong>检查工作状态</strong></h4>
<p>如果您的查询有 <code>回调URL</code>一旦完成刮擦任务，我们将向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}
</pre>
<p>查询该链接将返回工作信息，包括其 <code>地位</code>.有 3 种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出了问题，我们无法完成，很可能是目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321'
</pre>
<p>API 将在响应正文中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre>{
  "client_id"：5,
  "context"：[
    {
      "key"："safe_search"、
      "value": null
    }
  ],
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "render": null、
  "query"："adidas"、
  "来源"："bing_search"、
  "start_page"：1,
  "状态"："done"、
  "子域"："www"、
  "updated_at"："2019-10-01 00:00:15",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="retrieve-job-content"><strong>检索工作内容</strong></h4>
<p>通过检查作业状态或接收我们的回调，一旦知道作业已准备就绪，您就可以使用以下 URL 获取作业 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应或回调信息中。看起来应该类似于下面这样： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}/results
</pre>
<p>通过设置 "任务状态"，可以自动检索结果，而无需定期检查任务状态。 <a href="#callback">回调</a> 服务。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项任务时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如 <a href="#callback">回调实现示例</a>.</p>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321/results'
</pre>
<p>API 将返回工作内容：</p>
<pre>{
  "结果"：[
    {
      "content"："&lt;!
        内容
      &quot;,
      &quot;created_at&quot;：&quot;2019-10-01 00:00:01&quot;,
      &quot;更新时间&quot;：&quot;2019-10-01 00:00:15&quot;,
      &quot;页&quot;：1,
      &quot;url&quot;：&quot;https://www.bing.com/search?q=adidas&quot;、
      &quot;job_id&quot;：&quot;12345678900987654321&quot;,
      &quot;status_code&quot;：200
    }
  ]
}
</pre>
<hr />
<h4 id="callback"><strong>回调</strong></h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a href="#check-job-status">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a href="#retrieve-job-content">取回</a>.</p>
<pre># 请查看 Python 和 PHP 代码示例。
</pre>
<p>回调输出示例</p>
<pre>{
   "created_at":"2019-10-01 00:00:01",
   "updated_at":"2019-10-01 00:00:15",
   "locale":null、
   "client_id":163、
   "user_agent_type": "desktop"、
   "source": "bing_search"、
   "页面":1、
   "子域": "www"、
   "status": "done"、
   "start_page":1、
   "render":null、
   "priority":0、
   "ttl":0、
   "origin": "api"、
   "persist":true、
   "id":"12345678900987654321",
   "callback_url": "http://your.callback.url/"、
   "query": "adidas"、
   "domain": "com"、
   "limit":10、
   "geo_location":null、
   {...}
   "_links":[
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321",
         "method": "GET"、
         "rel": "self"
      },
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321/results",
         "method": "GET"、
         "rel": "results" }
      }
   ],
}
</pre>
<hr />
<h4 id="batch-query"><strong>批量查询</strong></h4>
<p>实时爬虫还支持执行多个关键字，每批最多可执行 1,000 个关键字。以下端点将向提取队列提交多个关键词。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries/batch
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键词作为一个单独请求处理。如果您提供了回调 URL，您将为每个关键字收到单独的调用。否则，我们的初始响应将包含工作 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries/batch' -H 'Content-Type: application/json' -d '@keywords.json
 -d'@keywords.json'（关键词
</pre>
<p><code>keywords.json</code> 内容：</p>
<pre>{
   "query":[
      "阿迪达斯"、
      "耐克"、
      "蕾博克"
   ],
   "来源"："bing_search"、
   "域"："com"、
   "callback_url"："https://your.callback.url"
}
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "查询"：[
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678900987654321",
      {...}
      "查询"："阿迪达斯"、
      "来源"："bing_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678901234567890",
      {...}
      "查询"："NIKE"、
      "来源"："bing_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678901234567890/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："01234567899876543210",
      {...}
      "查询"："reebok"、
      "来源"："bing_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/01234567899876543210/results",
          "method"："GET"
        }
      ]
    }
  ]
}
</pre>
<hr />
<h4 id="get-notifier-ip-address-list"><strong>获取通知程序 IP 地址列表</strong></h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/info/callbacker_ips'
</pre>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre>{
    "ips"：[
        "x.x.x.x"、
        "y.y.y.y"
    ]
}
</pre>
<hr />
<h4 id="upload-to-storage"><strong>上传到存储器</strong></h4>
<p>默认情况下，RTC 任务结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优势在于，您无需为了获取结果而发出额外请求，所有内容都会直接存储到您的存储桶中。</p>
<p>我们支持亚马逊 S3 和谷歌云存储。如果您想使用其他类型的存储，请联系您的客户经理，讨论功能交付时间表。</p>
<p id="amazon-s3"><strong>亚马逊 S3</strong></p>
<p>要将作业结果上传到 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请访问 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8257" src="https://www.proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage1.png" alt="oxylabs Real-Time Crawler for Bing Upload to Storage1" width="485" height="325" srcset="https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage1.png 485w, https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage1-300x201.png 300w" sizes="(max-width: 485px) 100vw, 485px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://docs.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记在 <code>您的邮筒名称</code>.通过该策略，我们可以向您的邮筒写入内容，允许您访问上传的文件，并了解邮筒的位置。</p>
<p id="google-cloud-storage"><strong>谷歌云存储</strong></p>
<p>要将作业结果上传到您的 Google Cloud Storage 存储桶，请为我们的服务设置特殊权限。为此，请使用 <code>存储.对象.创建</code> 权限并将其分配给 Oxylabs 服务帐户电子邮件 <code>oxyserps-storage@oxyserps-storage.iam.gserviceaccount.com</code>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8258" src="https://www.proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage2.png" alt="oxylabs Real-Time Crawler for Bing Upload to Storage2" width="484" height="311" srcset="https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage2.png 484w, https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage2-300x193.png 300w" sizes="(max-width: 484px) 100vw, 484px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8259" src="https://www.proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage3.png" alt="oxylabs Real-Time Crawler for Bing Upload to Storage3" width="484" height="668" srcset="https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage3.png 484w, https://proxysp.com/wp-content/uploads/2021/09/oxylabs-Real-Time-Crawler-for-Bing-Upload-to-Storage3-217x300.png 217w" sizes="(max-width: 484px) 100vw, 484px" /></p>
<p id="usage"><strong>使用方法</strong></p>
<p>要使用此功能，请在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到职位 ID。在 <a href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre>{
    "版本"："2012-10-17",
    "Id"："Policy1577442634787",
    "声明"：[
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"："s3:GetBucketLocation"、
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME" }.
        },
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"：[
                "s3:PutObject"、
                "s3:PutObjectAcl"。
            ],
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME/*"。
        }
    ]
}
</pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交方式与推拉方式相同，但在实时情况下，我们将在连接打开时返回内容。您向我们发送查询，连接保持打开，我们检索内容并发送给您。处理的端点如下：</p>
<pre>邮寄 https://realtime.oxylabs.io/v1/queries
</pre>
<p>开放连接的超时限制为 150 秒，因此在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing_search", "domain"："com", "query"："adidas"}'
</pre>
<p>打开连接时将返回的响应体示例：</p>
<pre>{
  "结果"：[
    {
      "content"："
      内容
      "
      "created_at"："2019-10-01 00:00:01",
      "更新时间"："2019-10-01 00:00:15",
      "id": null、
      "page"：1,
      "url"："https://www.bing.com/search?q=adidas"、
      "job_id"："12345678900987654321",
      "status_code"：200
    }
  ]
}
</pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。只需将我们的入口节点用作代理，使用实时爬虫凭据进行授权，并忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<pre>GET realtime.oxylabs.io:60000
</pre>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是可接受的参数列表：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a href="#user-agent">这里</a>.</td>
</tr>
<tr>
<td><code>X-OxySERPs-地理位置</code></td>
<td>应用程序接口使用 Canonical Geo Location 格式来确定请求位置。具体如下 <code>城市、地区、国家</code>例如 <code>美国阿肯色州哈里斯堡</code>).有关如何创建 "典型地理位置名称 "的更多信息，请查阅 <a class="custom_link" href="https://developers.google.com/adwords/api/docs/appendix/geotargeting" target="_blank" rel="nofollow noopener">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<p>如果您在设置超级用户接口时需要帮助，请致电 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 -H "X-OxySERPs-User-Agent-Type: desktop_chrome"
-H "X-OxySERPs-Geo-Location：15550" "https://bing.com/search/?text=nike"
</pre>
<hr />
<h2 id="content-type">内容类型</h2>
<p>实时爬虫返回 <strong>原始HTML</strong>.</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>使用实时爬虫从 Bing 检索数据有两种方法。您可以通过以下方式向我们提供完整的 URL <a href="#direct">直接</a>或者您可以通过专门构建的数据源--"...... "来指定参数。 <a href="#search">搜索</a>.</p>
<p>如果您不确定选择哪种方式，请给我们留言 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8260 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Direct.png" alt="Oxylabs Real-Time Crawler for Bing Direct" width="424" height="24" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Direct.png 424w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Direct-300x17.png 300w" sizes="(max-width: 424px) 100vw, 424px" /></p>
<p><code>乒</code> 源的目的是检索各种必应页面的直接 URL 内容。这意味着，您可以向我们提供所需必应页面的直接 URL，而无需发送多个参数。我们不会删除任何参数，也不会以任何其他方式更改您的 URL。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">乒</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">直接指向必应页面的 URL（链接</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">应用程序接口使用 Canonical Geo Location 格式来确定请求位置。具体如下城市、地区、国家，例如美国阿肯色州哈里斯堡）。有关如何创建 Canonical 地理位置名称的更多信息，请查阅 <a href="https://developers.google.com/adwords/api/docs/appendix/geotargeting" target="_blank" rel="nofollow noopener">这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，应用程序接口将检索必应搜索关键词 <code>耐克</code> 推拉法</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing", "url"："https://bing.com/search/?text=nike&amp;"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing", "url"："https://bing.com/search/?text=nike&amp;"}'
</pre>
<p>并通过超级用户接口（SuperAPI）：</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://bing.com/search/?text=nike&amp;"
</pre>
<hr />
<h3 id="search">搜索</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8262 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Search.png" alt="Oxylabs Real-Time Crawler for Bing Search" width="443" height="26" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Search.png 443w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Bing-Search-300x18.png 300w" sizes="(max-width: 443px) 100vw, 443px" /></p>
<p><code>bing_search</code> 该源代码旨在检索必应搜索结果（SERP）。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">bing_search</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化。可用域名：com、ru、ua、by、kz、tr</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">限额</td>
<td style="font-weight: 400;" width="72">每页要检索的结果数量</td>
<td style="font-weight: 400;" width="72">10</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">语言。您可以使用 2 个字母的 ISO 国家代码（如 en、by、fr 等）或语言标记（如 en-US、de-DE、ar-EG 等）。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">应用程序接口使用 Canonical Geo Location 格式来确定请求位置。具体如下城市、地区、国家，例如美国阿肯色州哈里斯堡）。有关如何创建 Canonical 地理位置名称的更多信息，请查阅<a href="https://developers.google.com/adwords/api/docs/appendix/geotargeting" target="_blank" rel="nofollow noopener"> 这里。</a></td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user-agent">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>API 向 <code>bing.com</code> 检索关键字从第 11 到第 20 的搜索结果页面 <code>阿迪达斯</code>.API 将向 <code>your.callback.url</code> 包含 URL，以便在数据检索任务成功完成后下载原始 HTML 输出。这就是推拉式：</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："bing_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="user-agent">用户代理</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
  {
    "user_agent_type"："桌面"、
    "描述"："随机桌面浏览器用户代理"
  },
  {
    "user_agent_type"："desktop_firefox"、
    "描述"："最新版桌面火狐浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_chrome"、
    "description"："最新版桌面 Chrome 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_opera"、
    "description"："最新版本桌面 Opera 的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_edge"、
    "description"："桌面边缘最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_safari"、
    "description"："桌面 Safari 最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："mobile"、
    "description"："随机移动浏览器用户代理"
  },
  {
    "user_agent_type"："mobile_android"、
    "description"（描述）："最新版本安卓浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："mobile_ios"、
    "描述"："最新版本 iPhone 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："平板电脑"、
    "描述"："随机平板电脑浏览器用户代理"
  },
  {
    "user_agent_type"："tablet_android"、
    "描述"："最新版本安卓平板电脑的随机用户代理"。
  },
  {
    "user_agent_type"："tablet_ios"、
    "description"："最新版本 iPad 平板电脑的随机用户代理"。
  }
]
</pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>该查询将返回所有时间的统计数据。您可以通过添加 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "数据"：{
        "sources"：[
            {
                "realtime_results_count"："90",
                "results_count"："10",
                "标题"："bing
            },
            {
                "realtime_results_count"："19",
                "results_count"："87",
                "标题"："bing_search
            }
        ]
    },
    "元"：{
        "group_by": null
    }
}
</pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下终端将提供您的每月承诺信息以及已使用的金额：</p>
<pre>GET https://data.oxylabs.io/v1/stats/limits
</pre>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats/limits'
</pre>
<p>输出示例</p>
<pre>{
    "monthly_requests_commitment"：4500000,
    "used_requests"：985000
}
</pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
</tbody>
</table>
</div>
<p>云存储上传响应代码：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>10001</code></td>
<td>意外异常</td>
<td>发生了严重的错误。我们可能已经知道，并正在修复。无论如何，请告诉我们。</td>
</tr>
<tr>
<td><code>13000</code></td>
<td>上传成功</td>
<td>一切顺利！</td>
</tr>
<tr>
<td><code>13001</code></td>
<td>上传失败</td>
<td>我们无法上传您的工作结果。</td>
</tr>
<tr>
<td><code>13102</code></td>
<td>没有这样的道路</td>
<td>我们找不到这样名字的水桶。请仔细检查。</td>
</tr>
<tr>
<td><code>13103</code></td>
<td>拒绝访问</td>
<td>Bucket 没有所需的权限。要了解如何授予我们必要的权限，请参阅 <a href="#upload-to-storage">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li><a href="https://docs.oxylabs.io/rtc/source/bing/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/source/bing/index.html</a></li>
<li><a href="https://docs.oxylabs.io/rtc/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/index.html</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-bing-real-time-crawler/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7634</post-id>	</item>
		<item>
		<title>How to Use Baidu Real-Time Crawler [Part 4]: Oxylabs Real-Time Crawler for Baidu</title>
		<link>https://proxysp.com/zh/oxylabs-baidu-real-time-crawler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-baidu-real-time-crawler</link>
					<comments>https://proxysp.com/zh/oxylabs-baidu-real-time-crawler/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7635</guid>

					<description><![CDATA[你知道如何使用 OxyLabs Real-time Crawler for Baidu 吗？这是 OxyLabs 官方最全面的介绍。快速入门 实时爬虫内置了...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-baidu-real-time-crawler/"> <span class="screen-reader-text">如何使用百度实时爬虫 [第 4 部分]：Oxylabs 用于百度的实时爬虫</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 OxyLabs Real-time Crawler for Baidu 吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>Real-Time Crawler 专为重型数据检索操作而设计。你可以使用 Real-Time Crawler 访问各种百度网页。它可以毫不费力地从搜索引擎中提取网页数据，不会出现任何延迟或错误。</p>
<p>用于百度的实时抓取器 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用百度实时爬虫的最快方法。您将发送一个查询 <code>阿迪达斯</code> 至 <code>百度搜索</code> 使用 <a href="#realtime">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："baidu_search", "domain"："com", "query"："adidas"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<h2 id="integration-methods">整合方法</h2>
<p>用于百度的实时爬虫支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅 <a href="#callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。你可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。</p>
<p>这样，一旦作业准备就绪，我们就会向您发送回调消息。在本例中，结果将自动 <a href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query"><strong>单一查询</strong></h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu_search", "domain"："com", "query"："adidas", "callback_url"："https://your.callback.url"，"storage_type"："s3"，"storage_url"："your_bucket_name"}'
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "callback_url"："https://your.callback.url"、
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "render": null、
  "query"："adidas"、
  "来源"："baidu_search"、
  "start_page"：1,
  "状态"："pending"、
  "storage_type"："s3",
  "storage_url"："YOUR_BUCKET_NAME/12345678900987654321.json",
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:01",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="check-job-status"><strong>检查工作状态</strong></h4>
<p>如果您的查询有 <code>回调URL</code>一旦完成刮擦任务，我们将向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}
</pre>
<p>查询该链接将返回工作信息，包括其 <code>地位</code>.有 3 种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出了问题，我们无法完成，很可能是目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321'
</pre>
<p>API 将在响应正文中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre>{
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "render": null、
  "query"："adidas"、
  "来源"："baidu_search"、
  "start_page"：1,
  "状态"："done"、
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:15",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="retrieve-job-content"><strong>检索工作内容</strong></h4>
<p>通过检查作业状态或接收我们的回调，一旦知道作业已准备就绪，您就可以使用以下 URL 获取作业 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应或回调信息中。看起来应该类似于下面这样： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}/results
</pre>
<p>通过设置 "任务状态"，可以自动检索结果，而无需定期检查任务状态。 <a href="#callback">回调</a> 服务。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项任务时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如 <a href="#callback">回调实现示例</a>.</p>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321/results'
</pre>
<p>API 将返回工作内容：</p>
<pre>{
  "结果"：[
    {
      "content"："&lt;!
        内容
      &quot;,
      &quot;created_at&quot;：&quot;2019-10-01 00:00:01&quot;,
      &quot;更新时间&quot;：&quot;2019-10-01 00:00:15&quot;,
      &quot;页&quot;：1,
      &quot;url&quot;：&quot;https://www.baidu.com/search?q=adidas&amp;hl=en&amp;gl=US&quot;、
      &quot;job_id&quot;：&quot;12345678900987654321&quot;,
      &quot;status_code&quot;：200
    }
  ]
}
</pre>
<hr />
<h4 id="callback"><strong>回调</strong></h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a href="#check-job-status">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a href="#retrieve-job-content">取回</a>.</p>
<pre># 请查看 Python 和 PHP 代码示例。
</pre>
<p>回调输出示例</p>
<pre>{
   "created_at":"2019-10-01 00:00:01",
   "updated_at":"2019-10-01 00:00:15",
   "locale":null、
   "client_id":163、
   "user_agent_type": "desktop"、
   "source": "baidu_search"、
   "页面":1、
   "子域": "www"、
   "status": "done"、
   "start_page":1、
   "render":null、
   "priority":0、
   "ttl":0、
   "origin": "api"、
   "persist":true、
   "id":"12345678900987654321",
   "callback_url": "http://your.callback.url/"、
   "query": "adidas"、
   "domain": "com"、
   "limit":10、
   "geo_location":null、
   {...}
   "_links":[
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321",
         "method": "GET"、
         "rel": "self"
      },
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321/results",
         "method": "GET"、
         "rel": "results" }
      }
   ],
}
</pre>
<hr />
<h4 id="batch-query"><strong>批量查询</strong></h4>
<p>实时爬虫还支持执行多个关键字，每批最多可执行 1,000 个关键字。以下端点将向提取队列提交多个关键词。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries/batch
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键词作为一个单独请求处理。如果您提供了回调 URL，您将为每个关键字收到单独的调用。否则，我们的初始响应将包含工作 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries/batch' -H 'Content-Type: application/json' -d '@keywords.json
 -d'@keywords.json'（关键词
</pre>
<p><code>keywords.json</code> 内容：</p>
<pre>{
   "query":[
      "阿迪达斯"、
      "耐克"、
      "蕾博克"
   ],
   "来源"："baidu_search"、
   "域"："com"、
   "callback_url"："https://your.callback.url"
}
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "查询"：[
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678900987654321",
      {...}
      "查询"："阿迪达斯"、
      "来源"："baidu_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678901234567890",
      {...}
      "查询"："NIKE"、
      "来源"："baidu_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678901234567890/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："01234567899876543210",
      {...}
      "查询"："reebok"、
      "来源"："baidu_search"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/01234567899876543210/results",
          "method"："GET"
        }
      ]
    }
  ]
}
</pre>
<hr />
<h4 id="get-notifier-ip-address-list"><strong>获取通知程序 IP 地址列表</strong></h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/info/callbacker_ips'
</pre>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre>{
    "ips"：[
        "x.x.x.x"、
        "y.y.y.y"
    ]
}
</pre>
<hr />
<h4 id="upload-to-storage"><strong>上传到存储器</strong></h4>
<p>默认情况下，RTC 任务结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优势在于，您无需为了获取结果而发出额外请求，所有内容都会直接存储到您的存储桶中。</p>
<p>我们支持亚马逊 S3 和谷歌云存储。如果您想使用其他类型的存储，请联系您的客户经理，讨论功能交付时间表。</p>
<p id="amazon-s3"><strong>亚马逊 S3</strong></p>
<p>要将作业结果上传到 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请访问 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8268" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage.png" alt="Oxylabs Real-Time Crawler for Baidu Upload to Storage" width="485" height="333" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage.png 485w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage-300x206.png 300w" sizes="(max-width: 485px) 100vw, 485px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://docs.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记在 <code>您的邮筒名称</code>.通过该策略，我们可以向您的邮筒写入内容，允许您访问上传的文件，并了解邮筒的位置。</p>
<p id="google-cloud-storage"><strong>谷歌云存储</strong></p>
<p>要将作业结果上传到您的 Google Cloud Storage 存储桶，请为我们的服务设置特殊权限。为此，请使用 <code>存储.对象.创建</code> 权限并将其分配给 Oxylabs 服务帐户电子邮件 <code>oxyserps-storage@oxyserps-storage.iam.gserviceaccount.com</code>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8270" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage1.png" alt="Oxylabs Real-Time Crawler for Baidu Upload to Storage1" width="479" height="310" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage1.png 479w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage1-300x194.png 300w" sizes="(max-width: 479px) 100vw, 479px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8269" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage2.png" alt="Oxylabs Real-Time Crawler for Baidu Upload to Storage2" width="482" height="670" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage2.png 482w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Upload-to-Storage2-216x300.png 216w" sizes="(max-width: 482px) 100vw, 482px" /></p>
<p id="usage"><strong>使用方法</strong></p>
<p>要使用此功能，请在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到职位 ID。在 <a href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交方式与推拉方式相同，但在实时情况下，我们将在连接打开时返回内容。您向我们发送查询，连接保持打开，我们检索内容并发送给您。处理的端点如下：</p>
<pre>邮寄 https://realtime.oxylabs.io/v1/queries
</pre>
<p>开放连接的超时限制为 150 秒，因此在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu_search", "domain"："com", "query"："adidas"}'
</pre>
<p>打开连接时将返回的响应体示例：</p>
<pre>{
  "结果"：[
    {
      "content"："
      内容
      "
      "created_at"："2019-10-01 00:00:01",
      "更新时间"："2019-10-01 00:00:15",
      "id": null、
      "page"：1,
      "url"："https://www.baidu.com/search?q=adidas&amp;hl=en&amp;gl=US"、
      "job_id"："12345678900987654321",
      "status_code"：200
    }
  ]
}
</pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。只需将我们的入口节点用作代理，使用实时爬虫凭据进行授权，并忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<pre>GET realtime.oxylabs.io:60000
</pre>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是可接受的参数列表：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a href="#user-agent">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<p>如果您在设置超级用户接口时需要帮助，请致电 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 -H "X-OxySERPs-User-Agent-Type: desktop_chrome" "https://www.baidu.com/search?q=adidas"
</pre>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>使用实时爬虫从百度检索数据有多种方法。您可以通过以下方式向我们提供完整的 URL <a href="#direct">直接</a>或通过专门构建的数据源指定参数，例如 <a href="#search">搜索</a>购物产品或图片。</p>
<p>如果您不确定选择哪种方式，请给我们留言 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8272 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Direct.png" alt="Oxylabs Real-Time Crawler for Baidu Direct" width="425" height="29" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Direct.png 425w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Direct-300x20.png 300w" sizes="(max-width: 425px) 100vw, 425px" /></p>
<p><code>百度</code> 源设计用于检索各种百度页面的直接 URL 内容。这意味着您可以向我们提供所需百度页面的直接 URL，而无需发送多个参数。我们不会剥离任何参数或以任何其他方式更改您的 URL。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">百度</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">直接 URL（链接）至百度页面</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，应用程序接口将检索百度搜索关键字 <code>阿迪达斯</code> 推拉法</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu", "url"："http://www.baidu.com/s?ie=utf-8&amp;f=8&amp;rsv_bp=1&amp;rsv_idx=1&amp;ch=&amp;tn=baidu&amp;bar=&amp;wd=adidas"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu", "url"："http://www.baidu.com/s?ie=utf-8&amp;f=8&amp;rsv_bp=1&amp;rsv_idx=1&amp;ch=&amp;tn=baidu&amp;bar=&amp;wd=adidas"}'
</pre>
<p>并通过超级用户接口（SuperAPI）：</p>
<pre>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "http://www.baidu.com/s?ie=utf-8&amp;f=8&amp;rsv_bp=1&amp;rsv_idx=1&amp;ch=&amp;tn=baidu&amp;bar=&amp;wd=adidas"
</pre>
<hr />
<h3 id="search">搜索</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8273 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Search.png" alt="Oxylabs Real-Time Crawler for Baidu Search" width="425" height="26" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Search.png 425w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-Real-Time-Crawler-for-Baidu-Search-300x18.png 300w" sizes="(max-width: 425px) 100vw, 425px" /></p>
<p><code>百度搜索</code> 该源代码旨在检索 HTML 格式的百度搜索结果（SERP）。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72"><strong>参数</strong></td>
<td style="font-weight: 400;" width="72"><strong>说明</strong></td>
<td style="font-weight: 400;" width="72"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">百度搜索</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">领域</td>
<td style="font-weight: 400;" width="72">域名本地化</td>
<td style="font-weight: 400;" width="72">网</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">询问</td>
<td style="font-weight: 400;" width="72">UTF 编码的关键字</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">start_page</td>
<td style="font-weight: 400;" width="72">起始页码</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页面</td>
<td style="font-weight: 400;" width="72">要检索的页数</td>
<td style="font-weight: 400;" width="72">1</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">限额</td>
<td style="font-weight: 400;" width="72">每页要检索的结果数量</td>
<td style="font-weight: 400;" width="72">10</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下<a href="#user-agent"> 这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">回调端点的 URL</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>实时爬虫向 baidu.com 发出请求，检索关键词 adidas 从第 11 位到第 20 位的搜索结果页面。数据检索任务成功完成后，实时爬虫会将原始 HTML 页面输出的下载 URL 发布到 your.callback.url。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json"
 -d '{"source"："baidu_search", "domain"："com", "query"："adidas", "start_page"：11, "pages"：10, "callback_url"："https://your.callback.url"}'
</pre>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="user-agent">用户代理</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
  {
    "user_agent_type"："桌面"、
    "描述"："随机桌面浏览器用户代理"
  },
  {
    "user_agent_type"："desktop_firefox"、
    "描述"："最新版桌面火狐浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_chrome"、
    "description"："最新版桌面 Chrome 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_opera"、
    "description"："最新版本桌面 Opera 的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_edge"、
    "description"："桌面边缘最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_safari"、
    "description"："桌面 Safari 最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："mobile"、
    "description"："随机移动浏览器用户代理"
  },
  {
    "user_agent_type"："mobile_android"、
    "description"（描述）："最新版本安卓浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："mobile_ios"、
    "描述"："最新版本 iPhone 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："平板电脑"、
    "描述"："随机平板电脑浏览器用户代理"
  },
  {
    "user_agent_type"："tablet_android"、
    "描述"："最新版本安卓平板电脑的随机用户代理"。
  },
  {
    "user_agent_type"："tablet_ios"、
    "description"："最新版本 iPad 平板电脑的随机用户代理"。
  }
]
</pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>该查询将返回所有时间的统计数据。您可以通过添加 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "数据"：{
        "sources"：[
            {
                "realtime_results_count"："90",
                "results_count"："10",
                "标题"："百度"
            },
            {
                "realtime_results_count"："19",
                "results_count"："87",
                "标题"："baidu_search
            }
        ]
    },
    "元"：{
        "group_by": null
    }
}
</pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下终端将提供您的每月承诺信息以及已使用的金额：</p>
<pre>GET https://data.oxylabs.io/v1/stats/limits
</pre>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats/limits'
</pre>
<p>输出示例</p>
<pre>{
    "monthly_requests_commitment"：4500000,
    "used_requests"：985000
}
</pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作如果还不行，请联系我们。</td>
</tr>
</tbody>
</table>
</div>
<p>云存储上传响应代码：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>10001</code></td>
<td>意外异常</td>
<td>发生了严重的错误。我们可能已经知道，并正在修复。无论如何，请告诉我们。</td>
</tr>
<tr>
<td><code>13000</code></td>
<td>上传成功</td>
<td>一切顺利！</td>
</tr>
<tr>
<td><code>13001</code></td>
<td>上传失败</td>
<td>我们无法上传您的工作结果。</td>
</tr>
<tr>
<td><code>13102</code></td>
<td>没有这样的道路</td>
<td>我们找不到这样名字的水桶。请仔细检查。</td>
</tr>
<tr>
<td><code>13103</code></td>
<td>拒绝访问</td>
<td>Bucket 没有所需的权限。要了解如何授予我们必要的权限，请参阅 <a href="#upload-to-storage">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li><a href="https://docs.oxylabs.io/rtc/source/baidu/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/source/baidu/index.html</a></li>
<li><a href="https://docs.oxylabs.io/rtc/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/index.html</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-baidu-real-time-crawler/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7635</post-id>	</item>
		<item>
		<title>How to Use HTML Crawler API [Part 5]: OxyLabs Real-Time Crawler for Other Sites</title>
		<link>https://proxysp.com/zh/oxylabs-html-crawler-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-html-crawler-api</link>
					<comments>https://proxysp.com/zh/oxylabs-html-crawler-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=7636</guid>

					<description><![CDATA[你知道如何使用 OxyLabs 实时网页爬虫吗？这是 OxyLabs 官方最全面的介绍。快速启动 HTML Crawler API ...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-html-crawler-api/"> <span class="screen-reader-text">如何使用 HTML 爬虫 API [第 5 部分]：用于其他网站的 OxyLabs 实时抓取器</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 OxyLabs 实时网页爬虫吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<h2 id="quick-start">快速入门</h2>
<p>HTML Crawler API 可帮助您进行繁重的数据检索操作。您可以使用 HTML Crawler API 访问各种公共页面。它能毫不费力地提取网络数据，不会出现任何延迟或错误。</p>
<p>HTML 抓取程序应用程序接口使用 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用 HTML Crawler API 最快的方法。您将向 <code>https://ip.oxylabs.io</code> 使用 <a href="#realtime">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："universal", "url"："https://ip.oxylabs.io"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<hr />
<div class="inside-code">
<h2 id="integration-methods">整合方法</h2>
<p>HTML Crawler API 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅 <a href="#callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a href="#push-pull">推拉式</a>.</p>
<hr />
</div>
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。你可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。</p>
<p>这样，一旦作业准备就绪，我们就会向您发送回调消息。在本例中，结果将自动 <a href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query"><strong>单一查询</strong></h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<pre>curl --user user:pass1\
'https://data.oxylabs.io/v1/queries' \
-H "Content-Type: application/json"\
-d '{"source"："universal", "url"："https://stackoverflow.com/questions/tagged/python", "callback_url"："https://your.callback.url", "storage_type"："s3", "storage_url"："your_bucket_name"}'
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "callback_url"："https://your.callback.url"、
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "url"："https://stackoverflow.com/questions/tagged/python"、
  "源"："universal"、
  "start_page"：1,
  "状态"："pending"、
  "storage_type"："s3",
  "storage_url"："YOUR_BUCKET_NAME/12345678900987654321.json",
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:01",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="check-job-status"><strong>检查工作状态</strong></h4>
<p>如果您的查询有 <code>回调URL</code>我们会在扫描任务完成后向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}
</pre>
<p>查询此链接将返回工作信息，包括其 <code>地位</code>.有三种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出现了问题，我们无法完成任务，很可能是由于目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321'
</pre>
<p>API 将在响应体中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre>{
  "client_id"：5,
  "created_at"："2019-10-01 00:00:01",
  "域"："com"、
  "geo_location": null、
  "id"："12345678900987654321",
  "限制"：10,
  "locale": null、
  "pages"：1,
  "parse": false、
  "render": null、
  "url"："sofa"、
  "源"："universal"、
  "start_page"：1,
  "状态"："done"、
  "subdomain"："www"、
  "updated_at"："2019-10-01 00:00:15",
  "user_agent_type"："desktop"、
  "_链接"：[
    {
      "rel"："self"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321",
      "method"："GET"
    },
    {
      "rel"："results"、
      "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
      "method"："GET"
    }
  ]
}
</pre>
<hr />
<h4 id="retrieve-job-content"><strong>检索工作内容</strong></h4>
<p>通过检查作业的状态，一旦知道可以检索作业，就可以使用 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应中。它看起来应该与此类似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<pre>GET https://data.oxylabs.io/v1/queries/{id}/results
</pre>
<p>通过设置 "任务状态"，可以自动检索结果，而无需定期检查任务状态。 <a href="#callback">回调</a> 服务。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项任务时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如 <a href="#callback">回调实现示例</a>.</p>
<pre>curl --user user:pass1 'http://data.oxylabs.io/v1/queries/12345678900987654321/results'
</pre>
<p>API 将返回工作内容：</p>
<pre>{
  "结果"：[
    {
      "content"："&lt;!
        内容
      &quot;,
      &quot;created_at&quot;：&quot;2019-10-01 00:00:01&quot;,
      &quot;更新时间&quot;：&quot;2019-10-01 00:00:15&quot;,
      &quot;页&quot;：1,
      &quot;url&quot;：&quot;https://stackoverflow.com/questions/tagged/python&quot;、
      &quot;job_id&quot;：&quot;12345678900987654321&quot;,
      &quot;status_code&quot;：200
    }
  ]
}
</pre>
<hr />
<h4 id="callback"><strong>回调</strong></h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a href="#check-job-status">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a href="#retrieve-job-content">取回</a>.</p>
<pre># 请查看 Python 和 PHP 代码示例。
</pre>
<p>回调输出示例</p>
<pre>{
   "created_at":"2019-10-01 00:00:01",
   "updated_at":"2019-10-01 00:00:15",
   "locale":null、
   "client_id":163、
   "user_agent_type": "desktop"、
   "源": "universal"、
   "pages":1、
   "子域": "www"、
   "status": "done"、
   "start_page":1、
   "parse":0、
   "render":null、
   "priority":0、
   "ttl":0、
   "origin": "api"、
   "persist":true、
   "id":"12345678900987654321",
   "callback_url": "http://your.callback.url/"、
   "url": "https://stackoverflow.com/questions/tagged/python"、
   "domain": "de"、
   "limit":10、
   "geo_location":null、
   {...}
   "_links":[
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321",
         "method": "GET"、
         "rel": "self"
      },
      {
         "href":"https://data.oxylabs.io/v1/queries/12345678900987654321/results",
         "method": "GET"、
         "rel": "results" }
      }
   ],
}
</pre>
<hr />
<h4 id="batch-query"><strong>批量查询</strong></h4>
<p>HTML 抓取器 API 还支持执行多个关键词，每批最多可执行 1,000 个关键词。以下端点将向提取队列提交多个关键词。</p>
<pre>邮寄 https://data.oxylabs.io/v1/queries/batch
</pre>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键字作为一个单独请求来处理。如果您提供了回调 URL，则每个关键字都会收到一个单独的调用。否则，我们的初始响应将包含任务 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/queries/batch' -H 'Content-Type: application/json' \
 -d'@keywords.json'。
</pre>
<p><code>keywords.json</code> 内容：</p>
<pre>{
   "url":[
      "https://stackoverflow.com/questions/tagged/python"、
      "https://stackoverflow.com/questions/tagged/golang"、
      "https://stackoverflow.com/questions/tagged/php"
   ],
   "源"："通用"、
   "callback_url"："https://your.callback.url"
}
</pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre>{
  "查询"：[
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678900987654321",
      {...}
      "url"："https://stackoverflow.com/questions/tagged/python"、
      "来源"："universal"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678900987654321/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："12345678901234567890",
      {...}
      "url"："https://stackoverflow.com/questions/tagged/golang"、
      "来源"："universal"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/12345678901234567890/results",
          "method"："GET"
        }
      ]
    },
    {
      "callback_url"："https://your.callback.url"、
      {...}
      "created_at"："2019-10-01 00:00:01",
      "域"："com"、
      "id"："01234567899876543210",
      {...}
      "url"："https://stackoverflow.com/questions/tagged/php"、
      "来源"："universal"、
      {...}
          "rel"："results"、
          "href"："http://data.oxylabs.io/v1/queries/01234567899876543210/results",
          "method"："GET"
        }
      ]
    }
  ]
}
</pre>
<hr />
<h4 id="get-notifier-ip-address-list"><strong>获取通知程序 IP 地址列表</strong></h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/info/callbacker_ips'
</pre>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre>{
    "ips"：[
        "x.x.x.x"、
        "y.y.y.y"
    ]
}
</pre>
<hr />
<h4 id="upload-to-storage"><strong>上传到存储器</strong></h4>
<p>默认情况下，RTC 任务结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优势在于，您无需为了获取结果而发出额外请求，所有内容都会直接存储到您的存储桶中。</p>
<p>我们支持亚马逊 S3 和谷歌云存储。如果您想使用其他类型的存储，请联系您的客户经理，讨论功能交付时间表。</p>
<p id="amazon-s3"><strong>亚马逊 S3</strong></p>
<p>要将作业结果上传到 Amazon S3 存储桶，请为我们的服务设置访问权限。为此，请访问 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8280" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage1.png" alt="Oxylabs HTML Crawler API Upload to Storage1" width="482" height="323" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage1.png 482w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage1-300x201.png 300w" sizes="(max-width: 482px) 100vw, 482px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://docs.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记在 <code>您的邮筒名称</code>.通过该策略，我们可以向您的邮筒写入内容，允许您访问上传的文件，并了解邮筒的位置。</p>
<p id="google-cloud-storage"><strong>谷歌云存储</strong></p>
<p>要将作业结果上传到您的 Google Cloud Storage 存储桶，请为我们的服务设置特殊权限。为此，请使用 <code>存储.对象.创建</code> 权限并将其分配给 Oxylabs 服务帐户电子邮件 <code>oxyserps-storage@oxyserps-storage.iam.gserviceaccount.com</code>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8281" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage2.png" alt="Oxylabs HTML Crawler API Upload to Storage2" width="483" height="306" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage2.png 483w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage2-300x190.png 300w" sizes="(max-width: 483px) 100vw, 483px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8282" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage3.png" alt="Oxylabs HTML Crawler API Upload to Storage3" width="486" height="668" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage3.png 486w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Upload-to-Storage3-218x300.png 218w" sizes="(max-width: 486px) 100vw, 486px" /></p>
<p id="usage"><strong>使用方法</strong></p>
<p>要使用此功能，请在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到职位 ID。在 <a href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre>{
    "版本"："2012-10-17",
    "Id"："Policy1577442634787",
    "声明"：[
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"："s3:GetBucketLocation"、
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME" }.
        },
        {
            "Sid"："Stmt1577442633719"、
            "效果"："允许"、
            "校长"：{
                "AWS"："arn:aws:iam::324311890426:user/oxylabs.s3.uploader"
            },
            "Action"：[
                "s3:PutObject"、
                "s3:PutObjectAcl"。
            ],
            "资源"："arn:aws:s3:::YOUR_BUCKET_NAME/*"。
        }
    ]
}
</pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交与推拉式方法相同，但使用实时方法时，我们将在连接打开时返回内容。您向我们发送一个查询，连接保持打开，我们检索内容并将其发送给您。处理此问题的端点如下：</p>
<pre>邮寄 https://realtime.oxylabs.io/v1/queries
</pre>
<p>开放连接的超时限制为 100 秒。因此，在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<pre>curl --user user:pass1 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" \
 -d '{"source"："universal", "url"："https://stackoverflow.com/questions/tagged/python"}'
</pre>
<p>打开连接时将返回的响应体示例：</p>
<pre>{
  "结果"：[
    {
      "content"："
      内容
      "
      "created_at"："2019-10-01 00:00:01",
      "更新时间"："2019-10-01 00:00:15",
      "id": null、
      "page"：1,
      "url"："https://stackoverflow.com/questions/tagged/python"、
      "job_id"："12345678900987654321",
      "status_code"：200
    }
  ]
}
</pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。您只需将我们的入口节点用作代理，使用 HTML Crawler API 凭据进行授权，然后忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<pre>GET realtime.oxylabs.io:60000
</pre>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是一份可接受的参数列表：</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a href="#user_agent_type">这里</a>.</td>
</tr>
</tbody>
</table>
</div>
<p>如果您在设置超级用户接口时需要帮助，请通过以下方式与我们联系 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<pre>curl -k \
-x realtime.oxylabs.io:60000\
-U user:pass1
-H "X-OxySERPs-User-Agent-Type: desktop_chrome" \
"https://stackoverflow.com/questions/tagged/python"
</pre>
<hr />
<h2 id="content-type">内容类型</h2>
<p>HTML 抓取程序 API 返回 <strong>原始HTML</strong>.</p>
<hr />
<h3 id="download-images">下载图片</h3>
<p>可以通过 HTML Crawler API 下载图像。如果通过 SuperAPI 下载，只需将输出保存到图片扩展名即可。例如</p>
<p><code>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://example.com/image.jpg" &gt;&gt; image.jpg</code></p>
<p>如果您使用 <a href="#push-pull">推拉式</a> 或 <a href="#realtime">实时</a> 方法，您需要添加 <code>content_encoding</code> 参数的值为 <code>base64</code>.收到结果后，您需要解码来自 <code>内容</code> 转换成字节并保存为图像文件。右侧有一个 Python 示例。</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>HTML Crawler API 接受 URL 以及其他参数，如 User-Agent 类型、代理位置等。请参阅此方法，我们将其称为 <a href="#direct">直接</a>下文将对此进行说明。</p>
<p>HTML Crawler API 能够在刮擦时渲染 JavaScript。这样，您就能从网页中获取更多数据，并获得屏幕截图。</p>
<p>如果您对文件的任何部分有疑问，请致电我们 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-8283 alignnone" src="https://www.proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Direct.png" alt="Oxylabs HTML Crawler API Direct" width="429" height="25" srcset="https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Direct.png 429w, https://proxysp.com/wp-content/uploads/2021/09/Oxylabs-HTML-Crawler-API-Direct-300x17.png 300w" sizes="(max-width: 429px) 100vw, 429px" /></p>
<p><code>万有</code> 源的目的是检索互联网上任何 URL 的内容。 <code>职位</code>-将 JSON 格式的参数发送到以下端点，将把指定的 URL 提交到提取队列。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72">参数</td>
<td style="font-weight: 400;" width="72">说明</td>
<td style="font-weight: 400;" width="72">默认值</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">万有</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">通用网页的直接 URL（链接</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user_agent_type">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">用于检索数据的代理地理位置。支持位置的完整列表如下 <a href="#geo_location">这里。</a></td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">正如 Accept-Language 标头所期望的那样。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">content_encoding</td>
<td style="font-weight: 400;" width="72">如果要下载图像，请添加此参数。了解更多信息 <a href="#download-images">这里。</a></td>
<td style="font-weight: 400;" width="72">base64</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">Base64 编码的 POST 请求正文。它只有在 http_method 设置为 post 时才有用。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">内容</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">递上自己的饼干</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">饼干</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">指明是否希望扫描程序跟踪重定向（带有目标 URL 的 3xx 响应），以获取重定向链末端 URL 的内容。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">follow_redirects</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">传递自己的标头</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页眉</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">如果您想通过 Universal scraper 向目标 URL 发出 POST 请求，请将其设置为 "发布"。</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">http_method</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">如果您想在多个请求中使用同一个代理，可以使用此参数。只需将会话设置为任意字符串，我们就会为该 ID 分配一个代理，并最多保留 10 分钟。之后，如果您使用相同的会话 ID 发出另一个请求，我们就会为该特定会话 ID 分配一个新的代理。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">session_id</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">定义一个自定义 HTTP 响应代码（或其中的几个），我们应根据该代码认为刮擦成功并将内容返回给您。如果您希望我们返回 503 错误页面或在其他一些非标准情况下，这可能会很有用。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">成功状态代码</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">URL 到您的回调端点。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。我们支持 Amazon S3 和 Google Cloud Storage。这些存储服务提供商的 storage_type 参数值分别为 s3 和 gcs。完整的实现可以在 <a href="#upload-to-storage">上传到存储器</a> 页。此功能只能通过推拉（回调）方法使用。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" colspan="3" width="216">   - 所需参数</td>
</tr>
</tbody>
</table>
</div>
<p>在本例中，应用程序接口将以推拉方式检索一个通用产品页面。所有可用参数都包含在内（尽管在同一请求中并非总是必要或兼容），以便让您了解如何格式化您的请求：</p>
<pre>curl --user user:pass1
'https://data.oxylabs.io/v1/queries' \
-H "Content-Type: application/json"\
 -d '{"source": "universal", "url": "https://stackoverflow.com/questions/tagged/python", "user_agent_type": "mobile", "context":[{"key": "headers", "value":{"Accept-Language": "en-US", "Content-Type": "application/octet-stream", "Custom-Header": "custom header content"}},{"key": "cookies", "value":[{"key": "NID", "value"："1234567890"},{"key":"1P JAR","value":"0987654321"}]},{"key":"follow_redirects","value":true},{"key":"http_method","value":"post"},{"key":"content","value":"YmFzZTY0RW5jb2RlZFBPU1RCb2R5"},{"key":"successful_status_codes","value":[808,909]}]}
</pre>
<p>以下是实时模式下的相同示例：</p>
<pre>curl --user user:pass1
'https://data.oxylabs.io/v1/queries' \
-H "Content-Type: application/json"\
-d '{"source"："universal", "url"："https://stackoverflow.com/questions/tagged/python", "user_agent_type"："mobile", "context"：{"key"："headers", "value": ["Accept-Language"："en-US"，"Content-Type"："application/octet-stream"，"Custom-Header"："自定义标题内容"]}，{"key"："cookies"，"value"：[{"key"："NID"，"值"："1234567890"}，{"key"："1P JAR"，"值"："0987654321"}，{"key"："follow_redirects", "value": true}, {"key"："http_method", "value"："post"}, {"key"："内容"，"值"："base64EncodedPOSTBody"}, {"key"："successful_status_codes", "value": [303, 808, 909]}]}]}'
</pre>
<p>并通过超级用户接口（SuperAPI）：</p>
<pre># GET 请求可以如下所示：
curl -k \
-x http://realtime.oxylabs.io:60000 \
-U user:pass1
"https://stackoverflow.com/questions/tagged/python" \
-H "X-OxySERPs-Session-Id：1234567890abcdef"\H
-H "X-OxySERPs-Geo-Location：India" （印度
-H "Accept-Language: en-US"\
-H "Content-Type: application/octet-stream" （内容类型：应用程序/八进制流
-H "Custom-Header: custom header content" （自定义头内容
-H "Cookie：nid=1234567890; 1p_jar=0987654321" \\H "X-Status-Code.
-H "X-Status-Code：303, 808, 909"

# POST请求具有相同的结构，但包含一个参数，指定它是一个POST请求：
curl -X POST \
-k \
-x http://realtime.oxylabs.io:60000 \
-U user:pass1 "https://stackoverflow.com/questions/tagged/python"\
-H "X-OxySERPs-Session-Id：1234567890abcdef" \
-H "X-OxySERPs-Geo-Location：India" （印度
-H "Custom-Header: custom header content" （自定义头内容
-H "Cookie：nid=1234567890; 1p_jar=0987654321" \\H "X-Status Code.
-H "X-Status-Code：303, 808, 909"
</pre>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="geo_location">地理位置</h3>
<p>支持的地理位置完整列表以 CSV 格式提供 <a class="custom_link" href="https://docs.oxylabs.io/resources/universal-supported-geo_location-values.csv" target="_blank" rel="noopener">这里</a>.</p>
<pre>"阿拉伯联合酋长国
"阿尔巴尼亚
"亚美尼亚
"安哥拉
"阿根廷
"澳大利亚
...
"乌拉圭
"乌兹别克斯坦
"委内瑞拉玻利瓦尔共和国
越南
"南非"
"津巴布韦
</pre>
<hr />
<h3 id="http_method">HTTP_Method</h3>
<p>通用爬虫支持两种 HTTP(S) 方法： <code>获取</code> (默认）和 <code>职位</code>.</p>
<pre>"GET"、
"POST
</pre>
<hr />
<h3 id="render">渲染</h3>
<p>Universal Crawler 可渲染 Javascript 并返回渲染的 HTML 文档或 PNG 网页截图。</p>
<pre>"html"、
"png
</pre>
<hr />
<h3 id="user_agent_type">User_Agent_Type</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://docs.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre>[
  {
    "user_agent_type"："桌面"、
    "描述"："随机桌面浏览器用户代理"
  },
  {
    "user_agent_type"："desktop_firefox"、
    "描述"："最新版桌面火狐浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_chrome"、
    "description"："最新版桌面 Chrome 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_opera"、
    "description"："最新版本桌面 Opera 的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_edge"、
    "description"："桌面边缘最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："desktop_safari"、
    "description"："桌面 Safari 最新版本之一的随机用户代理"。
  },
  {
    "user_agent_type"："mobile"、
    "description"："随机移动浏览器用户代理"
  },
  {
    "user_agent_type"："mobile_android"、
    "description"（描述）："最新版本安卓浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："mobile_ios"、
    "描述"："最新版本 iPhone 浏览器的随机用户代理"。
  },
  {
    "user_agent_type"："平板电脑"、
    "描述"："随机平板电脑浏览器用户代理"
  },
  {
    "user_agent_type"："tablet_android"、
    "描述"："最新版本安卓平板电脑的随机用户代理"。
  },
  {
    "user_agent_type"："tablet_ios"、
    "description"："最新版本 iPad 平板电脑的随机用户代理"。
  }
]
</pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<pre>GET https://data.oxylabs.io/v1/stats
</pre>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>此查询将返回所有时间的统计数据。您可以通过添加以下任一选项来查询每日和每月的使用量 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats'
</pre>
<p>输出示例</p>
<pre>{
    "数据"：{
        "sources"：[
            {
                "realtime_results_count"："90",
                "results_count"："10",
                "标题"："通用"
            }
        ]
    },
    "元"：{
        "group_by": null
    }
}
</pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下端点将提供您的每月承诺信息以及已使用的承诺额度：</p>
<pre>GET https://data.oxylabs.io/v1/stats/limits
</pre>
<pre>curl --user user:pass1 'https://data.oxylabs.io/v1/stats/limits'
</pre>
<p>输出示例</p>
<pre>{
    "monthly_requests_commitment"：4500000,
    "used_requests"：985000
}
</pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li><a href="https://docs.oxylabs.io/rtc/source/html-crawler-api/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/source/html-crawler-api/index.html</a></li>
<li><a href="https://docs.oxylabs.io/rtc/index.html" target="_blank" rel="nofollow noopener">https://docs.oxylabs.io/rtc/index.html</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-html-crawler-api/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7636</post-id>	</item>
		<item>
		<title>How to Use Oxylabs Scraper API [Part 1]: Oxylabs E-Commerce Scraper API</title>
		<link>https://proxysp.com/zh/oxylabs-ecommerce-scraper-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-ecommerce-scraper-api</link>
					<comments>https://proxysp.com/zh/oxylabs-ecommerce-scraper-api/#respond</comments>
		
		<dc:creator><![CDATA[proxysp]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=9117</guid>

					<description><![CDATA[你知道如何使用 Oxylabs E-Commerce Scraper API 吗？这是 OxyLabs 官方最全面的介绍。快速入门 Scraper API 的构建是为了...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-ecommerce-scraper-api/"> <span class="screen-reader-text">如何使用 Oxylabs Scraper API [第 1 部分]：Oxylabs 电子商务 Scraper API</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 Oxylabs E-Commerce Scraper API 吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<p><a href="https://www.proxysp.com/redirect/oxylabs" target="_blank" rel="nofollow noopener"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9221" src="https://www.proxysp.com/wp-content/uploads/2021/11/Oxylabs-E-Commerce-Scraper-API-pricing.jpg" alt="Oxylabs E-Commerce Scraper API pricing" width="921" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-E-Commerce-Scraper-API-pricing.jpg 921w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-E-Commerce-Scraper-API-pricing-300x163.jpg 300w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-E-Commerce-Scraper-API-pricing-768x417.jpg 768w" sizes="(max-width: 921px) 100vw, 921px" /></a></p>
<h2 id="quick-start">快速入门</h2>
<p>Scraper API 可帮助您进行繁重的数据检索操作。您可以使用 Scraper API 访问各种公共页面。它能毫不费力地提取网络数据，不会出现任何延迟或错误。</p>
<p>Scraper API 使用 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用 Scraper API 最快的方法。您将向 <code>https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html</code> 使用 <a class="custom_link" href="#realtime">实时</a> 美国的整合方法 <code>地理位置</code> 并检索已 <code>经过解析的</code> 数据。如果想获取页面 HTML 而不是解析后的数据，只需删除 <code>解析</code> 和 <code>解析器类型</code> 参数。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<div class="inside-code">
<div class="highlight inside-code-body"><code>卷曲 <span class="nt">--用户</span> <span class="s2">"用户名:密码"</span> 'https://realtime.oxylabs.io/v1/queries' <span class="nt">-H</span> "内容类型：应用程序/json" <span class="nt">-d</span> '{"源"："universal_ecommerce", "url"："https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html", "geo-location"："United States", "parser_type"："ecommerce_product", "parse": true}'</code></div>
<p><span style="font-size: 16px;">如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 </span><a class="custom_link" style="font-size: 16px; background-color: #ffffff;" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a><span style="font-size: 16px;">.</span></p>
<hr />
</div>
<h2 id="integration-methods">整合方法</h2>
<p>Scraper API 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a class="custom_link" href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求时，我们的系统能够在任务完成后自动 ping 用户服务器（见回调）。这种方法可以节省计算资源，而且易于扩展。</li>
<li><a class="custom_link" href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a class="custom_link" href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。您可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。这样，一旦作业准备就绪，我们就会给你发送一条回调消息。在本例中，结果将自动 <a class="custom_link" href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query">单一查询</h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<div class="endpoint">
<pre><strong>邮寄 https://data.oxylabs.io/v1/queries</strong></pre>
</div>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1<span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
-d <span class="s1">'{"源"："universal_ecommerce", "url"："https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"，"callback_url"："https://your.callback.url"，"storage_type"："s3"，"storage_url"："your_bucket_name"}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">universal_ecommerce</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="s">回调URL</span><span class="p">:</span> <span class="s">'https://your.callback.url'</span><span class="p">,</span>
    <span class="s">存储类型</span><span class="p">:</span> <span class="s">'s3'</span><span class="p">,</span>
    <span class="s">存储URL</span><span class="p">:</span> <span class="s">your_bucket_name</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">(</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">universal_ecommerce</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="s1">回调URL</span> <span class="o">=&gt;</span> <span class="s1">'https://your.callback.url'</span><span class="p">,</span>
    <span class="s1">存储类型</span> <span class="o">=&gt;</span> <span class="s1">'s3'</span><span class="p">,</span>
    <span class="s1">存储URL</span> <span class="o">=&gt;</span> <span class="s1">your_bucket_name</span>
<span class="p">);</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
  <span class="s2">"client_id"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
  <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
  <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
  <span class="s2">"地理位置"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
  <span class="s2">"限制"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span>
  <span class="s2">"locale"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"页面"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"解析"</span><span class="p">:</span> <span class="kc">错误</span><span class="p">,</span>
  <span class="s2">"渲染"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
  <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
  <span class="s2">"起始页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"状态"</span><span class="p">:</span> <span class="s2">"待定"</span><span class="p">,</span>
  <span class="s2">"存储类型"</span><span class="p">:</span> <span class="s2">"s3"</span><span class="p">,</span>
  <span class="s2">"storage_url"</span><span class="p">:</span> <span class="s2">"YOUR_BUCKET_NAME/12345678900987654321.json"</span><span class="p">,</span>
  <span class="s2">"子域"</span><span class="p">:</span> <span class="s2">"www"</span><span class="p">,</span>
  <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
  <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面"</span><span class="p">,</span>
  <span class="s2">"_链接"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"自我"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="check-job-status">检查工作状态</h4>
<p>如果您的查询有 <code>回调URL</code>我们会在扫描任务完成后向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v1/queries/{id}</strong></pre>
</div>
<p>查询此链接将返回工作信息，包括其 <code>地位</code>.有三种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<tbody>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出现了问题，我们无法完成任务，很可能是由于目标网站方面的服务器出错。</td>
</tr>
</tbody>
</table>
</div>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'http://data.oxylabs.io/v1/queries/12345678900987654321'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终点获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'http://data.oxylabs.io/v1/queries/12345678900987654321'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的 JSON 响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将在响应体中打印 JSON 格式的查询信息。请注意，任务 <code>地位</code> 改为 <code>完成的</code>.现在您可以通过查询 <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<p>您还可以看到任务已被 <code>updated_at</code> <code>2019-10-01 00:00:15</code> - 查询需要 14 秒才能完成。</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"client_id"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
  <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
  <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
  <span class="s2">"地理位置"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
  <span class="s2">"限制"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span>
  <span class="s2">"locale"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"页面"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"解析"</span><span class="p">:</span> <span class="kc">错误</span><span class="p">,</span>
  <span class="s2">"渲染"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"沙发"</span><span class="p">,</span>
  <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
  <span class="s2">"起始页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"状态"</span><span class="p">:</span> <span class="s2">"完成"</span><span class="p">,</span>
  <span class="s2">"子域"</span><span class="p">:</span> <span class="s2">"www"</span><span class="p">,</span>
  <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:15"</span><span class="p">,</span>
  <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面"</span><span class="p">,</span>
  <span class="s2">"_链接"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"自我"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="retrieve-job-content">检索工作内容</h4>
<p>通过检查作业的状态，一旦知道可以检索作业，就可以使用 <code>href</code> 根据 <code>rel</code>:<code>成果</code> 在我们的初始响应中。它看起来应该与此类似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code>.</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v1/queries/{id}/results</strong></pre>
</div>
<p>通过设置回调服务，可以自动检索结果，而无需定期检查作业状态。用户需要指定运行回调服务的服务器的 IP 或域。当我们的系统完成一项作业时，它将向所提供的 IP 或域发送一条信息，回调服务将下载结果，如回调实现示例中所述。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'http://data.oxylabs.io/v1/queries/12345678900987654321/results'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终点获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'http://data.oxylabs.io/v1/queries/12345678900987654321/results'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 将经过修饰的 JSON 响应打印到 stdout。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将返回工作内容：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"结果"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"内容"</span><span class="p">:</span> <span class="s2">"
        内容
      "</span><span class="p">,</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:15"</span><span class="p">,</span>
      <span class="s2">"页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
      <span class="s2">"job_id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"状态代码"</span><span class="p">:</span> <span class="mi">200</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="callback">回调</h4>
<p>回调是一个 <code>职位</code> 我们会向您的机器发送请求，告知数据提取任务已完成，并提供下载刮擦内容的 URL。这意味着您不再需要 <a class="custom_link" href="https://developers.oxylabs.io/scraper-apis/ecommerce_scraper_api/source/universal/index.html?http#check-job-status" target="_blank" rel="noopener">检查工作状态</a> 手动操作。一旦数据到齐，我们会通知您，您现在需要做的就是 <a class="custom_link" href="#retrieve-job-content">取回</a>.</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code><span class="c"># 请查看 Python 和 PHP 代码示例。</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="c"># 这是一个简单的 Sanic 网络服务器，通过 localhost:8080 监听回调路由。</span>
<span class="c"># 它会将作业结果打印到 stdout。</span>
<span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>
<span class="kn">从</span> <span class="nn">卫生</span> <span class="kn">舶来品</span> <span class="n">萨尼奇</span><span class="p">,</span> <span class="n">回应</span>


<span class="n">AUTH_TUPLE</span> <span class="o">=</span> <span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">)</span>

<span class="n">应用</span> <span class="o">=</span> <span class="n">萨尼奇</span><span class="p">()</span>


<span class="c"># 定义 /job_listener 端点，接受 POST 请求。</span>
<span class="nd">@app.route</span><span class="p">(</span><span class="s">/job_listener</span><span class="p">,</span> <span class="n">方法</span><span class="o">=</span><span class="p">[</span><span class="s">POST</span><span class="p">])</span>
<span class="n">异步</span> <span class="k">捍卫</span> <span class="nf">工作监听器</span><span class="p">(</span><span class="n">要求</span><span class="p">):</span>
    <span class="k">尝试</span><span class="p">:</span>
        <span class="n">重新</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">json</span>
        <span class="n">链接</span> <span class="o">=</span> <span class="n">重新</span><span class="o">.</span><span class="n">获取</span><span class="p">(</span><span class="s">链接</span><span class="p">,</span> <span class="p">[])</span>
        <span class="k">对于</span> <span class="n">链接</span> <span class="ow">于</span> <span class="n">链接</span><span class="p">:</span>
            <span class="k">如果</span> <span class="n">链接</span><span class="p">[</span><span class="s">rel</span><span class="p">]</span> <span class="o">==</span> <span class="s">结果</span><span class="p">:</span>
                <span class="c"># Sanic 是异步的，但请求是同步的，以充分发挥</span>
                <span class="c"># 利用 Sanic 的优势，使用 aiohttp。</span>
                <span class="n">res_response</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
                    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
                    <span class="n">网址</span><span class="o">=</span><span class="n">链接</span><span class="p">[</span><span class="s">href</span><span class="p">],</span>
                    <span class="n">授权</span><span class="o">=</span><span class="n">AUTH_TUPLE</span><span class="p">,</span>
                <span class="p">)</span>
                <span class="n">打印</span><span class="p">(</span><span class="n">res_response</span><span class="o">.</span><span class="n">json</span><span class="p">())</span>
                <span class="k">断裂</span>
    <span class="k">除开</span> <span class="nb">例外情况</span> <span class="k">作为</span> <span class="n">e</span><span class="p">:</span>
        <span class="k">打印</span><span class="p">(</span><span class="s">"监听器异常：{}"</span><span class="o">.</span><span class="n">格式</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
    <span class="k">返回</span> <span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">(</span><span class="n">地位</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">机构</span><span class="o">=</span><span class="p">{</span><span class="s">状态</span><span class="p">:</span> <span class="s">好的</span><span class="p">})</span>


<span class="k">如果</span> <span class="n">姓名____</span> <span class="o">==</span> <span class="s">'__main__'（__main__</span><span class="p">:</span>
    <span class="n">应用</span><span class="o">.</span><span class="n">运行</span><span class="p">(</span><span class="n">东道主</span><span class="o">=</span><span class="s">'0.0.0.0'</span><span class="p">,</span> <span class="n">港</span><span class="o">=</span><span class="mi">8080</span><span class="p">)</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>
<span class="nv">$stdout</span> <span class="o">=</span> <span class="nb">fopen</span><span class="p">(</span><span class="s1">php://stdout</span><span class="p">,</span> <span class="s1">'w'</span><span class="p">);</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">))</span> <span class="p">{</span>
    <span class="nv">$result</span> <span class="o">=</span> <span class="nb">数组合并</span><span class="p">(</span><span class="nv">$_POST</span><span class="p">,</span> <span class="p">(</span><span class="k">矩阵</span><span class="p">)</span> <span class="nb">json_decode</span><span class="p">(</span><span class="nb">file_get_contents</span><span class="p">(</span><span class="s1">php://input</span><span class="p">)));</span>

    <span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

    <span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries/"</span><span class="o">.</span><span class="nv">$result</span><span class="p">[</span><span class="s1">id</span><span class="p">]</span><span class="o">.</span><span class="s1">结果</span><span class="p">);</span>
    <span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
    <span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
    <span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

    <span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
    <span class="nb">fwrite</span><span class="p">(</span><span class="nv">$stdout</span><span class="p">,</span> <span class="nv">$result</span><span class="p">);</span>

    <span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
        <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
    <span class="p">}</span>
    <span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>回调输出示例</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>  
   <span class="s2">"创建时间"</span><span class="p">:</span><span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
   <span class="s2">"更新时间"</span><span class="p">:</span><span class="s2">"2019-10-01 00:00:15"</span><span class="p">,</span>
   <span class="s2">"locale"</span><span class="p">:</span><span class="kc">无效</span><span class="p">,</span>
   <span class="s2">"client_id"</span><span class="p">:</span><span class="mi">163</span><span class="p">,</span>
   <span class="s2">"user_agent_type"</span><span class="p">:</span><span class="s2">"桌面"</span><span class="p">,</span>
   <span class="s2">"源"</span><span class="p">:</span><span class="s2">"universal_ecommerce"</span><span class="p">,</span>
   <span class="s2">"页面"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
   <span class="s2">"子域"</span><span class="p">:</span><span class="s2">"www"</span><span class="p">,</span>
   <span class="s2">"状态"</span><span class="p">:</span><span class="s2">"完成"</span><span class="p">,</span>
   <span class="s2">"起始页"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
   <span class="s2">"解析"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
   <span class="s2">"渲染"</span><span class="p">:</span><span class="kc">无效</span><span class="p">,</span>
   <span class="s2">"优先权"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
   <span class="s2">"ttl"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
   <span class="s2">"起源"</span><span class="p">:</span><span class="s2">"api"</span><span class="p">,</span>
   <span class="s2">"坚持"</span><span class="p">:</span><span class="kc">真</span><span class="p">,</span>
   <span class="s2">"id"</span><span class="p">:</span><span class="s2">"12345678900987654321"</span><span class="p">,</span>
   <span class="s2">"回调URL"</span><span class="p">:</span><span class="s2">"http://your.callback.url/"</span><span class="p">,</span>
   <span class="s2">"url"</span><span class="p">:</span><span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
   <span class="s2">"域"</span><span class="p">:</span><span class="s2">"de"</span><span class="p">,</span>
   <span class="s2">"限制"</span><span class="p">:</span><span class="mi">10</span><span class="p">,</span>
   <span class="s2">"地理位置"</span><span class="p">:</span><span class="kc">无效</span><span class="p">,</span>
   <span class="p">{</span><span class="err">...</span><span class="p">}</span>
   <span class="s2">"_链接"</span><span class="p">:[</span>
      <span class="p">{</span>  
         <span class="s2">"href"</span><span class="p">:</span><span class="s2">"https://data.oxylabs.io/v1/queries/12345678900987654321"</span><span class="p">,</span>
         <span class="s2">"方法"</span><span class="p">:</span><span class="s2">"GET"</span><span class="p">,</span>
         <span class="s2">"rel"</span><span class="p">:</span><span class="s2">"自我"</span>
      <span class="p">},</span>
      <span class="p">{</span>  
         <span class="s2">"href"</span><span class="p">:</span><span class="s2">"https://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
         <span class="s2">"方法"</span><span class="p">:</span><span class="s2">"GET"</span><span class="p">,</span>
         <span class="s2">"rel"</span><span class="p">:</span><span class="s2">"结果"</span>
      <span class="p">}</span>
   <span class="p">],</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="batch-query">批量查询</h4>
<p>Scraper API 还接受每次查询多个关键词，每批最多可提取 1,000 个关键词。以下端点将向提取队列提交多个关键词。</p>
<div class="endpoint">
<pre><strong>邮寄 https://data.oxylabs.io/v1/queries/batch</strong></pre>
</div>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<p>系统会将每个关键字作为一个单独请求来处理。如果您提供了回调 URL，则每个关键字都会收到一个单独的调用。否则，我们的初始响应将包含任务 <code>本我</code>的所有关键字。例如，如果您发送了 50 个关键字，我们将返回 50 个唯一的职位。 <code>本我</code>s.</p>
<p>重要！ <code>询问</code> 是唯一一个可以有多个值的参数。所有其他参数对于该批次查询都是一样的。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v1/queries/batch'</span> -H <span class="s1">内容类型：应用程序/json</span> <span class="se">\</span>
 -d <span class="s1">@keywords.json</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">舶来品</span> <span class="nn">json</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 从文件中获取有效载荷。</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">关键词.json</span><span class="p">,</span> <span class="s">'r'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">载荷</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">载荷</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">阅读</span><span class="p">())</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries/batch'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 打印经过修饰的回复。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$paramsFile</span> <span class="o">=</span> <span class="nb">file_get_contents</span><span class="p">(</span><span class="nb">真实路径</span><span class="p">(</span><span class="s2">"keywords.json"</span><span class="p">));</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries/batch"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nv">$paramsFile</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p><code>keywords.json</code> 内容：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>  
   <span class="s2">"url"</span><span class="p">:[</span>  
      <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
      <span class="s2">"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"</span><span class="p">,</span>
      <span class="s2">"https://books.toscrape.com/catalogue/soumission_998/index.html"</span>
   <span class="p">],</span>
   <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
   <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span>
<span class="p">}</span>
</code></pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"查询"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678901234567890"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678901234567890/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"01234567899876543210"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/soumission_998/index.html"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/01234567899876543210/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="get-notifier-ip-address-list">获取通知程序 IP 地址列表</h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v1/info/callbacker_ips'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从回调 IP 端点获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v1/info/callbacker_ips'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 将经过修饰的 JSON 响应打印到 stdout。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/info/callbacker_ips"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"ips"</span><span class="p">:</span> <span class="p">[</span>
        <span class="s2">"x.x.x.x"</span><span class="p">,</span>
        <span class="s2">"y.y.y.y"</span>
    <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="upload-to-storage">上传到存储器</h4>
<p>默认情况下，Ecommerce Spraper API 的作业结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。该功能的优点是您无需额外请求即可获取结果，所有内容都会直接存储到您的存储桶中。</p>
<p>目前，我们只支持 Amazon S3。如果您想使用其他类型的存储，请联系您的客户经理讨论时间安排。</p>
<p>要将作业结果上传到 Amazon S3 存储桶，需要设置特殊权限。为此，请转到 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9123" src="https://www.proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Upload-to-Storage.png" alt="Oxylabs ECommerce Universal Scraper API Upload to Storage" width="482" height="319" srcset="https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Upload-to-Storage.png 482w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Upload-to-Storage-300x199.png 300w" sizes="(max-width: 482px) 100vw, 482px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://developers.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记更改 <code>您的邮筒名称</code>.该策略允许我们写入您的邮筒、为您上传文件并了解邮筒的位置。</p>
<p>要使用此功能，您需要在请求中指定两个附加参数。了解更多信息 <a class="custom_link" href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到工作编号。在 <a class="custom_link" href="#single-query">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"版本"</span><span class="p">:</span> <span class="s2">"2012-10-17"</span><span class="p">,</span>
    <span class="s2">"Id"</span><span class="p">:</span> <span class="s2">"Policy1577442634787"</span><span class="p">,</span>
    <span class="s2">"声明"</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
            <span class="s2">"希德"</span><span class="p">:</span> <span class="s2">"Stmt1577442633719"</span><span class="p">,</span>
            <span class="s2">"效果"</span><span class="p">:</span> <span class="s2">"允许"</span><span class="p">,</span>
            <span class="s2">"校长"</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">"AWS"</span><span class="p">:</span> <span class="s2">"arn:aws:iam::324311890426:user/oxylabs.s3.uploader"</span>
            <span class="p">},</span>
            <span class="s2">"行动"</span><span class="p">:</span> <span class="s2">"s3:GetBucketLocation</span><span class="p">,</span>
            <span class="s2">"资源"</span><span class="p">:</span> <span class="s2">"arn:aws:s3:::YOUR_BUCKET_NAME"</span>
        <span class="p">},</span>
        <span class="p">{</span>
            <span class="s2">"希德"</span><span class="p">:</span> <span class="s2">"Stmt1577442633719"</span><span class="p">,</span>
            <span class="s2">"效果"</span><span class="p">:</span> <span class="s2">"允许"</span><span class="p">,</span>
            <span class="s2">"校长"</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">"AWS"</span><span class="p">:</span> <span class="s2">"arn:aws:iam::324311890426:user/oxylabs.s3.uploader"</span>
            <span class="p">},</span>
            <span class="s2">"行动"</span><span class="p">:</span> <span class="p">[</span>
                <span class="s2">"s3:PutObject</span><span class="p">,</span>
                <span class="s2">"s3:PutObjectAcl"</span>
            <span class="p">],</span>
            <span class="s2">"资源"</span><span class="p">:</span> <span class="s2">"arn:aws:s3:::YOUR_BUCKET_NAME/*"</span>
        <span class="p">}</span>
    <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交与推拉式方法相同，但使用实时方法时，我们将在连接打开时返回内容。您向我们发送一个查询，连接保持打开，我们检索内容并将其发送给您。处理此问题的端点如下：</p>
<div class="endpoint">
<pre><strong>邮寄 https://realtime.oxylabs.io/v1/queries</strong></pre>
</div>
<p>开放连接的超时限制为 100 秒。因此，在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://realtime.oxylabs.io/v1/queries'</span> -H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
 -d <span class="s1">'{"源"："universal_ecommerce", "url"："https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">universal_ecommerce</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://realtime.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 返回的不是包含任务状态和结果 url 的响应，而是</span>
<span class="c"># JSON 响应结果。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">(</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">universal_ecommerce</span><span class="p">,</span>
    <span class="s1">查询</span> <span class="o">=&gt;</span> <span class="s1">沙发</span><span class="p">,</span>
<span class="p">);</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://realtime.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err"># URL 必须编码以转义 `&amp;` 和 `=` 字符。本示例中不需要。

https://realtime.oxylabs.io/v1/queries?source=universal_ecommerce&amp;url=https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html&amp;access_token=12345abcde</span></code></pre>
</div></div></div>
<p>打开连接时将返回的响应体示例：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"结果"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"内容"</span><span class="p">:</span> <span class="s2">"&lt;html
      内容
      "</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:15"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
      <span class="s2">"页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">,</span>
      <span class="s2">"job_id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"状态代码"</span><span class="p">:</span> <span class="mi">200</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。您只需将我们的入口节点用作代理，使用 Scraper API 凭据进行授权，然后忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<div class="endpoint">
<pre><strong>GET realtime.oxylabs.io:60000</strong></pre>
</div>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a class="custom_link" href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是一份可接受的参数列表：</p>
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a class="custom_link" href="#user_agent_type">这里</a>.</td>
</tr>
</tbody>
</table>
<p>如果您在设置超级用户接口时需要帮助，请通过以下方式与我们联系 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a>.</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl -k <span class="se">\</span>
-x realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-User-Agent-Type: desktop_chrome"</span> <span class="se">\</span>
<span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 定义代理口令。不要忘记在此处填写您的真实用户和密码。</span>
<span class="n">代理</span> <span class="o">=</span> <span class="p">{</span>
  <span class="s">http</span><span class="p">:</span> <span class="s">'http://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
  <span class="s">https</span><span class="p">:</span> <span class="s">'https://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
<span class="p">}</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">GET</span><span class="p">,</span>
    <span class="s">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">核对</span><span class="o">=</span><span class="bp">假的</span><span class="p">,</span>  <span class="c"># 或接受我们的证书。</span>
    <span class="n">代理</span><span class="o">=</span><span class="n">代理</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 将结果页打印到 stdout</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span>

<span class="c"># 将返回的 HTML 保存为 result.html 文件</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">结果.html</span><span class="p">,</span> <span class="s">'w'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">f</span><span class="o">.</span><span class="n">写道</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_PROXY</span><span class="p">,</span> <span class="s1">realtime.oxylabs.io:60000</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_proxyuserpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifypeer</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifyhost</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">超级用户接口不支持 HTTP 方法</span></code></pre>
</div></div></div>
<hr />
<h2 id="content-type">内容类型</h2>
<p>Scraper API 返回 <strong>原始HTML</strong>以及 <strong>结构化 JSON</strong>.</p>
<h3 id="download-images">下载图片</h3>
<p>可以通过 Scraper API 下载图像。如果通过 SuperAPI 下载，只需将输出保存到图片扩展名即可。例如</p>
<p><code>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://example.com/image.jpg" &gt;&gt; image.jpg</code></p>
<p>如果您使用 <a class="custom_link" href="#push-pull">推拉式</a> 或 <a class="custom_link" href="#realtime">实时</a> 方法，您需要添加 <code>content_encoding</code> 参数的值为 <code>base64</code>.收到结果后，您需要解码来自 <code>内容</code> 转换成字节并保存为图像文件。右侧有一个 Python 示例。</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>Scraper API 接受 URL 以及其他参数，如 User-Agent 类型、代理位置等。请参见此方法，我们将其称为 <a class="custom_link" href="#direct">直接</a>下文将对此进行说明。</p>
<p>Scraper API 能够在扫描时渲染 JavaScript。这样，您就能从网页中获取更多数据，并获得屏幕截图。</p>
<p>如果您对文件的任何部分有疑问，请致电我们 <a class="custom_link" href="mailto:support@oxylabs.io" target="_blank" rel="nofollow noopener">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-9126 alignleft" src="https://www.proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Direct.png" alt="Oxylabs ECommerce Universal Scraper API Direct" width="426" height="17" srcset="https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Direct.png 426w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-ECommerce-Universal-Scraper-API-Direct-300x12.png 300w" sizes="(max-width: 426px) 100vw, 426px" /></p>
<p>&nbsp;</p>
<p><code>universal_ecommerce</code> 源的目的是检索互联网上任何 URL 的内容。 <code>职位</code>-将 JSON 格式的参数发送到以下端点，将把指定的 URL 提交到提取队列。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="216">
<tbody>
<tr>
<td style="font-weight: 400;" width="72">参数</td>
<td style="font-weight: 400;" width="72">说明</td>
<td style="font-weight: 400;" width="72">默认值</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">消息来源</td>
<td style="font-weight: 400;" width="72">数据来源</td>
<td style="font-weight: 400;" width="72">universal_ecommerce</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">网址</td>
<td style="font-weight: 400;" width="72">通用网页的直接 URL（链接</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">用户代理类型</td>
<td style="font-weight: 400;" width="72">设备类型和浏览器。完整列表如下 <a href="#user_agent_type">这里。</a></td>
<td style="font-weight: 400;" width="72">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地理位置</td>
<td style="font-weight: 400;" width="72">用于检索数据的代理地理位置。支持位置的完整列表如下 <a href="#geo_location">这里。</a></td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">地点</td>
<td style="font-weight: 400;" width="72">正如 Accept-Language 标头所期望的那样。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">给予</td>
<td style="font-weight: 400;" width="72">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="72"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">content_encoding</td>
<td style="font-weight: 400;" width="72">如果要下载图像，请添加此参数。了解更多信息 <a href="#download-images">这里。</a></td>
<td style="font-weight: 400;" width="72">base64</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">Base64 编码的 POST 请求正文。它只有在 http_method 设置为 post 时才有用。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">内容</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">递上自己的饼干</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">饼干</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">指明是否希望扫描程序跟踪重定向（带有目标 URL 的 3xx 响应），以获取重定向链末端 URL 的内容。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">follow_redirects</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">传递自己的标头</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">页眉</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">如果您想通过电子商务通用抓取器向目标 URL 发出 POST 请求，请将其设置为 "发布"。</td>
<td style="font-weight: 400;" rowspan="2" width="72">获取</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">http_method</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">如果您想在多个请求中使用同一个代理，可以使用此参数。只需将会话设置为任意字符串，我们就会为该 ID 分配一个代理，并最多保留 10 分钟。之后，如果您使用相同的会话 ID 发出另一个请求，我们就会为该特定会话 ID 分配一个新的代理。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">session_id</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">背景</td>
<td style="font-weight: 400;" rowspan="2" width="72">定义一个自定义 HTTP 响应代码（或其中的几个），我们应根据该代码认为刮擦成功并将内容返回给您。如果您希望我们返回 503 错误页面或在其他一些非标准情况下，这可能会很有用。</td>
<td style="font-weight: 400;" rowspan="2" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">成功状态代码</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">回调URL</td>
<td style="font-weight: 400;" width="72">URL 到您的回调端点。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析</td>
<td style="font-weight: 400;" width="72">true 将返回结构化数据，只要提交的 URL 指向电子商务产品页面即可。将此参数与解析器类型参数结合使用，可使用我们的自适应解析器。</td>
<td style="font-weight: 400;" width="72">假</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">解析器类型</td>
<td style="font-weight: 400;" width="72">将值设为 ecommerce_product，以访问自适应解析器。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储类型</td>
<td style="font-weight: 400;" width="72">存储服务提供商。目前只支持亚马逊 S3：s3。完整的实现可以在<a href="#upload-to-storage"> 上传到存储器</a> 页。只能通过推拉（回调）方法运行。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="72">存储URL</td>
<td style="font-weight: 400;" width="72">您的 Amazon S3 存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="72">&#8211;</td>
</tr>
</tbody>
</table>
</div>
<p><code class="required">  </code> - 所需参数</p>
<p>在本例中，应用程序接口将以推拉方式检索一个电子商务通用产品页面。所有可用参数都包含在内（尽管在同一请求中并非总是必要或兼容），以便让您了解如何格式化您的请求：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
 -d <span class="s1">'{"源"："universal_ecommerce", "url"："https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html", "user_agent_type"："mobile", "render"："html"、
 "上下文"：{"key"："headers", "value": ["Accept-Language"："en-US", "Content-Type"："application/octet-stream", "Custom-Header"："自定义标题内容"]}，{"key"："cookies"，"value"：[{"key"："NID"，"值"："1234567890"}，{"key"："1P JAR"，"值"："0987654321"}，{"key"："follow_redirects", "value": true}, {"key"："http_method", "value"："get"}, {"key"："内容"，"值"："base64EncodedPOSTBody"}, {"key"："successful_status_codes", "value": [303, 808, 909]}]}]}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">universal_ecommerce</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://www.etsy.com/listing/399423455/big-glass-house-planter-handmade-glass?ref=hp_prn&amp;frs=1'</span><span class="p">,</span>
    <span class="s">用户代理类型</span><span class="p">:</span> <span class="s">桌面</span><span class="p">,</span>
    <span class="s">地理位置</span><span class="p">:</span> <span class="s">美国</span><span class="p">,</span>
    <span class="s">解析</span><span class="p">:</span> <span class="n">真</span><span class="p">,</span>
    <span class="s">解析器类型</span><span class="p">:</span> <span class="s">"电子商务产品"</span><span class="p">,</span>
    <span class="s">上下文</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">session_id</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">1234567890abcdef</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">标题</span><span class="p">,</span> <span class="s">价值</span><span class="p">:</span> 
            <span class="p">{</span>
             <span class="s">接受语言</span><span class="p">:</span> <span class="s">en-US</span><span class="p">,</span>
             <span class="s">内容类型</span><span class="p">:</span> <span class="s">应用程序/八字节流</span><span class="p">,</span>
             <span class="s">自定义标题</span><span class="p">:</span> <span class="s">自定义标题内容</span>
            <span class="p">}</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">饼干</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">NID</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'1234567890'</span>
           <span class="p">},</span>
           <span class="p">{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">1P_JAR</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'0987654321'</span>
           <span class="p">}</span>
         <span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">follow_redirects</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="n">真</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">成功状态代码</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">http_method</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">获取</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">内容</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">base64EncodedPOSTBody</span>
        <span class="p">}</span>
    <span class="p">],</span>
    <span class="s">回调URL</span><span class="p">:</span> <span class="s">'https://your.callback.url'</span><span class="p">,</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">universal_ecommerce</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="s1">上下文</span> <span class="o">=&gt;</span> <span class="p">[</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">session_id</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">1234567890abcdef</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">标题</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="s1">接受语言</span> <span class="o">=&gt;</span> <span class="s1">en-US</span><span class="p">,</span>
                <span class="s1">内容类型</span> <span class="o">=&gt;</span> <span class="s1">应用程序/八字节流</span><span class="p">,</span>
                <span class="s1">自定义标题</span> <span class="o">=&gt;</span> <span class="s1">自定义标题内容</span>
            <span class="p">],</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">饼干</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">NID</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'1234567890'</span><span class="p">],</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">1P_JAR</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'0987654321'</span><span class="p">]</span>
            <span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">follow_redirects</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">真实</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">成功状态代码</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">http_method</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">获取</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">内容</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">base64EncodedPOSTBody</span>
        <span class="p">]</span>
    <span class="p">]</span>
<span class="p">];</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">HTTP 方法目前不支持 Push-Pull</span></code></pre>
</div></div></div>
<p>以下是实时模式下的相同示例：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
-d <span class="s1">'{"源"："universal_ecommerce", "url"："https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html", "user_agent_type"："mobile", "context"：{"key"："headers"（标题），"value"（值）：["Accept-Language"（接受语言）："en-US"，"Content-Type"："application/octet-stream"，"Custom-Header"："自定义标题内容"]}，{"key"："cookies"，"value"：[{"key"："NID"，"值"："1234567890"}，{"key"："1P JAR"，"值"："0987654321"}，{"key"："follow_redirects", "value": true}, {"key"："http_method", "value"："get"}, {"key"："内容"，"值"："base64EncodedPOSTBody"}, {"key"："successful_status_codes", "value": [303, 808, 909]}]}]}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">universal_ecommerce</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="s">用户代理类型</span><span class="p">:</span> <span class="s">移动</span><span class="p">,</span>
    <span class="s">地理位置</span><span class="p">:</span> <span class="s">美国</span><span class="p">,</span>
    <span class="s">上下文</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">session_id</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">1234567890abcdef</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">标题</span><span class="p">,</span> <span class="s">价值</span><span class="p">:</span> 
            <span class="p">{</span>
             <span class="s">接受语言</span><span class="p">:</span> <span class="s">en-US</span><span class="p">,</span>
             <span class="s">内容类型</span><span class="p">:</span> <span class="s">应用程序/八字节流</span><span class="p">,</span>
             <span class="s">自定义标题</span><span class="p">:</span> <span class="s">自定义标题内容</span>
            <span class="p">}</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">饼干</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">NID</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'1234567890'</span>
           <span class="p">},</span>
           <span class="p">{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">1P_JAR</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'0987654321'</span>
           <span class="p">}</span>
         <span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">follow_redirects</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="n">真</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">成功状态代码</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">http_method</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">获取</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">内容</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">base64EncodedPOSTBody</span>
        <span class="p">}</span>
    <span class="p">],</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://realtime.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 返回的不是包含任务状态和结果 url 的响应，而是</span>
<span class="c"># JSON 响应结果。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">universal_ecommerce</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="s1">上下文</span> <span class="o">=&gt;</span> <span class="p">[</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">session_id</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">1234567890abcdef</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">标题</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="s1">接受语言</span> <span class="o">=&gt;</span> <span class="s1">en-US</span><span class="p">,</span>
                <span class="s1">内容类型</span> <span class="o">=&gt;</span> <span class="s1">应用程序/八字节流</span><span class="p">,</span>
                <span class="s1">自定义标题</span> <span class="o">=&gt;</span> <span class="s1">自定义标题内容</span>
            <span class="p">],</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">饼干</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">NID</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'1234567890'</span><span class="p">],</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">1P_JAR</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'0987654321'</span><span class="p">]</span>
            <span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">follow_redirects</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">真实</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">成功状态代码</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">http_method</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">获取</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">内容</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">base64EncodedPOSTBody</span>
        <span class="p">]</span>
    <span class="p">]</span>
<span class="p">];</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err"># The whole string you submit has to be URL-encoded.

https://realtime.oxylabs.io/v1/queries?source=universal_ecommerce&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2Ftagged%2Fpython&access_token=12345abcde</span></code></pre>
</div></div></div>
<p>并通过超级用户接口（SuperAPI）：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code><span class="c"># GET 请求可以如下所示：</span>
curl -k <span class="se">\</span>
-x http://realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="se">\</span>
<span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-Session-Id：1234567890abcdef"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-地理位置：印度"</span> <span class="se">\</span>
-H <span class="s2">"接受语言：en-US"</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/八字节流</span> <span class="se">\</span>
-H <span class="s2">"自定义标题：自定义标题内容"</span> <span class="se">\</span>
-H <span class="s2">"Cookie：NID=1234567890; 1P_JAR=0987654321"</span> <span class="se">\</span>
-H <span class="s2">"X-Status-Code：303, 808, 909"</span>

<span class="c"># POST 请求具有相同的结构，但包含一个指定为 POST 请求的参数：</span>
curl -X POST <span class="se">\</span>
-k <span class="se">\</span>
-x http://realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-Session-Id：1234567890abcdef"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-地理位置：印度"</span> <span class="se">\</span>
-H <span class="s2">"自定义标题：自定义标题内容"</span> <span class="se">\</span>
-H <span class="s2">"Cookie：NID=1234567890; 1P_JAR=0987654321"</span> <span class="se">\</span>
-H <span class="s2">"X-Status-Code：303, 808, 909"</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 定义代理口令。不要忘记在此处填写您的真实用户和密码。</span>
<span class="n">代理</span> <span class="o">=</span> <span class="p">{</span>
  <span class="s">http</span><span class="p">:</span> <span class="s">'http://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
  <span class="s">https</span><span class="p">:</span> <span class="s">'https://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
<span class="p">}</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">GET</span><span class="p">,</span>
    <span class="s">'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">核对</span><span class="o">=</span><span class="bp">假的</span><span class="p">,</span>  <span class="c"># 或接受我们的证书。</span>
    <span class="n">代理</span><span class="o">=</span><span class="n">代理</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 将结果页打印到 stdout</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span>

<span class="c"># 将返回的 HTML 保存为 result.html 文件</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">结果.html</span><span class="p">,</span> <span class="s">'w'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">f</span><span class="o">.</span><span class="n">写道</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_PROXY</span><span class="p">,</span> <span class="s1">realtime.oxylabs.io:60000</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_proxyuserpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifypeer</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifyhost</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">超级用户接口不支持 HTTP 方法</span></code></pre>
</div></div></div>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="geo_location">地理位置</h3>
<p>支持的地理位置完整列表以 CSV 格式提供 <a class="custom_link" href="https://developers.oxylabs.io/resources/universal-supported-geo_location-values.csv" target="_blank" rel="noopener">这里</a>.</p>
<pre class="highlight json tab-json"><code><span class="s2">"阿拉伯联合酋长国</span><span class="p">,</span>
<span class="s2">"阿尔巴尼亚"</span><span class="p">,</span>
<span class="s2">"亚美尼亚</span><span class="p">,</span>
<span class="s2">"安哥拉"</span><span class="p">,</span>
<span class="s2">"阿根廷"</span><span class="p">,</span>
<span class="s2">"澳大利亚"</span><span class="p">,</span>
<span class="err">...</span>
<span class="s2">"乌拉圭"</span><span class="p">,</span>
<span class="s2">"乌兹别克斯坦"</span><span class="p">,</span>
<span class="s2">"委内瑞拉玻利瓦尔共和国</span><span class="p">,</span>
<span class="s2">"越南"</span><span class="p">,</span>
<span class="s2">"南非"</span><span class="p">,</span>
<span class="s2">"津巴布韦</span></code></pre>
<hr />
<h3 id="http_method">HTTP_Method</h3>
<p>电子商务 Universal Scraper API 支持两种 HTTP(S) 方法： <code>获取</code> (默认）和 <code>职位</code>.</p>
<pre class="highlight json tab-json"><code><span class="s2">"GET"</span><span class="p">,</span>
<span class="s2">"发布"</span></code></pre>
<hr />
<h3 id="render">渲染</h3>
<p>E-commerce Universal Scraper API 可渲染 Javascript 并返回渲染的 HTML 文档或 PNG 网页截图。</p>
<pre class="highlight json tab-json"><code><span class="s2">"html"</span><span class="p">,</span>
<span class="s2">"png"</span></code></pre>
<hr />
<h3 id="user_agent_type">User_Agent_Type</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://developers.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre class="highlight json tab-json"><code><span class="p">[</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机桌面浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"desktop_firefox"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面火狐浏览器的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面铬色"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Chrome 浏览器的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面歌剧"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Opera 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面边缘"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Edge 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"desktop_safari"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Safari 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"移动"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机移动浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"mobile_android"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版安卓浏览器的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"mobile_ios"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版 iPhone 浏览器的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"平板电脑"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机平板电脑浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"tablet_android"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版安卓平板电脑的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"tablet_ios"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版 iPad 平板电脑的随机用户代理"。</span>
  <span class="p">}</span>
<span class="p">]</span></code></pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v2/stats</strong></pre>
</div>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>此查询将返回所有时间的统计数据。您可以通过添加以下任一选项来查询每日和每月的使用量 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="3" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v2/stats'</span>
</code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终端获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v2/stats'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的 JSON 响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v2/stats"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div></div></div>
<p>输出示例</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"数据"</span><span class="p">:</span> <span class="p">{</span>
        <span class="s2">"来源"</span><span class="p">:</span> <span class="p">[</span>
            <span class="p">{</span>
                <span class="s2">"实时结果计数"</span><span class="p">:</span> <span class="s2">"90"</span><span class="p">,</span>
                <span class="s2">"结果数"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span>
                <span class="s2">"标题"</span><span class="p">:</span> <span class="s2">"universal_ecommerce"</span>
            <span class="p">}</span>
        <span class="p">]</span>
    <span class="p">},</span>
    <span class="s2">"元"</span><span class="p">:</span> <span class="p">{</span>
        <span class="s2">"group_by"</span><span class="p">:</span> <span class="kc">无效</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下端点将提供您的每月承诺信息以及已使用的承诺额度：</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v2/stats/limits</strong></pre>
</div>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="3" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v2/stats/limits'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终端获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v2/stats/limits'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的 JSON 响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v2/stats/limits"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div></div></div>
<p>输出示例</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"每月要求承诺"</span><span class="p">:</span> <span class="mi">4500000</span><span class="p">,</span>
    <span class="s2">"已用请求"</span><span class="p">:</span> <span class="mi">985000</span>
<span class="p">}</span></code></pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
</tbody>
</table>
<hr />
<h4>参考资料</h4>
<ul>
<li style="list-style-type: none;">
<ul>
<li><a href="https://developers.oxylabs.io/scraper-apis/ecommerce_scraper_api/source/universal/index.html#quick-start" target="_blank" rel="nofollow noopener">https://developers.oxylabs.io/scraper-apis/ecommerce_scraper_api/source/universal/index.html#quick-start</a></li>
<li><a href="https://developers.oxylabs.io/scraper-apis/" target="_blank" rel="nofollow noopener">https://developers.oxylabs.io/scraper-apis/ </a></li>
</ul>
</li>
</ul>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-ecommerce-scraper-api/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9117</post-id>	</item>
		<item>
		<title>How to Use Oxylabs Scraper API [Part 2]: Oxylabs Web Scraper API</title>
		<link>https://proxysp.com/zh/oxylabs-web-scraper-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oxylabs-web-scraper-api</link>
					<comments>https://proxysp.com/zh/oxylabs-web-scraper-api/#respond</comments>
		
		<dc:creator><![CDATA[proxysp]]></dc:creator>
		<pubdate>Thu, 01 Jan 1970 00:00:00 +0000</pubdate>
				<category><![CDATA[How to Use OxyLabs Proxy (OxyLabs User Manual Navigation)]]></category>
		<guid ispermalink="false">https://www.proxysp.com/?p=9062</guid>

					<description><![CDATA[你知道如何使用 Oxylabs Web Scraper API 吗？这是 OxyLabs 官方最全面的介绍。快速入门 Web Scraper API 建立于 ...<p class="read-more"> <a class="ast-button" href="https://proxysp.com/zh/oxylabs-web-scraper-api/"> <span class="screen-reader-text">如何使用 Oxylabs Scraper API [第 2 部分]：Oxylabs Web Scraper API</span> 查看全文 "</a></p>]]></description>
										<content:encoded><![CDATA[<blockquote><p>你知道如何使用 Oxylabs Web Scraper API 吗？这是 OxyLabs 官方最全面的介绍。</p></blockquote>
<h2><a href="https://www.proxysp.com/redirect/oxylabs" target="_blank" rel="nofollow noopener"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9217" src="https://www.proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-API-pricing.jpg" alt="Oxylabs Web Scraper API pricing" width="898" height="500" srcset="https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-API-pricing.jpg 898w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-API-pricing-300x167.jpg 300w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-API-pricing-768x428.jpg 768w" sizes="(max-width: 898px) 100vw, 898px" /></a></h2>
<h2 id="quick-start">快速入门</h2>
<p>Web Scraper API 可帮助您进行繁重的数据检索操作。您可以使用 Web Scraper API 访问各种公共页面。它能毫不费力地提取网页数据，不会出现任何延迟或错误。</p>
<p>Web Scraper API 使用 <a class="custom_link" href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="nofollow noopener">基本 HTTP 身份验证</a> 需要发送用户名和密码。</p>
<p>这是迄今为止开始使用 Web Scraper API 最快的方法。您将向 <code>https://ip.oxylabs.io</code> 使用 <a class="custom_link" href="#realtime" target="_blank" rel="noopener">实时</a> 整合方法。不要忘记替换 <code>用户名</code> 和 <code>密码</code> 使用代理用户凭据。</p>
<pre>curl --user "USERNAME:PASSWORD" 'https://realtime.oxylabs.io/v1/queries' -H "Content-Type: application/json" -d '{"source"："universal", "url"："https://ip.oxylabs.io"}'
</pre>
<p>如果您有任何本文件未涉及的问题，请联系您的客户经理或我们的支持人员，地址是 <a class="custom_link" href="mailto:support@oxylabs.io">support@oxylabs.io</a>.</p>
<hr />
<h2 id="integration-methods">整合方法</h2>
<p>Web Scraper API 支持三种集成方法，它们都有各自独特的优势：</p>
<ul>
<li><a href="#push-pull">推拉式</a>.使用这种方法，现在需要与我们的端点保持活动连接，以检索数据。在发出请求后，我们的系统会在任务完成后自动 ping 用户服务器（请参阅  <a href="#Callback">回调</a>).这种方法可以节省计算资源，而且易于扩展。</li>
<li><a class="custom_link" href="#realtime">实时</a>.该方法要求用户与我们的端点保持活动连接，以便在任务完成时成功获取结果。这种方法可以在一个服务中实现，而推拉法则需要两个步骤。</li>
<li><a class="custom_link" href="#superapi">超级用户接口</a>.这种方法与实时方法非常相似，但用户可以使用 HTML Cralwer 作为代理，而不是向我们的端点发布数据。要检索数据，用户必须设置一个代理端点，并向所需的 URL 发送 GET 请求。必须使用标头添加其他参数。</li>
</ul>
<p>我们推荐的数据提取方法是 <a class="custom_link" href="#push-pull">推拉式</a>.</p>
<hr />
<h3 id="push-pull">推拉式</h3>
<p>这是最简单、最可靠、最值得推荐的数据传输方法。在推拉式方案中，您向我们发送查询，我们向您返回工作 <code>本我</code>工作完成后，您可以使用 <code>本我</code> 中检索内容 <code>/结果</code> 端点。您可以自己检查作业完成状态，也可以设置一个能接受 POST 查询的简单监听器。这样，一旦作业准备就绪，我们就会给你发送一条回调消息。在本例中，结果将自动 <a class="custom_link" href="#upload-to-storage">上传到您的 S3 存储桶</a> 名为 <code>您的邮筒名称</code>.</p>
<hr />
<h4 id="single-query">单一查询</h4>
<p>以下端点将处理对一个关键字或 URL 的单次查询。API 将返回一条确认信息，其中包含任务信息，包括任务 <code>本我</code>.您可以使用它来检查任务完成状态 <code>本我</code>或者，您也可以要求我们在扫描任务完成后 ping 您的回调端点，方法是添加 <code>回调URL</code> 在查询中。</p>
<div class="endpoint">
<pre><strong>邮寄 https://data.oxylabs.io/v1/queries</strong></pre>
</div>
<p>您需要在 JSON 主体中将查询参数作为数据发布。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1<span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
-d <span class="s1">'{"源"："universal", "url"："https://stackoverflow.com/questions/tagged/python"、"callback_url"："https://your.callback.url"、"storage_type"："s3", "storage_url"："your_bucket_name"}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">普遍性</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="s">回调URL</span><span class="p">:</span> <span class="s">'https://your.callback.url'</span><span class="p">,</span>
    <span class="s">存储类型</span><span class="p">:</span> <span class="s">'s3'</span><span class="p">,</span>
    <span class="s">存储URL</span><span class="p">:</span> <span class="s">your_bucket_name</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">(</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">普遍性</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="s1">回调URL</span> <span class="o">=&gt;</span> <span class="s1">'https://your.callback.url'</span><span class="p">,</span>
    <span class="s1">存储类型</span> <span class="o">=&gt;</span> <span class="s1">'s3'</span><span class="p">,</span>
    <span class="s1">存储URL</span> <span class="o">=&gt;</span> <span class="s1">your_bucket_name</span>
<span class="p">);</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
  <span class="s2">"client_id"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
  <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
  <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
  <span class="s2">"地理位置"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
  <span class="s2">"限制"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span>
  <span class="s2">"locale"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"页面"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"解析"</span><span class="p">:</span> <span class="kc">错误</span><span class="p">,</span>
  <span class="s2">"渲染"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
  <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">,</span>
  <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"普遍"</span><span class="p">,</span>
  <span class="s2">"起始页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
  <span class="s2">"状态"</span><span class="p">:</span> <span class="s2">"待定"</span><span class="p">,</span>
  <span class="s2">"存储类型"</span><span class="p">:</span> <span class="s2">"s3"</span><span class="p">,</span>
  <span class="s2">"storage_url"</span><span class="p">:</span> <span class="s2">"YOUR_BUCKET_NAME/12345678900987654321.json"</span><span class="p">,</span>
  <span class="s2">"子域"</span><span class="p">:</span> <span class="s2">"www"</span><span class="p">,</span>
  <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
  <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面"</span><span class="p">,</span>
  <span class="s2">"_链接"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"自我"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
      <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
      <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="check-job-status">检查工作状态</h4>
<p>如果您的查询有 <code>回调URL</code>我们会在扫描任务完成后向您发送一条包含内容链接的信息。但是，如果没有 <code>回调URL</code> 在查询中，您需要自己检查任务状态。为此，您需要使用 <code>href</code> 根据 <code>rel</code>:<code>自我</code> 在您向我们的 API 提交查询后收到的响应信息中。它应该与下面的内容相似： <code>http://data.oxylabs.io/v1/queries/12345678900987654321</code>.</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v1/queries/{id}</strong></pre>
</div>
<p>查询此链接将返回工作信息，包括其 <code>地位</code>.有三种可能 <code>地位</code> 价值观</p>
<div class="su-table su-table-responsive">
<table>
<thead>
<tr>
<td><code>未决</code></td>
<td>任务仍在队列中，尚未完成。</td>
</tr>
<tr>
<td><code>完成的</code></td>
<td>任务完成后，您可以通过在 <code>href</code> 根据 <code>rel</code>:<code>成果</code> : <code>http://data.oxylabs.io/v1/queries/12345678900987654321/results</code></td>
</tr>
<tr>
<td><code>有问题</code></td>
<td>任务出现了问题，我们无法完成任务，很可能是由于目标网站方面的服务器出错。</td>
</tr>
</thead>
</table>
</div>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v1/queries/batch'</span> -H <span class="s1">内容类型：应用程序/json</span> <span class="se">\</span>
 -d <span class="s1">@keywords.json</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">舶来品</span> <span class="nn">json</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 从文件中获取有效载荷。</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">关键词.json</span><span class="p">,</span> <span class="s">'r'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">载荷</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">载荷</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">阅读</span><span class="p">())</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries/batch'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 打印经过修饰的回复。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$paramsFile</span> <span class="o">=</span> <span class="nb">file_get_contents</span><span class="p">(</span><span class="nb">真实路径</span><span class="p">(</span><span class="s2">"keywords.json"</span><span class="p">));</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries/batch"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nv">$paramsFile</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p><code>keywords.json</code> 内容：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>  
   <span class="s2">"url"</span><span class="p">:[</span>  
      <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">,</span>
      <span class="s2">"https://stackoverflow.com/questions/tagged/golang"</span><span class="p">,</span>
      <span class="s2">"https://stackoverflow.com/questions/tagged/php"</span>
   <span class="p">],</span>
   <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"普遍"</span><span class="p">,</span>
   <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span>
<span class="p">}</span>
</code></pre>
<p>API 将以 JSON 格式响应查询信息，并将其打印在响应体中，与此类似：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"查询"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"普遍"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678900987654321/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"12345678901234567890"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://stackoverflow.com/questions/tagged/golang"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"普遍"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/12345678901234567890/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="s2">"回调URL"</span><span class="p">:</span> <span class="s2">"https://your.callback.url"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"域"</span><span class="p">:</span> <span class="s2">"com"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="s2">"01234567899876543210"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://stackoverflow.com/questions/tagged/php"</span><span class="p">,</span>
      <span class="s2">"源"</span><span class="p">:</span> <span class="s2">"普遍"</span><span class="p">,</span>
      <span class="p">{</span><span class="err">...</span><span class="p">}</span>
          <span class="s2">"rel"</span><span class="p">:</span> <span class="s2">"结果"</span><span class="p">,</span>
          <span class="s2">"href"</span><span class="p">:</span> <span class="s2">"http://data.oxylabs.io/v1/queries/01234567899876543210/results"</span><span class="p">,</span>
          <span class="s2">"方法"</span><span class="p">:</span> <span class="s2">"GET"</span>
        <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="get-notifier-ip-address-list">获取通知程序 IP 地址列表</h4>
<p>您可能希望将向您发送回调信息的 IP 列入白名单，或为其他目的获取这些 IP 的列表。这可以通过 <code>获取</code>在这个端点上： <code>https://data.oxylabs.io/v1/info/callbacker_ips</code>.</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v1/info/callbacker_ips'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从回调 IP 端点获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v1/info/callbacker_ips'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 将经过修饰的 JSON 响应打印到 stdout。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/info/callbacker_ips"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">目前不支持 HTTP 方法</span></code></pre>
</div></div></div>
<p>API 将返回向您的系统发出回调请求的 IP 列表：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"ips"</span><span class="p">:</span> <span class="p">[</span>
        <span class="s2">"x.x.x.x"</span><span class="p">,</span>
        <span class="s2">"y.y.y.y"</span>
    <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h4 id="upload-to-storage">上传到存储器</h4>
<p>默认情况下，Web Scraper API 的作业结果存储在我们的数据库中。这意味着您需要查询我们的结果端点并自行检索内容。自定义存储功能允许您将结果存储在自己的云存储中。此功能的优势在于，您无需额外请求即可获取结果，所有内容都会直接存储到您的存储桶中。</p>
<p>目前，我们只支持 Amazon S3。如果您想使用其他类型的存储，请联系您的客户经理讨论时间安排。</p>
<p>要将作业结果上传到 Amazon S3 存储桶，需要设置特殊权限。为此，请转到 <code>https://s3.console.aws.amazon.com/ &gt; S3 &gt; 存储 &gt; 桶名称（如果没有，请新建） &gt; 权限 &gt; 桶策略</code></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9064" src="https://www.proxysp.com/wp-content/uploads/2021/11/oxylabs-web-scraper-api-upload-to-storage.png" alt="oxylabs web scraper api upload to storage" width="481" height="321" srcset="https://proxysp.com/wp-content/uploads/2021/11/oxylabs-web-scraper-api-upload-to-storage.png 481w, https://proxysp.com/wp-content/uploads/2021/11/oxylabs-web-scraper-api-upload-to-storage-300x200.png 300w" sizes="(max-width: 481px) 100vw, 481px" /></p>
<p>您可以在此找到水桶政策 <a class="custom_link" href="https://developers.oxylabs.io/resources/s3_bucket_policy.json" target="_blank" rel="noopener">JSON</a> 或右侧的代码示例区。不要忘记更改 <code>您的邮筒名称</code>.该策略允许我们写入您的邮筒、为您上传文件并了解邮筒的位置。</p>
<p>要使用此功能，您需要在请求中指定两个附加参数。了解更多信息 <a href="#direct">这里</a>.</p>
<p>上传路径如下 <code>YOUR_BUCKET_NAME/job_ID.json</code>.您可以在提交请求后从我们收到的回复正文中找到工作编号。在 <a class="custom_link" href="https://developers.oxylabs.io/scraper-apis/web_scraper_api/source/web-scraper-api/index.html?php#single-query" target="_blank" rel="noopener">本例</a> 工作编号为 <code>12345678900987654321</code>.</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"版本"</span><span class="p">:</span> <span class="s2">"2012-10-17"</span><span class="p">,</span>
    <span class="s2">"Id"</span><span class="p">:</span> <span class="s2">"Policy1577442634787"</span><span class="p">,</span>
    <span class="s2">"声明"</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
            <span class="s2">"希德"</span><span class="p">:</span> <span class="s2">"Stmt1577442633719"</span><span class="p">,</span>
            <span class="s2">"效果"</span><span class="p">:</span> <span class="s2">"允许"</span><span class="p">,</span>
            <span class="s2">"校长"</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">"AWS"</span><span class="p">:</span> <span class="s2">"arn:aws:iam::324311890426:user/oxylabs.s3.uploader"</span>
            <span class="p">},</span>
            <span class="s2">"行动"</span><span class="p">:</span> <span class="s2">"s3:GetBucketLocation</span><span class="p">,</span>
            <span class="s2">"资源"</span><span class="p">:</span> <span class="s2">"arn:aws:s3:::YOUR_BUCKET_NAME"</span>
        <span class="p">},</span>
        <span class="p">{</span>
            <span class="s2">"希德"</span><span class="p">:</span> <span class="s2">"Stmt1577442633719"</span><span class="p">,</span>
            <span class="s2">"效果"</span><span class="p">:</span> <span class="s2">"允许"</span><span class="p">,</span>
            <span class="s2">"校长"</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">"AWS"</span><span class="p">:</span> <span class="s2">"arn:aws:iam::324311890426:user/oxylabs.s3.uploader"</span>
            <span class="p">},</span>
            <span class="s2">"行动"</span><span class="p">:</span> <span class="p">[</span>
                <span class="s2">"s3:PutObject</span><span class="p">,</span>
                <span class="s2">"s3:PutObjectAcl"</span>
            <span class="p">],</span>
            <span class="s2">"资源"</span><span class="p">:</span> <span class="s2">"arn:aws:s3:::YOUR_BUCKET_NAME/*"</span>
        <span class="p">}</span>
    <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h3 id="realtime">实时</h3>
<p>数据提交与推拉式方法相同，但使用实时方法时，我们将在连接打开时返回内容。您向我们发送一个查询，连接保持打开，我们检索内容并将其发送给您。处理此问题的端点如下：</p>
<div class="endpoint">
<pre><strong>邮寄 https://realtime.oxylabs.io/v1/queries</strong></pre>
</div>
<p>开放连接的超时限制为 100 秒。因此，在极少数负载较重的情况下，我们可能无法确保将数据发送给您。</p>
<p>您需要在 JSON 主体中将查询参数作为数据发布。详情请参阅示例。</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://realtime.oxylabs.io/v1/queries'</span> -H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
 -d <span class="s1">'{"源"："universal"，"url"："https://stackoverflow.com/questions/tagged/python"}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">普遍性</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://realtime.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 返回的不是包含任务状态和结果 url 的响应，而是</span>
<span class="c"># JSON 响应结果。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">(</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">普遍性</span><span class="p">,</span>
    <span class="s1">查询</span> <span class="o">=&gt;</span> <span class="s1">沙发</span><span class="p">,</span>
<span class="p">);</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://realtime.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err"># URL 必须编码以转义 `&amp;` 和 `=` 字符。本示例中不需要。

https://realtime.oxylabs.io/v1/queries?source=universal&amp;url=https://stackoverflow.com/questions/tagged/python&amp;access_token=12345abcde</span></code></pre>
</div></div></div>
<p>打开连接时将返回的响应体示例：</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
  <span class="s2">"结果"</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">"内容"</span><span class="p">:</span> <span class="s2">"&lt;html
      内容
      "</span>
      <span class="s2">"创建时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:01"</span><span class="p">,</span>
      <span class="s2">"更新时间"</span><span class="p">:</span> <span class="s2">"2019-10-01 00:00:15"</span><span class="p">,</span>
      <span class="s2">"id"</span><span class="p">:</span> <span class="kc">无效</span><span class="p">,</span>
      <span class="s2">"页"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
      <span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">,</span>
      <span class="s2">"job_id"</span><span class="p">:</span> <span class="s2">"12345678900987654321"</span><span class="p">,</span>
      <span class="s2">"状态代码"</span><span class="p">:</span> <span class="mi">200</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span></code></pre>
<hr />
<h3 id="superapi">超级用户接口</h3>
<p>如果您曾经使用过普通代理进行数据搜刮，那么集成 SuperAPI 传输方法将轻而易举。您只需将我们的入口节点用作代理，使用 Web Scraper API 凭据进行授权，然后忽略证书即可。在 <code>cURL</code> 这是 <code>-k</code> 或 <code>--不安全</code>.您的数据将通过开放连接发送给您。</p>
<div class="endpoint">
<pre><strong>GET realtime.oxylabs.io:60000</strong></pre>
</div>
<p>超级用户接口只支持少量参数，因为它 <strong>仅适用于 <a class="custom_link" href="#direct">直接</a> 数据源</strong> 其中提供了完整的 URL。这些参数应作为标头发送。这是一份可接受的参数列表：</p>
<table>
<tbody>
<tr>
<td><code>X-OxySERPs-User-Agent-Type</code></td>
<td>虽然无法指明特定的 User-Agent，但您可以让我们知道您使用的浏览器和平台。支持的用户代理列表如下所示 <a class="custom_link" href="#user_agent_type">这里</a>.</td>
</tr>
</tbody>
</table>
<p>如果您在设置超级用户接口时需要帮助，请通过以下方式与我们联系 <a class="custom_link" href="mailto:support@oxylabs.io">support@oxylabs.io</a>.</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl -k <span class="se">\</span>
-x realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-User-Agent-Type: desktop_chrome"</span> <span class="se">\</span>
<span class="s2">"https://stackoverflow.com/questions/tagged/python"</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 定义代理口令。不要忘记在此处填写您的真实用户和密码。</span>
<span class="n">代理</span> <span class="o">=</span> <span class="p">{</span>
  <span class="s">http</span><span class="p">:</span> <span class="s">'http://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
  <span class="s">https</span><span class="p">:</span> <span class="s">'https://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
<span class="p">}</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">GET</span><span class="p">,</span>
    <span class="s">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">核对</span><span class="o">=</span><span class="bp">假的</span><span class="p">,</span>  <span class="c"># 或接受我们的证书。</span>
    <span class="n">代理</span><span class="o">=</span><span class="n">代理</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 将结果页打印到 stdout</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span>

<span class="c"># 将返回的 HTML 保存为 result.html 文件</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">结果.html</span><span class="p">,</span> <span class="s">'w'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">f</span><span class="o">.</span><span class="n">写道</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_PROXY</span><span class="p">,</span> <span class="s1">realtime.oxylabs.io:60000</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_proxyuserpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifypeer</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifyhost</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">超级用户接口不支持 HTTP 方法</span></code></pre>
</div></div></div>
<hr />
<h2 id="content-type">内容类型</h2>
<p>Web Scraper API 返回 <strong>原始HTML</strong>.</p>
<h3 id="download-images">下载图片</h3>
<p>可以通过 Web Scraper API 下载图像。如果通过 SuperAPI 下载，只需将输出保存到图片扩展名即可。例如</p>
<p><code>curl -k -x realtime.oxylabs.io:60000 -U user:pass1 "https://example.com/image.jpg" &gt;&gt; image.jpg</code></p>
<p>如果您使用 <a class="custom_link" href="#push-pull">推拉式</a> 或 <a class="custom_link" href="#realtime">实时</a> 方法，您需要添加 <code>content_encoding</code> 参数的值为 <code>base64</code>.收到结果后，您需要解码来自 <code>内容</code> 转换成字节并保存为图像文件。右侧有一个 Python 示例。</p>
<hr />
<h2 id="data-sources">数据来源</h2>
<p>Web Scraper API 接受 URL 以及其他参数，如 User-Agent 类型、代理位置等。请参见此方法，我们将其称为 <a class="custom_link" href="#direct">直接</a>下文将对此进行说明。</p>
<p>Web Scraper API 能够在刮擦时渲染 JavaScript。这样，您就能从网页中获取更多数据，并获得屏幕截图。</p>
<p>如果您对文件的任何部分有疑问，请致电我们 <a class="custom_link" href="mailto:support@oxylabs.io">support@oxylabs.io</a> 或联系您的客户经理。</p>
<hr />
<h3 id="direct">直接</h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-9103 alignleft" src="https://www.proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-Api-Direct-1.png" alt="Oxylabs Web Scraper Api Direct" width="427" height="21" srcset="https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-Api-Direct-1.png 427w, https://proxysp.com/wp-content/uploads/2021/11/Oxylabs-Web-Scraper-Api-Direct-1-300x15.png 300w" sizes="(max-width: 427px) 100vw, 427px" /></p>
<p>&nbsp;</p>
<p>Web Scraper API 用于检索互联网上任何 URL 的内容。 <code>职位</code>-将 JSON 格式的参数发送到以下端点，将把指定的 URL 提交到提取队列。</p>
<p><span class="test">查询参数</span></p>
<div class="su-table su-table-responsive su-table-alternate">
<table width="439">
<tbody>
<tr>
<td style="font-weight: 400;" width="159"><strong>参数</strong></td>
<td style="font-weight: 400;" width="160"><strong>说明</strong></td>
<td style="font-weight: 400;" width="120"><strong>默认值</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">消息来源</td>
<td style="font-weight: 400;" width="160">数据来源</td>
<td style="font-weight: 400;" width="120">万有</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">网址</td>
<td style="font-weight: 400;" width="160">通用网页的直接 URL（链接</td>
<td style="font-weight: 400;" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">用户代理类型</td>
<td style="font-weight: 400;" width="160">设备类型和浏览器。完整列表如下<a href="#user_agent_type"> 这里。</a></td>
<td style="font-weight: 400;" width="120">桌面</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">地理位置</td>
<td style="font-weight: 400;" width="160">用于检索数据的代理地理位置。支持位置的完整列表如下<a href="#geo_location"> 这里。</a></td>
<td style="font-weight: 400;" width="120"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">地点</td>
<td style="font-weight: 400;" width="160">正如 Accept-Language 标头所期望的那样。</td>
<td style="font-weight: 400;" width="120"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">给予</td>
<td style="font-weight: 400;" width="160">启用 JavaScript 渲染。在目标需要 JavaScript 加载内容时使用。仅适用于推拉（又称回调）方法。该参数有两个可用值：html（获取原始输出）和 png（获取 Base64 编码的截图）。</td>
<td style="font-weight: 400;" width="120"></td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">content_encoding</td>
<td style="font-weight: 400;" width="160">如果要下载图像，请添加此参数。了解更多信息<a href="#download-images"> 这里。</a></td>
<td style="font-weight: 400;" width="120">base64</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">Base64 编码的 POST 请求正文。它只有在 http_method 设置为 post 时才有用。</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">内容</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">递上自己的饼干</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">饼干</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">指明是否希望扫描程序跟踪重定向（带有目标 URL 的 3xx 响应），以获取重定向链末端 URL 的内容。</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">follow_redirects</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">传递自己的标头</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">页眉</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">如果您想通过 Universal scraper 向目标 URL 发出 POST 请求，请将其设置为 "发布"。</td>
<td style="font-weight: 400;" rowspan="2" width="120">获取</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">http_method</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">如果您想在多个请求中使用同一个代理，可以使用此参数。只需将会话设置为任意字符串，我们就会为该 ID 分配一个代理，并最多保留 10 分钟。之后，如果您使用相同的会话 ID 发出另一个请求，我们就会为该特定会话 ID 分配一个新的代理。</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">session_id</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">背景</td>
<td style="font-weight: 400;" rowspan="2" width="160">定义一个自定义 HTTP 响应代码（或其中的几个），我们应根据该代码认为刮擦成功并将内容返回给您。如果您希望我们返回 503 错误页面或在其他一些非标准情况下，这可能会很有用。</td>
<td style="font-weight: 400;" rowspan="2" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">成功状态代码</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">回调URL</td>
<td style="font-weight: 400;" width="160">URL 到您的回调端点。</td>
<td style="font-weight: 400;" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">存储类型</td>
<td style="font-weight: 400;" width="160">存储服务提供商。目前只支持亚马逊 S3：s3。完整的实现可以在 <a href="#upload-to-storage">上传到存储器 </a>页。只能通过推拉（回调）方法运行。</td>
<td style="font-weight: 400;" width="120">&#8211;</td>
</tr>
<tr>
<td style="font-weight: 400;" width="159">存储URL</td>
<td style="font-weight: 400;" width="160">您的 Amazon S3 存储桶名称。仅适用于推挽（回调）方法。</td>
<td style="font-weight: 400;" width="120">&#8211;</td>
</tr>
</tbody>
</table>
</div>
<p><code class="required">  </code> - 所需参数</p>
<p>在本例中，应用程序接口将以推拉方式检索一个通用产品页面。所有可用参数都包含在内（尽管在同一请求中并非总是必要或兼容），以便让您了解如何格式化您的请求：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
 -d <span class="s1">'{"源"："universal", "url"："https://stackoverflow.com/questions/tagged/python", "user_agent_type"："mobile", "render"："html"、
 "上下文"：{"key"："headers", "value": ["Accept-Language"："en-US", "Content-Type"："application/octet-stream", "Custom-Header"："自定义标题内容"]}，{"key"："cookies"，"value"：[{"key"："NID"，"值"："1234567890"}，{"key"："1P JAR"，"值"："0987654321"}，{"key"："follow_redirects", "value": true}, {"key"："http_method", "value"："get"}, {"key"："内容"，"值"："base64EncodedPOSTBody"}, {"key"："successful_status_codes", "value": [303, 808, 909]}]}]}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>


<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">普遍性</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://www.etsy.com/listing/399423455/big-glass-house-planter-handmade-glass?ref=hp_prn&amp;frs=1'</span><span class="p">,</span>
    <span class="s">用户代理类型</span><span class="p">:</span> <span class="s">桌面</span><span class="p">,</span>
    <span class="s">地理位置</span><span class="p">:</span> <span class="s">美国</span><span class="p">,</span>
    <span class="s">上下文</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">session_id</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">1234567890abcdef</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">标题</span><span class="p">,</span> <span class="s">价值</span><span class="p">:</span> 
            <span class="p">{</span>
             <span class="s">接受语言</span><span class="p">:</span> <span class="s">en-US</span><span class="p">,</span>
             <span class="s">内容类型</span><span class="p">:</span> <span class="s">应用程序/八字节流</span><span class="p">,</span>
             <span class="s">自定义标题</span><span class="p">:</span> <span class="s">自定义标题内容</span>
            <span class="p">}</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">饼干</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">NID</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'1234567890'</span>
           <span class="p">},</span>
           <span class="p">{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">1P_JAR</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'0987654321'</span>
           <span class="p">}</span>
         <span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">follow_redirects</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="n">真</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">成功状态代码</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">http_method</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">获取</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">内容</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">base64EncodedPOSTBody</span>
        <span class="p">}</span>
    <span class="p">],</span>
    <span class="s">回调URL</span><span class="p">:</span> <span class="s">'https://your.callback.url'</span><span class="p">,</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://data.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">普遍性</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="s1">上下文</span> <span class="o">=&gt;</span> <span class="p">[</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">session_id</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">1234567890abcdef</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">标题</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="s1">接受语言</span> <span class="o">=&gt;</span> <span class="s1">en-US</span><span class="p">,</span>
                <span class="s1">内容类型</span> <span class="o">=&gt;</span> <span class="s1">应用程序/八字节流</span><span class="p">,</span>
                <span class="s1">自定义标题</span> <span class="o">=&gt;</span> <span class="s1">自定义标题内容</span>
            <span class="p">],</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">饼干</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">NID</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'1234567890'</span><span class="p">],</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">1P_JAR</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'0987654321'</span><span class="p">]</span>
            <span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">follow_redirects</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">真实</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">成功状态代码</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">http_method</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">获取</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">内容</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">base64EncodedPOSTBody</span>
        <span class="p">]</span>
    <span class="p">]</span>
<span class="p">];</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">HTTP 方法目前不支持 Push-Pull</span></code></pre>
</div></div></div>
<p>以下是实时模式下的相同示例：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="se">\</span>
<span class="s1">'https://data.oxylabs.io/v1/queries'</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/json"</span> <span class="se">\</span>
-d <span class="s1">'{"源"："universal", "url"："https://stackoverflow.com/questions/tagged/python", "user_agent_type"："mobile", "context"：{"key"："headers", "value": ["Accept-Language"："en-US"，"Content-Type"："application/octet-stream"，"Custom-Header"："自定义标题内容"]}，{"key"："cookies"，"value"：[{"key"："NID"，"值"："1234567890"}，{"key"："1P JAR"，"值"："0987654321"}，{"key"："follow_redirects", "value": true}, {"key"："http_method", "value"："get"}, {"key"："内容"，"值"："base64EncodedPOSTBody"}, {"key"："successful_status_codes", "value": [303, 808, 909]}]}]}'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 结构有效载荷。</span>
<span class="n">载荷</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">来源</span><span class="p">:</span> <span class="s">普遍性</span><span class="p">,</span>
    <span class="s">'url'（网址</span><span class="p">:</span> <span class="s">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="s">用户代理类型</span><span class="p">:</span> <span class="s">移动</span><span class="p">,</span>
    <span class="s">地理位置</span><span class="p">:</span> <span class="s">美国</span><span class="p">,</span>
    <span class="s">上下文</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">session_id</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">1234567890abcdef</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">标题</span><span class="p">,</span> <span class="s">价值</span><span class="p">:</span> 
            <span class="p">{</span>
             <span class="s">接受语言</span><span class="p">:</span> <span class="s">en-US</span><span class="p">,</span>
             <span class="s">内容类型</span><span class="p">:</span> <span class="s">应用程序/八字节流</span><span class="p">,</span>
             <span class="s">自定义标题</span><span class="p">:</span> <span class="s">自定义标题内容</span>
            <span class="p">}</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">饼干</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">NID</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'1234567890'</span>
           <span class="p">},</span>
           <span class="p">{</span>
              <span class="s">钥匙</span><span class="p">:</span> <span class="s">1P_JAR</span><span class="p">,</span>
             <span class="s">价值</span><span class="p">:</span> <span class="s">'0987654321'</span>
           <span class="p">}</span>
         <span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">follow_redirects</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="n">真</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">成功状态代码</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">http_method</span><span class="p">,</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">获取</span>
        <span class="p">}</span>
        <span class="p">{</span>
          <span class="s">钥匙</span><span class="p">:</span> <span class="s">内容</span>
          <span class="s">价值</span><span class="p">:</span> <span class="s">base64EncodedPOSTBody</span>
        <span class="p">}</span>
    <span class="p">],</span>
<span class="p">}</span>

<span class="c"># 获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">POST</span><span class="p">,</span>
    <span class="s">'https://realtime.oxylabs.io/v1/queries'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">json</span><span class="o">=</span><span class="n">载荷</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 返回的不是包含任务状态和结果 url 的响应，而是</span>
<span class="c"># JSON 响应结果。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$params</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s1">来源</span> <span class="o">=&gt;</span> <span class="s1">普遍性</span><span class="p">,</span>
    <span class="s1">'url'（网址</span> <span class="o">=&gt;</span> <span class="s1">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="s1">上下文</span> <span class="o">=&gt;</span> <span class="p">[</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">session_id</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">1234567890abcdef</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">标题</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="s1">接受语言</span> <span class="o">=&gt;</span> <span class="s1">en-US</span><span class="p">,</span>
                <span class="s1">内容类型</span> <span class="o">=&gt;</span> <span class="s1">应用程序/八字节流</span><span class="p">,</span>
                <span class="s1">自定义标题</span> <span class="o">=&gt;</span> <span class="s1">自定义标题内容</span>
            <span class="p">],</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">饼干</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">NID</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'1234567890'</span><span class="p">],</span>
                <span class="p">[</span><span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">1P_JAR</span><span class="p">,</span> <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">'0987654321'</span><span class="p">]</span>
            <span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">follow_redirects</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">真实</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">成功状态代码</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="p">[</span><span class="mi">303</span><span class="p">,</span> <span class="mi">808</span><span class="p">,</span> <span class="mi">909</span><span class="p">]</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">http_method</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">获取</span>
        <span class="p">],</span>
        <span class="p">[</span>
            <span class="s1">钥匙</span> <span class="o">=&gt;</span> <span class="s1">内容</span><span class="p">,</span>
            <span class="s1">价值</span> <span class="o">=&gt;</span> <span class="s1">base64EncodedPOSTBody</span>
        <span class="p">]</span>
    <span class="p">]</span>
<span class="p">];</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v1/queries"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_postfields</span><span class="p">,</span> <span class="nb">json_encode</span><span class="p">(</span><span class="nv">$params</span><span class="p">));</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$headers</span> <span class="o">=</span> <span class="k">矩阵</span><span class="p">();</span>
<span class="nv">$headers</span><span class="p">[]</span> <span class="o">=</span> <span class="s2">"内容类型：应用程序/json"</span><span class="p">;</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_httpheader</span><span class="p">,</span> <span class="nv">$headers</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err"># The whole string you submit has to be URL-encoded.

https://realtime.oxylabs.io/v1/queries?source=universal&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2Ftagged%2Fpython&access_token=12345abcde</span></code></pre>
</div></div></div>
<p>并通过超级用户接口（SuperAPI）：</p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="4" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>超文本传输协定</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code><span class="c"># GET 请求可以如下所示：</span>
curl -k <span class="se">\</span>
-x http://realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="se">\</span>
<span class="s2">"https://stackoverflow.com/questions/tagged/python"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-Session-Id：1234567890abcdef"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-地理位置：印度"</span> <span class="se">\</span>
-H <span class="s2">"接受语言：en-US"</span> <span class="se">\</span>
-H <span class="s2">"内容类型：应用程序/八字节流</span> <span class="se">\</span>
-H <span class="s2">"自定义标题：自定义标题内容"</span> <span class="se">\</span>
-H <span class="s2">"Cookie：NID=1234567890; 1P_JAR=0987654321"</span> <span class="se">\</span>
-H <span class="s2">"X-Status-Code：303, 808, 909"</span>

<span class="c"># POST 请求具有相同的结构，但包含一个指定为 POST 请求的参数：</span>
curl -X POST <span class="se">\</span>
-k <span class="se">\</span>
-x http://realtime.oxylabs.io:60000 <span class="se">\</span>
-用户：pass1 <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-Session-Id：1234567890abcdef"</span> <span class="se">\</span>
-H <span class="s2">"X-OxySERPs-地理位置：印度"</span> <span class="se">\</span>
-H <span class="s2">"自定义标题：自定义标题内容"</span> <span class="se">\</span>
-H <span class="s2">"Cookie：NID=1234567890; 1P_JAR=0987654321"</span> <span class="se">\</span>
-H <span class="s2">"X-Status-Code：303, 808, 909"</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 定义代理口令。不要忘记在此处填写您的真实用户和密码。</span>
<span class="n">代理</span> <span class="o">=</span> <span class="p">{</span>
  <span class="s">http</span><span class="p">:</span> <span class="s">'http://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
  <span class="s">https</span><span class="p">:</span> <span class="s">'https://user:pass1@realtime.oxylabs.io:60000'</span><span class="p">,</span>
<span class="p">}</span>

<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="s">GET</span><span class="p">,</span>
    <span class="s">'https://stackoverflow.com/questions/tagged/python'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
    <span class="n">核对</span><span class="o">=</span><span class="bp">假的</span><span class="p">,</span>  <span class="c"># 或接受我们的证书。</span>
    <span class="n">代理</span><span class="o">=</span><span class="n">代理</span><span class="p">,</span>
<span class="p">)</span>

<span class="c"># 将结果页打印到 stdout</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span>

<span class="c"># 将返回的 HTML 保存为 result.html 文件</span>
<span class="k">与</span> <span class="nb">开</span><span class="p">(</span><span class="s">结果.html</span><span class="p">,</span> <span class="s">'w'</span><span class="p">)</span> <span class="k">作为</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">f</span><span class="o">.</span><span class="n">写道</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">文本</span><span class="p">)</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>
<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://stackoverflow.com/questions/tagged/python"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_PROXY</span><span class="p">,</span> <span class="s1">realtime.oxylabs.io:60000</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_proxyuserpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifypeer</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_ssl_verifyhost</span><span class="p">,</span> <span class="kc">错误</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;HTTP&lt;/strong&gt;">
<pre class="highlight http tab-http"><code><span class="err">超级用户接口不支持 HTTP 方法</span></code></pre>
</div></div></div>
<hr />
<h2 id="parameter-values">参数值</h2>
<h3 id="geo_location">地理位置</h3>
<p>支持的地理位置完整列表以 CSV 格式提供 <a class="custom_link" href="https://developers.oxylabs.io/resources/universal-supported-geo_location-values.csv" target="_blank" rel="noopener">这里</a>.</p>
<pre class="highlight json tab-json"><code><span class="s2">"阿拉伯联合酋长国</span><span class="p">,</span>
<span class="s2">"阿尔巴尼亚"</span><span class="p">,</span>
<span class="s2">"亚美尼亚</span><span class="p">,</span>
<span class="s2">"安哥拉"</span><span class="p">,</span>
<span class="s2">"阿根廷"</span><span class="p">,</span>
<span class="s2">"澳大利亚"</span><span class="p">,</span>
<span class="err">...</span>
<span class="s2">"乌拉圭"</span><span class="p">,</span>
<span class="s2">"乌兹别克斯坦"</span><span class="p">,</span>
<span class="s2">"委内瑞拉玻利瓦尔共和国</span><span class="p">,</span>
<span class="s2">"越南"</span><span class="p">,</span>
<span class="s2">"南非"</span><span class="p">,</span>
<span class="s2">"津巴布韦</span></code></pre>
<hr />
<h3 id="http_method">HTTP_Method</h3>
<p>通用爬虫支持两种 HTTP(S) 方法： <code>获取</code> (默认）和 <code>职位</code>.</p>
<pre class="highlight json tab-json"><code><span class="s2">"GET"</span><span class="p">,</span>
<span class="s2">"发布"</span></code></pre>
<hr />
<h3 id="render">渲染</h3>
<p>Universal Crawler 可渲染 Javascript 并返回渲染的 HTML 文档或 PNG 网页截图。</p>
<pre class="highlight json tab-json"><code><span class="s2">"html"</span><span class="p">,</span>
<span class="s2">"png"</span></code></pre>
<hr />
<h3 id="user_agent_type">User_Agent_Type</h3>
<p>下载完整列表 <code>用户代理类型</code> JSON 中的值 <a class="custom_link" href="https://developers.oxylabs.io/resources/user_agent_type.json" target="_blank" rel="noopener">这里</a>.</p>
<pre class="highlight json tab-json"><code><span class="p">[</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机桌面浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"desktop_firefox"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面火狐浏览器的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面铬色"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Chrome 浏览器的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面歌剧"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Opera 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"桌面边缘"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Edge 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"desktop_safari"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版桌面 Safari 的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"移动"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机移动浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"mobile_android"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版安卓浏览器的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"mobile_ios"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版 iPhone 浏览器的随机用户代理"。</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"平板电脑"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"随机平板电脑浏览器用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"tablet_android"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版安卓平板电脑的随机用户代理"</span>
  <span class="p">},</span>
  <span class="p">{</span>
    <span class="s2">"user_agent_type"</span><span class="p">:</span> <span class="s2">"tablet_ios"</span><span class="p">,</span>
    <span class="s2">"描述"</span><span class="p">:</span> <span class="s2">"最新版 iPad 平板电脑的随机用户代理"。</span>
  <span class="p">}</span>
<span class="p">]</span></code></pre>
<hr />
<h2 id="account-status">账户状态</h2>
<h3 id="usage-statistics">使用统计</h3>
<p>您可以通过查询以下端点找到您的使用统计数据：</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v2/stats</strong></pre>
</div>
<p>默认情况下，API 将返回所有时间的使用统计数据。添加 <code>group_by=month</code> 将返回月度统计数据，而 <code>group_by=day</code> 将返回每日数字。</p>
<p>此查询将返回所有时间的统计数据。您可以通过添加以下任一选项来查询每日和每月的使用量 <code>group_by=day</code> 或 <code>group_by=month</code></p>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="3" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v2/stats'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终端获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v2/stats'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的 JSON 响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v2/stats"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div></div></div>
<p>输出示例</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"数据"</span><span class="p">:</span> <span class="p">{</span>
        <span class="s2">"来源"</span><span class="p">:</span> <span class="p">[</span>
            <span class="p">{</span>
                <span class="s2">"实时结果计数"</span><span class="p">:</span> <span class="s2">"90"</span><span class="p">,</span>
                <span class="s2">"结果数"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span>
                <span class="s2">"标题"</span><span class="p">:</span> <span class="s2">"普遍"</span>
            <span class="p">}</span>
        <span class="p">]</span>
    <span class="p">},</span>
    <span class="s2">"元"</span><span class="p">:</span> <span class="p">{</span>
        <span class="s2">"group_by"</span><span class="p">:</span> <span class="kc">无效</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>
<hr />
<h3 id="limits">限制</h3>
<p>以下端点将提供您的每月承诺信息以及已使用的承诺额度：</p>
<div class="endpoint">
<pre><strong>GET https://data.oxylabs.io/v2/stats/limits</strong></pre>
</div>
<div class="su-tabs su-tabs-style-default su-tabs-mobile-stack" data-active="3" data-scroll-offset="0" data-anchor-in-url="no"><div class="su-tabs-nav"><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>cURL</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>Python</strong></span><span class="" data-url="" data-target="blank" tabindex="0" role="button"><strong>PHP</strong></span></div><div class="su-tabs-panes"><div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;cURL&lt;/strong&gt;">
<pre class="highlight shell tab-shell"><code>curl --user user:pass1 <span class="s1">'https://data.oxylabs.io/v2/stats/limits'</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;Python&lt;/strong&gt;">
<pre class="highlight python tab-python"><code><span class="kn">舶来品</span> <span class="nn">要求</span>
<span class="kn">从</span> <span class="nn">打印</span> <span class="kn">舶来品</span> <span class="n">打印</span>

<span class="c"># 从统计终端获取响应。</span>
<span class="n">回应</span> <span class="o">=</span> <span class="n">要求</span><span class="o">.</span><span class="n">要求</span><span class="p">(</span>
    <span class="n">方法</span><span class="o">=</span><span class="s">GET</span><span class="p">,</span>
    <span class="n">网址</span><span class="o">=</span><span class="s">'https://data.oxylabs.io/v2/stats/limits'</span><span class="p">,</span>
    <span class="n">授权</span><span class="o">=</span><span class="p">(</span><span class="s">用户</span><span class="p">,</span> <span class="s">pass1</span><span class="p">),</span>
<span class="p">)</span>

<span class="c"># 向 stdout 打印经过修饰的 JSON 响应。</span>
<span class="n">打印</span><span class="p">(</span><span class="n">回应</span><span class="o">.</span><span class="n">json</span><span class="p">())</span></code></pre>
</div>
<div class="su-tabs-pane su-u-clearfix su-u-trim" data-title="&lt;strong&gt;PHP&lt;/strong&gt;">
<pre class="highlight php tab-php"><code><span class="cp">&lt;?php</span>

<span class="nv">$ch</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>

<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s2">"https://data.oxylabs.io/v2/stats/limits"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_returntransfer</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_customrequest</span><span class="p">,</span> <span class="s2">"GET"</span><span class="p">);</span>
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$ch</span><span class="p">,</span> <span class="nx">curlopt_userpwd</span><span class="p">,</span> <span class="s2">"用户"</span> <span class="o">.</span> <span class="s2">":"</span> <span class="o">.</span> <span class="s2">"pass1"</span><span class="p">);</span>

<span class="nv">$result</span> <span class="o">=</span> <span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="k">回响</span> <span class="nv">$result</span><span class="p">;</span>

<span class="k">如果</span> <span class="p">(</span><span class="nb">curl_errno</span><span class="p">(</span><span class="nv">$ch</span><span class="p">))</span> <span class="p">{</span>
    <span class="k">回响</span> <span class="s1">错误：</span> <span class="o">.</span> <span class="nb">curl_error</span><span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="p">}</span>
<span class="nb">curl_close</span> <span class="p">(</span><span class="nv">$ch</span><span class="p">);</span>
<span class="cp">?&gt;</span></code></pre>
</div></div></div>
<p>输出示例</p>
<pre class="highlight json tab-json"><code><span class="p">{</span>
    <span class="s2">"每月要求承诺"</span><span class="p">:</span> <span class="mi">4500000</span><span class="p">,</span>
    <span class="s2">"已用请求"</span><span class="p">:</span> <span class="mi">985000</span>
<span class="p">}</span></code></pre>
<hr />
<h2 id="response-codes">响应代码</h2>
<div class="su-table su-table-responsive su-table-alternate">
<table>
<thead>
<tr>
<th>代码</th>
<th>现状</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>204</code></td>
<td>无内容</td>
<td>您正在尝试检索一项尚未完成的任务。</td>
</tr>
<tr>
<td><code>400</code></td>
<td>多种错误信息</td>
<td>请求结构错误，可能是参数拼写错误或值无效。响应体将显示更具体的错误信息。</td>
</tr>
<tr>
<td><code>401</code></td>
<td>未提供授权标头"/"授权标头无效"/"未找到客户端</td>
<td>缺少授权标头或登录凭证不正确。</td>
</tr>
<tr>
<td><code>403</code></td>
<td>禁止</td>
<td>您的帐户无法访问此资源。</td>
</tr>
<tr>
<td><code>404</code></td>
<td>未找到</td>
<td>您要查找的职位编号已不再可用。</td>
</tr>
<tr>
<td><code>429</code></td>
<td>请求太多</td>
<td>超出费率限制。请联系您的客户经理以提高限额。</td>
</tr>
<tr>
<td><code>500</code></td>
<td>未知错误</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>524</code></td>
<td>超时</td>
<td>无法提供服务。</td>
</tr>
<tr>
<td><code>612</code></td>
<td>未定义的内部错误</td>
<td>出了点问题，我们未能完成您提交的任务。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
<tr>
<td><code>613</code></td>
<td>重试次数过多后出现故障</td>
<td>我们曾尝试清除您提交的作业，但在达到重试限制后放弃了。您可以免费再试一次，因为我们不会向您收取任何费用。 <code>有问题</code> 工作。如果无效，请与我们联系。</td>
</tr>
</tbody>
</table>
</div>
<hr />
<h4>参考资料</h4>
<ul>
<li style="list-style-type: none;">
<ul>
<li><a href="https://developers.oxylabs.io/scraper-apis/web_scraper_api/source/web-scraper-api/index.html#quick-start" target="_blank" rel="nofollow noopener">https://developers.oxylabs.io/scraper-apis/web_scraper_api/source/web-scraper-api/index.html#quick-start </a></li>
<li><a href="https://developers.oxylabs.io/scraper-apis/" target="_blank" rel="nofollow noopener">https://developers.oxylabs.io/scraper-apis/ </a></li>
</ul>
</li>
</ul>
<hr />
<blockquote><p><strong>免责声明</strong> 这部分内容主要来自商家。如果商家不希望在我的网站上显示，请 <a href="https://www.proxysp.com/contact-us/">联系我们</a> 删除您的内容。</p></blockquote>]]></content:encoded>
					
					<wfw:commentrss>https://proxysp.com/zh/oxylabs-web-scraper-api/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9062</post-id>	</item>
	</channel>
</rss>