# Orthogonal

[Orthogonal](https://orthogonal.com) 是面向 AI 代理的 API 网关。它将 Tomba 列为已验证的 API，并使用自己的 Tomba 凭据将请求转发到 20 个 Tomba 端点。此集成由 Orthogonal 构建、定价和提供支持：您使用 Orthogonal API 密钥进行认证并向 Orthogonal 付费，这些请求不会消耗您的 Tomba 积分。Orthogonal 的目录页面为 [orthogonal.com/discover/tomba](https://orthogonal.com/discover/tomba)。

## 前提条件

- Orthogonal API 密钥，用于通过 Orthogonal 的 SDK 或 API 调用 Tomba。
- 或者，如果改为按次付费：一个持有 Base 链上 USDC 的钱包，通过 x402 使用。

设置、计费和支持问题请联系 Orthogonal。

## 使用 API 密钥调用 Tomba

路径和参数与 Tomba 的相同，因此 [API 参考](/api)同样适用。使用 Orthogonal 的 Node.js SDK（`npm install @orth/sdk`）：

```javascript
import Orthogonal from "@orth/sdk";

const orthogonal = new Orthogonal({
    apiKey: process.env.ORTHOGONAL_API_KEY,
});

const result = await orthogonal.run({
    api: "tomba",
    path: "/v1/domain-search",
    query: { domain: "stripe.com" },
});
console.log(result);
```

## 端点

| 方法 | 路径                     | 参考                                                            |
| ------ | ------------------------ | -------------------------------------------------------------------- |
| `GET`  | `/v1/domain-search`      | [域名搜索](/api/finder#domain-search)                           |
| `GET`  | `/v1/email-finder`       | [邮箱查找器](/api/finder#email-finder)                             |
| `GET`  | `/v1/email-verifier`     | [邮箱验证器](/api/verifier#email-verifier)                       |
| `GET`  | `/v1/author-finder`      | [作者查找器](/api/finder#author-finder)                           |
| `GET`  | `/v1/linkedin`           | [LinkedIn 查找器](/api/finder#linkedin-finder)                       |
| `GET`  | `/v1/phone-finder`       | [电话查找器](/api/phone#phone-finder)                              |
| `GET`  | `/v1/phone-validator`    | [电话验证器](/api/phone#phone-validator)                        |
| `GET`  | `/v1/email-count`        | [邮箱计数](/api/finder#email-count)                               |
| `GET`  | `/v1/email-sources`      | [邮箱来源](/api/email#email-sources)                            |
| `GET`  | `/v1/email-format`       | [邮箱格式](/api/finder#email-format)                             |
| `GET`  | `/v1/enrich`             | [邮箱数据丰富](/api/finder#email-enrichment)                     |
| `GET`  | `/v1/people/find`        | [人员数据丰富](/api/enrichment#person-api)                      |
| `GET`  | `/v1/companies/find`     | [公司数据丰富](/api/enrichment#company-api)                    |
| `GET`  | `/v1/combined/find`      | [组合数据丰富](/api/enrichment#combined-api)                  |
| `GET`  | `/v1/technology`         | [Technology](/api/domain#technology)                                 |
| `GET`  | `/v1/location`           | [所在地](/api/finder#location)                                     |
| `GET`  | `/v1/similar`            | [相似域名](/api/domain#similar)                               |
| `GET`  | `/v1/domain-suggestions` | [域名建议](/api/domain-suggestions#get-domain-suggestions) |
| `GET`  | `/v1/domain-status`      | [域名状态](/api/domain#domain-status)                           |
| `POST` | `/v1/reveal/search`      | [公司搜索](/api/reveal#search-companies)                       |

## 使用 x402 按次付费

Orthogonal 还接受通过 x402 以 Base 链上的 USDC 按次付费，无需 Orthogonal API 密钥。使用 `x402-fetch`（`npm install x402-fetch viem`）等 x402 客户端，将请求发送到 `https://x402.orthogonal.com/tomba`，后接 Tomba 路径：

```javascript
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPayment(fetch, account);

const response = await fetchWithPayment(
    "https://x402.orthogonal.com/tomba/v1/domain-search?domain=stripe.com",
);
console.log(await response.json());
```

<Callout type="danger">
    `PRIVATE_KEY` 是持有 Base 链上 USDC 的钱包的私钥。任何拥有它的人都可以花费该钱包中的资金，因此请从密钥管理工具或环境变量中加载它，切勿写在源代码中。
</Callout>

如需不通过 Tomba 账户或网关、直接按请求向 Tomba 付费，请参阅[代理支付（MPP）](/mpp/introduction)。
