Search companies by industry, size, location or tech
thecompaniesapi.companies.searchSearch companies by industry, size, location, technology or any other attribute filter
- 价格
- $0.0019/result按供应商原价
- 成功率
- 99.7%近 30 天 · 3,566 次
- 延迟 p50
- 428 毫秒p95 1.1 秒
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/thecompaniesapi.companies.search?size=2&query=%5B%7B%22attribute%22%3A+%22about.industries%22%2C+%22operator%22%3A+%22or%22%2C+%22sign%22%3A+%22equals%22%2C+%22values%22%3A+%5B%22fintech%22%5D%7D%5D预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
POST /companies takes the identical fields as a JSON body, which is easier when the condition array is long. `searchFields` accepts about.name and domain.domain. Always set an explicit small `size` — the default of 10 bills for 10 companies. GET /companies/count returns just the match count and is widely treated as free, though that is not published
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
page | 整数 | 可选 | 1-based page number, default 1 | |
size | 整数 | 可选 | results per page, 1-100, default 10 — THIS IS THE PRICE DIAL: 1 credit per company returned | 1 |
query | 字符串 | 必填 | a stringified, URL-encoded ARRAY of conditions, each {attribute, operator: 'and'|'or', sign: 'equals'|…, values: [...]} | [{"attribute":"about.industries","operator":"or","sign":"equals","values":["software"]}] |
search | 字符串 | 可选 | extra free-text match on company name or domain | |
sortKey | 字符串 | 可选 | field to sort by, e.g. meta.score, about.name | |
actionId | 整数 | 可选 | scope the search to a saved action | |
sortOrder | 字符串 | 可选 | asc | desc | |
simplified | 布尔 | 可选 | reduced records for ZERO credits — always preview a new query this way before paying for it | true |
sortFields | array[object] | 可选 | multiple sort criteria, stringified and URL-encoded | |
searchFields | array[string] | 可选 | which fields `search` applies to, e.g. domain, name | |
domainsToExclude | 字符串 | 可选 | comma-separated domains to drop from the results | |
linkedinToExclude | 字符串 | 可选 | comma-separated LinkedIn URLs to drop | |
- 查询参数
page整数可选1-based page number, default 1
size整数可选results per page, 1-100, default 10 — THIS IS THE PRICE DIAL: 1 credit per company returned
示例:
1query字符串必填a stringified, URL-encoded ARRAY of conditions, each {attribute, operator: 'and'|'or', sign: 'equals'|…, values: [...]}
示例:
[{"attribute":"about.industries","operator":"or","sign":"equals","values":["software"]}]search字符串可选extra free-text match on company name or domain
sortKey字符串可选field to sort by, e.g. meta.score, about.name
actionId整数可选scope the search to a saved action
sortOrder字符串可选asc | desc
simplified布尔可选reduced records for ZERO credits — always preview a new query this way before paying for it
示例:
truesortFieldsarray[object]可选multiple sort criteria, stringified and URL-encoded
searchFieldsarray[string]可选which fields `search` applies to, e.g. domain, name
domainsToExclude字符串可选comma-separated domains to drop from the results
linkedinToExclude字符串可选comma-separated LinkedIn URLs to drop
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/thecompaniesapi.companies.search?size=2&query=%5B%7B%22attribute%22%3A+%22about.industries%22%2C+%22operator%22%3A+%22or%22%2C+%22sign%22%3A+%22equals%22%2C+%22values%22%3A+%5B%22fintech%22%5D%7D%5D' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/thecompaniesapi.companies.search?size=2&query=%5B%7B%22attribute%22%3A+%22about.industries%22%2C+%22operator%22%3A+%22or%22%2C+%22sign%22%3A+%22equals%22%2C+%22values%22%3A+%5B%22fintech%22%5D%7D%5D",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/thecompaniesapi.companies.search?size=2&query=%5B%7B%22attribute%22%3A+%22about.industries%22%2C+%22operator%22%3A+%22or%22%2C+%22sign%22%3A+%22equals%22%2C+%22values%22%3A+%5B%22fintech%22%5D%7D%5D", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.0019/result 计费,已含服务费。