> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/web-api/search/company.md).

# 公司搜索

了解如何使用 Oxylabs Web API 的 /search/companies 端点按关键词查找公司，并获取结构化的公司档案。

`/v1/search/companies` 是 `/v1/search` 的专用端点，适用于公司研究、潜在客户筛选和市场分析。它按关键词搜索公司，并为每个匹配结果返回结构化档案，包括：

* 行业
* 总部
* 员工人数
* 收入
* 网站流量分析
* 等

{% hint style="success" %}
**公司搜索直接返回数据，而不是指向数据的链接：** 每个结果都是完整的档案， `/v1/scrape` 请求并非必需。若要了解更多公司信息，请将其 `website_url` 传递给 `/v1/scrape`.
{% endhint %}

<table data-header-hidden><thead><tr><th width="129"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>端点</strong></td><td><code>/v1/search</code></td><td><code>/v1/search/companies</code></td></tr><tr><td><strong>返回内容</strong></td><td>排名靠前的网页：标题、摘要、URL</td><td>公司档案：公司基本信息、财务信息、网站流量</td></tr><tr><td><strong>输入</strong></td><td><code>query</code>, <code>max_results</code>, <code>location</code></td><td><code>query</code>, <code>max_results</code></td></tr><tr><td><strong>结果用法</strong></td><td>抓取结果 URL</td><td>直接使用档案字段</td></tr></tbody></table>

## 请求示例

此端点接受 JSON 请求正文，其中包含搜索 **查询词** 和 **结果数量上限**.

```bash
curl https://webapi.oxylabs.io/v1/search/companies \
  -H "Authorization: Bearer $OXYLABS_WEB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "new energy sector companies",
    "max_results": 3
  }'
```

### 请求参数

<table><thead><tr><th width="128">参数</th><th width="492">说明</th><th>类型</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>query</code></strong></mark></td><td>搜索关键词或短语（长度介于 <code>1</code> 和 <code>2,048</code> 个字符之间）。</td><td>字符串</td></tr><tr><td><code>max_results</code></td><td>要返回的公司资料数量（介于 <code>1</code> 和 <code>100</code>之间）。默认值： <code>10</code></td><td>整数</td></tr></tbody></table>

&#x20;   – 必填参数

{% hint style="warning" %}
未知或拼写错误的参数不会被忽略，而是会导致请求被拒绝并返回 HTTP `400 Bad Request` 状态码。这包括 `location`，该参数受 `/v1/search` 支持，但不受 `/v1/search/companies`.
{% endhint %}

### 请求优化

<details>

<summary><strong><code>query</code></strong></summary>

参数 `query` 既可用于发现公司，也可用于查找已知公司：

<table><thead><tr><th width="360">查找目标</th><th>查询示例</th></tr></thead><tbody><tr><td>某个行业、领域或业务类型的公司</td><td><code>new energy sector companies</code></td></tr><tr><td>按名称查找特定公司</td><td><code>Energinet</code></td></tr><tr><td>按域名查找特定公司</td><td><code>energinet.dk</code></td></tr></tbody></table>

对于公司发现，关键词式查询的效果优于句子式查询：

| 不要使用                | 请使用                           |
| ------------------- | ----------------------------- |
| “你能帮我找一些新能源领域的公司吗？” | `new energy sector companies` |

每个请求只查询一个主题。复合查询返回的结果可能与两个主题都不够匹配。

</details>

<details>

<summary><strong><code>max_results</code></strong></summary>

该参数是上限，而非目标数量。如果匹配结果较少，返回的资料也会较少。资料按相关性排序，最相关的排在最前面。

</details>

## 输出示例

{% code expandable="true" %}

```json
{
    "state": "done",
    "results": [
        {
            "name": "Energinet",
            "website_url": "https://www.energinet.dk",
            "linkedin_url": "https://www.linkedin.com/company/energinet-dk",
            "description": "NEW WINDS IN THE ENERGYSECTOR\nThe energy sector is undergoing a large-scale transformation because of national and international agreements to convert to climate-neutral societies. We need a change. Energinet wants to contribute to the...",
            "industry": "Utilities",
            "type": "government agency",
            "founded_year": 2005,
            "employees_count": 2919,
            "headquarters": {
                "address": "Fredericia, Denmark",
                "city": "Fredericia",
                "state": null,
                "country": "Denmark"
            },
            "funding": null,
            "revenue_annual_usd": 8595737.0,
            "web_traffic": {
                "visits_monthly": 90140.0,
                "avg_visit_duration_seconds": 31,
                "global_rank": 496219,
                "country_rank": 4506,
                "history": [
                    {
                        "month": "2026-05",
                        "value": 127917.0
                    },
                    {
                        "month": "2026-06",
                        "value": 91414.0
                    },
                    {
                        "month": "2026-07",
                        "value": 86946.0
                    },
                    {
                        "month": "2026-08",
                        "value": 86946.0
                    }
                ]
            }
        },
        ...
    ],
    "params": {
        "query": "new energy sector companies",
        "max_results": 3
    },
    "metadata": {
        "timestamp": 1794323210,
        "request_id": "1794323210495749155"
    }
}
```

