# 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 の SDK または API 経由で Tomba を呼び出すための Orthogonal API キー。
- または、呼び出しごとに支払う場合は、x402 で使用する、Base 上の USDC を保有するウォレット。

セットアップ、請求、サポートに関する質問は 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 は、Orthogonal API キーなしで、x402 経由の Base 上の USDC による呼び出しごとの支払いも受け付けます。`https://x402.orthogonal.com/tomba` の後に Tomba のパスを付けた URL に、`x402-fetch`（`npm install x402-fetch viem`）などの x402 クライアントでリクエストを送信します。

```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)を参照してください。
