Scraper
URLのメタ情報・OGP情報を取得します。
MCPツール名: network.get_page_meta
GET /v1/scraper/meta
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| url | string | ✓ | 情報を取得するURL(http/httpsのみ) |
リクエスト例:
curl "https://api.thousand-api.com/v1/scraper/meta?url=https://example.com" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"url": "https://example.com",
"title": "Example Domain",
"description": "This domain is for use in illustrative examples.",
"favicon": "https://example.com/favicon.ico",
"ogp": {
"title": null,
"description": null,
"image": null,
"url": null,
"site_name": null,
"type": null
},
"canonical": "https://example.com/"
}ExchangeRate
リアルタイムの為替レートと金額換算を返します。
MCPツール名: network.get_exchange_rate
GET /v1/exchangerate
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| from | string | ✓ | 変換元通貨コード(例: JPY) |
| to | string | ✓ | 変換先通貨コード(例: USD) |
| amount | number | - | 換算する金額(省略時は1) |
リクエスト例:
curl "https://api.thousand-api.com/v1/exchangerate?from=JPY&to=USD&amount=1000" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"from": "JPY",
"to": "USD",
"rate": 0.0067,
"amount": 1000,
"converted": 6.7,
"timestamp": "2026-05-20T00:00:00.000Z",
"cache_ttl": 60,
"cached_at": "2026-06-27T12:00:00.000Z"
}郵便番号検索
日本の郵便番号と住所を双方向に検索します。正引き(郵便番号→住所)・逆引き(住所キーワード→郵便番号候補)の両方に対応します。日本郵便の公式データ(約12万件)を使用しているため、LLMが知らない新設・廃止された郵便番号にも対応します。
MCPツール名: network.lookup_postal_code
country パラメータは将来の海外対応のために設計されています。現在は JP(日本)のみ対応しています。
GET /v1/postal/lookup
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| code | string | - | 郵便番号(正引き)。7桁数字または XXX-XXXX 形式(例: 358-0001) |
| address | string | - | 住所キーワード(逆引き)。都道府県・市区町村・町域・カナの中間一致(例: 向陽台、入間) |
| country | string | - | 国コード(デフォルト: JP)。現在 JP のみ対応 |
| limit | integer | - | 逆引き時の最大件数(デフォルト: 10、最大: 50) |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| query | リクエスト内容(code / address / country) |
| results | 一致した郵便番号レコードの配列 |
| results[].code | 郵便番号(ハイフンなし7桁) |
| results[].code_formatted | 郵便番号(ハイフンあり) |
| results[].prefecture | 都道府県名 |
| results[].prefecture_kana | 都道府県名カナ |
| results[].city | 市区町村名 |
| results[].city_kana | 市区町村名カナ |
| results[].town | 町域名 |
| results[].town_kana | 町域名カナ |
| results[].full_address | 都道府県+市区町村+町域の結合 |
| results[].country | 国コード |
| count | 返却件数 |
| truncated | limit により件数が制限されたか(逆引き時) |
| cache_ttl | 推奨キャッシュ保持秒数(86400=24時間) |
| cached_at | データ取得時刻(ISO 8601)。再取得の要否判断に使う |
リクエスト例:
例1: 正引き(郵便番号→住所)
curl "https://api.thousand-api.com/v1/postal/lookup?code=358-0001" \
-H "x-api-key: YOUR_API_KEY"{
"query": { "code": "358-0001", "country": "JP" },
"results": [
{
"code": "3580001",
"code_formatted": "358-0001",
"prefecture": "埼玉県",
"prefecture_kana": "サイタマケン",
"city": "入間市",
"city_kana": "イルマシ",
"town": "向陽台",
"town_kana": "コウヨウダイ",
"full_address": "埼玉県入間市向陽台",
"country": "JP"
}
],
"count": 1,
"truncated": false,
"cache_ttl": 604800,
"cached_at": "2026-06-27T12:00:00.000Z"
}例2: 逆引き・市区町村(複数候補)
curl "https://api.thousand-api.com/v1/postal/lookup?address=%E5%85%A5%E9%96%93%E5%B8%82" \
-H "x-api-key: YOUR_API_KEY"{
"query": { "address": "入間市", "country": "JP" },
"results": [
{
"code": "3580001",
"code_formatted": "358-0001",
"prefecture": "埼玉県",
"city": "入間市",
"town": "向陽台",
"full_address": "埼玉県入間市向陽台",
"country": "JP"
}
],
"count": 10,
"truncated": true
}例3: 逆引き・町域(中間一致)
curl "https://api.thousand-api.com/v1/postal/lookup?address=%E5%90%91%E9%99%BD%E5%8F%B0" \
-H "x-api-key: YOUR_API_KEY"{
"query": { "address": "向陽台", "country": "JP" },
"results": [
{
"code": "3580001",
"code_formatted": "358-0001",
"prefecture": "埼玉県",
"city": "入間市",
"town": "向陽台",
"full_address": "埼玉県入間市向陽台",
"country": "JP"
}
],
"count": 1,
"truncated": false
}IPLookup
IPアドレスの地理情報(国・地域・都市・緯度経度)を取得します。
MCPツール名: network.get_ip_info
GET /v1/iplookup
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| address | string | - | 検索するIPアドレス(省略時はリクエスト元のIP) |
リクエスト例:
curl "https://api.thousand-api.com/v1/iplookup?address=8.8.8.8" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"is_valid": true,
"address": "8.8.8.8",
"country": "United States",
"country_code": "US",
"region": "California",
"city": "Mountain View",
"zip": "94043",
"lat": 37.4223,
"lon": -122.0847
}URLリダイレクト追跡
URLの最終リダイレクト先を追跡します。短縮URL・アフィリエイトURLの実体確認やリンクの安全性チェックに使えます。Scraperツールと組み合わせることで短縮URLの先のページ情報も取得できます。
MCPツール名: network.resolve_url
GET /v1/url/resolve
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| url | string | ✓ | 追跡するURL(http/httpsのみ) |
url パラメータは URL エンコードが必要です(例: https://bit.ly/xxxxx → https%3A%2F%2Fbit.ly%2Fxxxxx)。
リクエスト例:
curl "https://api.thousand-api.com/v1/url/resolve?url=https%3A%2F%2Fbit.ly%2Fxxxxx" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"original": "https://bit.ly/xxxxx",
"final": "https://example.com/product/123",
"redirects": [
"https://bit.ly/xxxxx",
"https://example.com/product/123"
],
"redirect_count": 1,
"has_redirect": true
}レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| original | リクエストしたURL |
| final | リダイレクト追跡後の最終URL |
| redirects | 通過したURLの配列(original から final まで) |
| redirect_count | リダイレクト回数(redirects.length - 1) |
| has_redirect | リダイレクトが1回以上あった場合 true |
| truncated | 最大10ホップに達した場合のみ true |
レスポンス:
http/https のみ追跡。各ホップのタイムアウトは5秒。最大10回のリダイレクトまで追跡し、超過時は truncated: true を返します。
URLヘルスチェック
URLのステータスコード・レスポンスタイム・SSL証明書情報を確認します。network.resolve_urlと組み合わせることで短縮URLの最終リダイレクト先のヘルスも確認できます。
MCPツール名: network.inspect_url
GET /v1/url/inspect
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| url | string | ✓ | 検査するURL(http/httpsのみ) |
リクエスト例:
curl "https://api.thousand-api.com/v1/url/inspect?url=https%3A%2F%2Fwww.thousand-api.com" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"url": "https://www.thousand-api.com",
"status_code": 200,
"response_time_ms": 234,
"reachable": true,
"headers": {
"content-type": "text/html",
"x-frame-options": "DENY"
},
"ssl": {
"valid": true,
"expires_at": "2027-01-01T00:00:00.000Z",
"days_remaining": 220,
"issuer": "Amazon"
}
}DNSルックアップ
ドメインのDNSレコードを取得します。A / AAAA / CNAME / MX / TXT / NS に対応。Node.js標準dns使用・外部依存なし。
MCPツール名: network.dns_lookup
GET /v1/dns/lookup
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| domain | string | ✓ | 検索するドメイン名 |
| type | string | - | A / AAAA / CNAME / MX / TXT / NS / all(デフォルト: all) |
リクエスト例:
curl "https://api.thousand-api.com/v1/dns/lookup?domain=example.com&type=all" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"domain": "example.com",
"type": "all",
"records": {
"A": ["93.184.216.34"],
"NS": ["a.iana-servers.net", "b.iana-servers.net"],
"TXT": ["v=spf1 -all"]
}
}CIDR/IPレンジ計算
IPv4 CIDR 表記からネットワークアドレス・ブロードキャストアドレス・サブネットマスク・ワイルドカードマスク・利用可能ホスト範囲・ホスト数を一括計算します。AWS VPC サブネット設計やセキュリティグループ・ファイアウォール設定で LLM がよく誤るサブネットサイズやホスト範囲を正確に返します。外部ライブラリ不要の純粋ビット演算です。
MCPツール名: network.calc_cidr
GET /v1/network/cidr/calc
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| cidr | string | 必須 | IPv4 CIDR 表記(例: 192.168.1.0/24) |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| cidr | 正規化された CIDR(ホストアドレス入力時はネットワークアドレスに補正) |
| ip_version | IP バージョン(現在は 4 のみ) |
| prefix_length | プレフィックス長(0〜32) |
| network_address | ネットワークアドレス |
| broadcast_address | ブロードキャストアドレス |
| subnet_mask | サブネットマスク |
| wildcard_mask | ワイルドカードマスク(ACL 等で使用) |
| first_host | 最初の利用可能ホスト(/31・/32 では null) |
| last_host | 最後の利用可能ホスト(/31・/32 では null) |
| total_addresses | 総アドレス数(2^(32-prefix)) |
| usable_hosts | 利用可能ホスト数(/32=1, /31=2, /30 以下=total-2) |
| is_private | RFC 1918 プライベートアドレス空間か(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) |
基本(192.168.1.0/24):
一般的なプライベートサブネット。254 ホストが利用可能です。
curl "https://api.thousand-api.com/v1/network/cidr/calc?cidr=192.168.1.0%2F24" \
-H "x-api-key: YOUR_API_KEY"{
"cidr": "192.168.1.0/24",
"ip_version": 4,
"prefix_length": 24,
"network_address": "192.168.1.0",
"broadcast_address": "192.168.1.255",
"subnet_mask": "255.255.255.0",
"wildcard_mask": "0.0.0.255",
"first_host": "192.168.1.1",
"last_host": "192.168.1.254",
"total_addresses": 256,
"usable_hosts": 254,
"is_private": true
}大規模 VPC(10.0.0.0/8):
クラス A プライベートアドレス空間。約 1,677 万アドレスを含みます。
curl "https://api.thousand-api.com/v1/network/cidr/calc?cidr=10.0.0.0%2F8" \
-H "x-api-key: YOUR_API_KEY"{
"cidr": "10.0.0.0/8",
"ip_version": 4,
"prefix_length": 8,
"network_address": "10.0.0.0",
"broadcast_address": "10.255.255.255",
"subnet_mask": "255.0.0.0",
"wildcard_mask": "0.255.255.255",
"first_host": "10.0.0.1",
"last_host": "10.255.255.254",
"total_addresses": 16777216,
"usable_hosts": 16777214,
"is_private": true
}IP範囲チェック
指定した IPv4 アドレスが、複数の CIDR レンジのいずれかに含まれるかをビット演算で判定します。LLM がサブネット境界を誤判定しやすい IP 範囲チェックを確実に行います。network.calc_cidr でレンジのネットワーク・ブロードキャスト・ホスト数を確認したうえで、本 API で特定 IP の所属を検証する連携が可能です。
MCPツール名: network.check_ip_in_range
GET /v1/network/ip/in-range
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| ip | string | 必須 | チェック対象の IPv4 アドレス(例: 192.168.1.100) |
| ranges | string | 必須 | CIDR レンジのカンマ区切りリスト(最大 100 件。例: 192.168.1.0/24,10.0.0.0/8) |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| ip | チェック対象の IPv4 アドレス |
| results | 各 CIDR に対する判定結果(range, contains)の配列 |
| any_match | いずれか 1 件以上のレンジに一致した場合 true |
| matching_ranges | contains: true となった CIDR 表記の配列 |
基本(プライベートサブネット内の IP):
192.168.1.100 が 192.168.1.0/24 に含まれ、10.0.0.0/8 には含まれない例です。
curl "https://api.thousand-api.com/v1/network/ip/in-range?ip=192.168.1.100&ranges=192.168.1.0%2F24%2C10.0.0.0%2F8" \
-H "x-api-key: YOUR_API_KEY"{
"ip": "192.168.1.100",
"results": [
{ "range": "192.168.1.0/24", "contains": true },
{ "range": "10.0.0.0/8", "contains": false }
],
"any_match": true,
"matching_ranges": ["192.168.1.0/24"]
}ドメイン形式検証
ドメイン名が RFC 1035 / RFC 1123 準拠の形式として妥当かを検証します。ラベル長・文字種・IDN/Punycode に対応し、ドメイン構造(labels / tld)を分解して返します。実際の DNS 名前解決は行いません。
MCPツール名: network.check_domain_format
POST /v1/network/check-domain-format
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| domain | string | 必須 | 検証するドメイン名(例: example.com / 例え.com)。DNS 解決は行いません |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| valid | 形式として妥当な場合 true |
| domain | 前後空白・末尾ドット除去後の入力ドメイン |
| labels | 検証に使ったラベル配列(不正時は null) |
| tld | 最後のラベル(PSL 非対応。不正時は null) |
| is_idn | 非 ASCII または xn-- ラベルを含む場合 true |
| punycode | IDN 時の ASCII/Punycode 表記(非 IDN 時は null) |
| error_reason | valid: false のときの人間可読な理由(成功時は null) |
ASCII ドメイン(正常):
一般的な ASCII ドメインの検証例です。
curl -X POST "https://api.thousand-api.com/v1/network/check-domain-format" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "thousand-api.com"}'{
"valid": true,
"domain": "thousand-api.com",
"labels": ["thousand-api", "com"],
"tld": "com",
"is_idn": false,
"punycode": null,
"error_reason": null
}日本語 IDN:
非 ASCII ドメインは Punycode に変換したうえで形式検証し、punycode / labels を返します。
curl -X POST "https://api.thousand-api.com/v1/network/check-domain-format" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "例え.com"}'{
"valid": true,
"domain": "例え.com",
"labels": ["xn--r8jz45g", "com"],
"tld": "com",
"is_idn": true,
"punycode": "xn--r8jz45g.com",
"error_reason": null
}不正な形式:
形式不正でも HTTP 200 で valid: false と error_reason を返します(空文字や極端な長さは VALIDATION_ERROR)。
curl -X POST "https://api.thousand-api.com/v1/network/check-domain-format" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "-invalid-.com"}'{
"valid": false,
"domain": "-invalid-.com",
"labels": null,
"tld": null,
"is_idn": false,
"punycode": null,
"error_reason": "ラベルの先頭または末尾にハイフンは使用できません"
}HTTP Fetch
外部 URL へ HTTP リクエストを送信し、ステータスコード・ヘッダー・ボディを返します。GET/POST/PUT/PATCH/DELETE/HEAD に対応し、カスタムヘッダーとボディを指定できます。エージェントが認証付き API を呼び出す用途に適しています。
MCPツール名: network.http_fetch
POST /v1/http/fetch
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| url | string | 必須 | リクエスト先 URL(http:// または https:// のみ) |
| method | string | 任意 | HTTP メソッド(GET / POST / PUT / PATCH / DELETE / HEAD。デフォルト GET) |
| headers | object | 任意 | 送信する HTTP ヘッダー(Host, X-Forwarded-* は除去されます) |
| body | string | 任意 | リクエストボディ(POST / PUT / PATCH 時) |
| timeout_ms | integer | 任意 | タイムアウト(ミリ秒)。デフォルト 10000、最大 30000 |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| status_code | 上流サーバーからの HTTP ステータスコード |
| headers | レスポンスヘッダー(キー・値のオブジェクト) |
| body | レスポンスボディ(テキスト、最大 1MB) |
| response_time_ms | リクエスト開始からレスポンス受信までのミリ秒 |
| truncated | body が 1MB を超えて切り詰められた場合 true |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/http/fetch" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/",
"method": "GET"
}'レスポンス例:
{
"status_code": 200,
"headers": {
"content-type": "text/html; charset=UTF-8"
},
"body": "<!doctype html>...",
"response_time_ms": 245,
"truncated": false
}