{% endcode %}

{% hint style="warning" %}
**配置文件字段可能为 `null`.** 诸如 `founded_year`, `revenue_annual_usd`、 `headquarters.state` 等字段在数据不可用时会返回 `null` 。 `funding` 在公司没有记录的融资轮次时为 `null` ，其中的每个字段也可能为 `null` 。使用字段前请检查 `null` 。
{% endhint %}

### 输出字典

<table><thead><tr><th width="319">字段</th><th width="355">说明</th><th width="89">类型</th></tr></thead><tbody><tr><td><code>state</code></td><td><code>"done"</code> 表示成功。失败请求请参阅错误代码。</td><td>字符串</td></tr><tr><td><code>results</code></td><td>与查询匹配的公司资料。该字段始终存在，因此输出为空表示没有匹配项。</td><td>数组</td></tr><tr><td><code>name</code></td><td>公司名称。</td><td>字符串</td></tr><tr><td><code>website_url</code></td><td>公司的官方网站 URL。将其传递给 <code>/v1/scrape</code> 以读取网站内容。</td><td>字符串</td></tr><tr><td><code>linkedin_url</code></td><td>公司 LinkedIn 个人资料页面的 URL。</td><td>字符串</td></tr><tr><td><code>description</code></td><td>完整的公司概况和业务描述。</td><td>字符串</td></tr><tr><td><code>industry</code></td><td>公司的行业分类。</td><td>字符串</td></tr><tr><td><code>type</code></td><td>组织类型（例如， <code>"privately held"</code>, <code>"government agency"</code>).</td><td>字符串</td></tr><tr><td><code>founded_year</code></td><td>公司成立年份。 <code>null</code> （如果不可用）。</td><td>整数</td></tr><tr><td><code>employees_count</code></td><td>估算的员工总数。</td><td>整数</td></tr><tr><td><code>headquarters</code></td><td>公司总部所在地的详细信息。</td><td>对象</td></tr><tr><td><code>headquarters.address</code></td><td>格式化后的地址字符串。</td><td>字符串</td></tr><tr><td><code>headquarters.city</code></td><td>总部所在的城市。</td><td>字符串</td></tr><tr><td><code>headquarters.state</code></td><td>州、省或地区。 <code>null</code> （如果不适用）。</td><td>字符串</td></tr><tr><td><code>headquarters.country</code></td><td>国家名称。</td><td>字符串</td></tr><tr><td><code>funding</code></td><td>已募集资金。 <code>null</code> （如果公司没有已记录的融资轮次）。</td><td>对象</td></tr><tr><td><code>funding.total_usd</code></td><td>以美元计的融资总额。 <code>null</code> （如果不可用）。</td><td>数字</td></tr><tr><td><code>funding.latest_round</code></td><td>最近一轮融资。 <code>null</code> （如果不可用）。</td><td>对象</td></tr><tr><td><code>funding.latest_round.type</code></td><td>融资轮次类型。 <code>null</code> （如果不可用）。</td><td>字符串</td></tr><tr><td><code>funding.latest_round.date</code></td><td>融资轮次日期。 <code>null</code> （如果不可用）。</td><td>字符串</td></tr><tr><td><code>funding.latest_round.amount_usd</code></td><td>该轮融资金额（美元）。 <code>null</code> （如果不可用）。</td><td>数字</td></tr><tr><td><code>funding.investors</code></td><td>公司投资者的名称。 <code>null</code> （如果不可用）。</td><td>字符串数组</td></tr><tr><td><code>revenue_annual_usd</code></td><td>以美元计的估算年收入。 <code>null</code> （如果不可用）。</td><td>数字</td></tr><tr><td><code>web_traffic</code></td><td>公司域名的网络分析和流量指标。</td><td>对象</td></tr><tr><td><code>web_traffic.visits_monthly</code></td><td>最近一个月网站访问总量的估算值。</td><td>数字</td></tr><tr><td><code>web_traffic.avg_visit_duration_seconds</code></td><td>平均会话时长（秒）。</td><td>整数</td></tr><tr><td><code>web_traffic.global_rank</code></td><td>网站全球流量排名。</td><td>整数</td></tr><tr><td><code>web_traffic.country_rank</code></td><td>网站在主要国家/地区的流量排名。</td><td>整数</td></tr><tr><td><code>web_traffic.history</code></td><td>网站月度访问量历史记录。</td><td>数组</td></tr><tr><td><code>web_traffic.history[].month</code></td><td>时间段，格式为 <code>YYYY-MM</code> 。</td><td>字符串</td></tr><tr><td><code>web_traffic.history[].value</code></td><td>该月份的预估网站访问量。</td><td>数字</td></tr><tr><td><code>params</code></td><td>包含默认值的执行参数。</td><td>对象</td></tr><tr><td><code>metadata.timestamp</code></td><td>以秒为单位的 Unix 时间戳。</td><td>整数</td></tr><tr><td><code>metadata.request_id</code></td><td>19 位请求标识符。 <strong>请在支持工单中提供。</strong></td><td>字符串</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/cn/web-api/search/company.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
