API と MCP
Hashike のリサーチを、自社のシステムや AI ツールから直接呼び出せます。すべてのアカウントで毎月少量をお試しいただけます。リサーチプランとインテリジェンスプランでは上限が引き上げられます。
設計方針
この API はリサーチのためのインターフェースであり、データベースの複製手段ではありません。全件を返すエンドポイントや一括エクスポートは提供していません。各レスポンスには、母集団・出典・抽出条件・限界が必ず含まれます。
認証
アカウント設定でキーを発行し、Authorization ヘッダーで送信してください。キーは作成時に一度だけ表示されます。キーは資格情報であり、権限そのものではありません。プランが終了すればキーも無効になります。
curl https://hashike.io/api/v1/opportunities?status=open&limit=5 \
-H "Authorization: Bearer hsk_live_..."エンドポイント
| パス | ツール | 計上 | 1回の上限 |
|---|---|---|---|
/api/v1/opportunities | search_opportunitiesFind US federal contract opportunities performed in Japan, by category, buying agency, prefecture, status (open, closed, or notice — see the status field) and optional free-text query (title or solicitation number). Returns a bounded page plus the total number matching. | レコード | 50 |
/api/v1/opportunities/{id} | get_opportunityRetrieve one opportunity notice by id, with its official English title, Japanese translation where available, dates, place of performance and source link. | レコード | 1 |
/api/v1/companies/{corporateNumber} | supplier_profileAward history for one Japanese supplier by corporate number (法人番号): exact award count and value over a rolling 60-month window, the ministries and agencies that bought from them, contract methods, recent awards, and gBizINFO company facts where cached. | レコード | 21 |
/api/v1/buyers/{ministryCode} | buyer_profileWhat one Japanese central-government ministry buys: award count, total value in JPY, distinct suppliers, contract-method mix and recent awards over a rolling 60-month window. Covers Japanese central-government ministries only (award count, JPY value, suppliers, contract methods from Procurement Portal (調達ポータル) award results). For a US federal buyer, use us_buyer_profile instead — it covers navy, army, air-force, dla and state, including a per-contracting-office slice, which is the profile for US federal contracting offices this tool does not provide. | レコード | 21 |
/api/v1/awards | find_comparable_awardsSearch Japanese central-government award results by ministry, Japanese fiscal year and procurement name. At least one filter is required; there is no unfiltered listing. | レコード | 25 |
/api/v1/markets/{market} | explain_marketSummarize a market: pass "japan-government" for Japanese central-government procurement (awards, value, suppliers, buying ministries), or a category id for US federal opportunities performed in Japan. Returns aggregates only. | 分析 | — |
/api/v1/locations/japan/{prefecture} | location_profileProcurement activity at one Japanese prefecture: tracked and open opportunities, the categories bought there and the buying organizations. Aggregates only. | 分析 | — |
/api/v1/research | research_briefThe full comparable-market analysis for a NAICS or PSC scope: populations, award-value distribution, competition, supplier and buyer concentration, demand, trend, geography and data quality. Individual comparable awards are withheld unless includeSampleAwards is set. | 分析 | 25 |
/api/v1/buyers/us/{agency} | us_buyer_profileA first-class profile of one US federal buyer's Japan-performed contracting: award count and value in USD, activity-date window, sub-agency and contracting-office breakdown, and supplier concentration — all from the same precomputed market brief the signed-in buyer pages read. Covers the Navy, Army, Air Force, DLA and the State Department (agency: navy, army, air-force, dla or state), the buyers with verified Japan-performed award volume. Pass office to narrow to one contracting office's slice. Aggregates only, no individual award records. | 分析 | — |
利用量の計上
計上の単位はリクエスト数ではなく、返却されたレコード数です。個別の元データを含まない集計レスポンスは「分析」1件として計上します。個別レコードを含む場合は、1分析に加えて、その件数をレコードとして計上します(research_brief の includeSampleAwards など)。
"usage": { "records": 0, "analyses": 1 } // an aggregate
"usage": { "records": 21, "analyses": 0 } // a profile with 20 awards
"usage": { "records": 5, "analyses": 1 } // a research brief with 5 sample awardsGET /api/v1/usage — current allowance. Never metered.
上限
- フリー: 月間上限: 月 200 レコード・4 分析。通常の上限: 5 リクエスト/分。分析の上限: 1 分析リクエスト/分
- リサーチ: 月間上限: 月 1,000 レコード・20 分析。通常の上限: 20 リクエスト/分。分析の上限: 4 分析リクエスト/分
- インテリジェンス: 月間上限: 月 4,000 レコード・80 分析。通常の上限: 60 リクエスト/分。分析の上限: 12 分析リクエスト/分
上限は、メールドメインでひもづく同一組織内で、現在 API アクセスを付与している購読行の合計です。毎月1日(UTC)にリセットされます。追加の API キーを作成しても増えません。現在 API アクセスを付与している行がないアカウントには、フリーの上限が適用されます。
料金を見る →「データがない」と「集計していない」は別です
該当するブリーフが未作成の場合、空のオブジェクトではなく status: unavailable と reason を返します。空のレスポンスは「市場が存在しない」と誤読されるためです。
{
"status": "unavailable",
"reason": "no_precomputed_brief",
"message": "No research brief has been computed for this scope...",
"scope": { "naics": "336611" },
"usage": { "records": 0, "analyses": 0 }
}レスポンスの構造
各ツールは自身の出力に対応する JSON Schema(outputSchema)を公開しています。MCP の tools/list はこれを inputSchema と並べて返し、tools/call は従来どおりのテキストに加えて structuredContent としても同じ内容を返すため、クライアントはテキストからの JSON 抽出を避けられます。result の中身はツールごとに異なりますが、status・scope・provenance・usage の形はすべてのツールで共通です。
| ツール | result のフィールド |
|---|---|
search_opportunities | matches, totalMatching |
get_opportunity | id, title, titleJa, agency, noticeType, solicitationNumber, naics, psc, postedDate, responseDeadline, placeOfPerformance, prefecture, categories, status, deadlineStated, sourceUrl, hashikeUrl, summaryJa, deadlineConflict |
supplier_profile | corporateNumber, name, awardCount, totalAwardedJpy, currency, firstAward, lastAward, ministries, contractMethods, ministryCount, recentAwards, registry, hashikeUrl |
buyer_profile | ministryCode, nameJa, nameEn, awardCount, totalJpy, currency, distinctSuppliers, firstAward, lastAward, contractMethods, recentAwards, hashikeUrl |
find_comparable_awards | awards, totalMatching, currency |
explain_market | market, awardCount, totalJpy, currency, distinctSuppliers, ministryCount, contractMethods, topBuyersByValue, hashikeUrl — or — market, name, trackedOpportunities, openOpportunities, buyers, prefectures, hashikeUrl |
location_profile | country, prefecture, prefectureJa, trackedOpportunities, openOpportunities, categories, buyers, hashikeUrl |
research_brief | scopeKind, code, populations, primaryPopulationId, awardValue, competition, supplierConcentrationByValue, buyerConcentration, demand, annualTrend, recurrence, geography, depth, evidence, quality, questions, sampleAwards, sampleAwardsWithheld, computedAt |
us_buyer_profile | agency, agencyNameEn, agencyNameJa, currency, analyzed, examined, awardValue, subAgencies, offices, supplierConcentration, office, knownOfficeCount, computedAt |
エラー
400 | invalid_params — the call did not match the tool's inputSchema |
401 | missing_credentials / invalid_key |
402 | plan_required — the plan does not include API access |
404 | unknown_endpoint / unknown_tool |
405 | method_not_allowed — the API is read-only |
429 | rate_limited / quota_exhausted |
503 | quota_unavailable — metering is down; retry |
MCP
同じツール群を Model Context Protocol でも提供しています。お使いの AI クライアントに下記のエンドポイントを設定すると、自社の資料と並べて Hashike のリサーチを参照できます。上限と利用量の計上は API と共通です。
https://hashike.io/api/mcp
Transport : JSON-RPC 2.0 over POST
Auth : Authorization: Bearer hsk_live_...
Methods : initialize · tools/list · tools/call · ping認証は OAuth に対応しています。MCP クライアントは動的クライアント登録を行い、ブラウザでの同意画面を経てアクセストークンを取得します。API キーを手作業で貼り付ける必要はなく、権限はご自身のアカウントに紐づきます。API キー(Bearer トークン)も引き続き利用できますので、OAuth に未対応のクライアントはそちらをお使いください。
Tool results arrive as JSON with their provenance attached, and each carries your remaining allowance so an agent can pace itself. A result with status: "unavailable" is not an error — it means that scope has not been computed or is outside coverage.
ウェブフック
現在開発中の機能です。有効化されるまで、アカウント設定にエンドポイント登録欄は表示されません。以下は有効化後の仕様です。
対応イベント: opportunity.created / opportunity.updated / award.created
{
"id": "opportunity:ABC123:9f2c...", // dedupe identity — key your idempotency on this
"eventId": 48213,
"type": "opportunity.updated",
"entityType": "opportunity",
"entityId": "ABC123",
"data": { "opportunityId": "ABC123", "title": "...", "responseDeadline": "2026-11-01" },
"ts": "2026-09-20T04:31:00.000Z"
}配信は少なくとも1回(at-least-once)保証です。同じイベントが複数回届くことがあるため、受信側は payload.id(重複排除キー)で冪等に処理してください。
再試行
配信に失敗すると指数バックオフで再試行します:1分・5分・30分・2時間・6時間・12時間・24時間。最大試行回数に達した配信は失敗として記録され、それ以降は再試行しません。
署名の検証
各リクエストに X-Hashike-Signature と X-Hashike-Timestamp ヘッダーが付与されます。署名鍵は、作成時に一度だけ表示されるシークレットを SHA-256 でハッシュ化した値です。そのハッシュを鍵として `<timestamp>.<raw body>` の HMAC-SHA256 を計算し、ヘッダーの値と定数時間で比較してください。タイムスタンプが現在時刻から大きく離れている場合はリプレイとして拒否してください。
const crypto = require("node:crypto");
function verify(secret, timestamp, rawBody, signatureHeader) {
const signingKey = crypto.createHash("sha256").update(secret).digest("hex");
const expected = crypto
.createHmac("sha256", signingKey)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
const a = Buffer.from(expected, "utf8");
const b = Buffer.from(signatureHeader, "utf8");
const signatureOk = a.length === b.length && crypto.timingSafeEqual(a, b);
const ageSeconds = Math.abs(Date.now() / 1000 - Number(timestamp));
return signatureOk && ageSeconds <= 300; // reject anything older than 5 minutes
}