呼叫價格
5 匠幣/次
快速接入
保持統一返回結構,直接透過服務端發起請求即可接入。
https://openapi.toolkk.com/v1/bankcard-infocURL 示例
curl --request POST \
--url 'https://openapi.toolkk.com/v1/bankcard-info' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "bankcard": "6228480402564890018"\n}'Python 示例
import os
import requests
url = "https://openapi.toolkk.com/v1/bankcard-info"
payload = {
"bankcard": "6228480402564890018"
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.request("POST", url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.json())Go 示例
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/bankcard-info"
payload := []byte("{\n \"bankcard\": \"6228480402564890018\"\n}")
req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}Java 示例
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ToolkkExample {
public static void main(String[] args) throws Exception {
String payload = "{\n \"bankcard\": \"6228480402564890018\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/bankcard-info"))
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}PHP 示例
<?php
$endpoint = 'https://openapi.toolkk.com/v1/bankcard-info';
$payload = "{\n \"bankcard\": \"6228480402564890018\"\n}";
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;響應示例
{
"code": "SUCCESS",
"message": "success",
"data": {
"bank": "中国农业银行",
"cardType": "借记卡",
"cardName": "金穗通宝卡"
}
}範例用於理解回傳結構,實際結果以介面回傳為準。
- 鑑權方式
- 請求頭傳入 X-API-Key
- 預設限流
- 600 次/分鐘
- 超時時間
- 5000 ms
服務端呼叫時,將 API Key 放在 X-API-Key 請求頭中。
建議按 response code 與業務欄位雙重判斷呼叫結果。
高頻呼叫場景請結合速率限制與重試策略使用。
請求欄位
從伺服器發起請求,並在 X-API-Key 標頭中傳入金鑰。
請求欄位
以下欄位根據示例 JSON 自動提取,僅作接入參考。
| 欄位路徑 | 型別 | 必填 | 說明 | 示例值 |
|---|---|---|---|---|
| bankcard | string | 未標註 | 未標註 | 6228480402564890018 |
請求示例
{
"bankcard": "6228480402564890018"
}- 鑑權方式
- 請求頭傳入 X-API-Key
- 預設限流
- 600 次/分鐘
- 超時時間
- 5000 ms
響應欄位
範例用於理解回傳結構,實際結果以介面回傳為準。
響應欄位
以下欄位根據示例 JSON 自動提取,僅作接入參考。
| 欄位路徑 | 型別 | 必填 | 說明 | 示例值 |
|---|---|---|---|---|
| code | string | 未標註 | 未標註 | SUCCESS |
| message | string | 未標註 | 未標註 | success |
| data | object | 未標註 | 未標註 | {...} |
| data.bank | string | 未標註 | 未標註 | 中国农业银行 |
| data.cardType | string | 未標註 | 未標註 | 借记卡 |
| data.cardName | string | 未標註 | 未標註 | 金穗通宝卡 |
響應示例
{
"code": "SUCCESS",
"message": "success",
"data": {
"bank": "中国农业银行",
"cardType": "借记卡",
"cardName": "金穗通宝卡"
}
}$.code == 200 介面簡介
介面功能、應用情境、使用限制與常見問題。
功能介紹: 本API提供便捷的銀行卡歸屬地查詢服務。用戶只需輸入銀行卡號,即可快速獲取該卡所屬銀行名稱、卡片類型(如借記卡、信用卡)以及發卡行所在地等詳細資訊。介面支援國內主要銀行的借記卡和信用卡識別,數據準確性高,響應速度快,是金融、支付、風控等場景的理想選擇。
應用場景:
- 金融風控:在支付、轉帳等業務中,驗證銀行卡資訊的真實性和一致性,有效降低交易風險。
- 用戶體驗優化:在用戶輸入銀行卡號時自動填寫銀行名稱,減少用戶手動輸入,提升操作便捷性。
- 行銷推廣:根據用戶銀行卡歸屬地進行區域性精準行銷活動,提高轉換率。
- 數據分析:輔助進行用戶畫像分析和區域金融數據統計,為決策提供支援。