Usage Cost
15 coins/call
Quick Start
Use a unified response envelope and call directly from your backend.
https://openapi.toolkk.com/v1/flight-number-querycURL Example
curl --request GET \
--url 'https://openapi.toolkk.com/v1/flight-number-query' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "STRING": "AY6863",\n "PAGE_NUM": "1"\n}'Python Example
import os
import requests
url = "https://openapi.toolkk.com/v1/flight-number-query"
payload = {
"STRING": "AY6863",
"PAGE_NUM": "1"
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.get(url, headers=headers, params=payload, timeout=30)
response.raise_for_status()
print(response.json())Go Example
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/flight-number-query"
payload := []byte("{\n \"STRING\": \"AY6863\",\n \"PAGE_NUM\": \"1\"\n}")
req, err := http.NewRequest("GET", 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 Example
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 \"STRING\": \"AY6863\",\n \"PAGE_NUM\": \"1\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/flight-number-query"))
.method("GET", 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 Example
<?php
$endpoint = 'https://openapi.toolkk.com/v1/flight-number-query';
$payload = "{\n \"STRING\": \"AY6863\",\n \"PAGE_NUM\": \"1\"\n}";
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
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;Response Example
{
"索引条件": {
"索引字符串": "AY6863"
},
"索引状态": "一切都如您的神机妙算,天下均在您的掌握之中",
"索引总数量": "2",
"索引总页数": "0",
"索引页容量": "10",
"索引页序号": "1",
"索引实体信息": [
{
"数据编码": "0000618A49CF960D91DD25A2C4B6FC75",
"出发洲际_中文": "亚洲",
"出发洲际_英文": "AISA",
"出发国家_中文": "泰国",
"出发国家_英文": "THAILAND",
"出发城市": "普吉岛",
"出发城市缩写": "HKT",
"出发城市拼音": "PHUKET",
"抵达洲际_中文": "亚洲",
"抵达洲际_英文": "AISA",
"抵达国家_中文": "泰国",
"抵达国家_英文": "THAILAND",
"抵达城市": "曼谷",
"抵达城市缩写": "BKK",
"抵达城市拼音": "BANGKOK",
"航班号": "AY6863",
"航空公司": "芬兰航空",
"机型": "空客320",
"开始时间": "17:30",
"结束时间": "19:00",
"起飞机场": "素万那普国际机场",
"抵达机场": "普吉国际机场D",
"本周参考航班": "日,四,六,二,三,五,一",
"准点率": ""
}
]
}Examples illustrate the response structure. Actual results depend on the API response.
- Authentication
- Send X-API-Key in request headers
- Rate limit
- 60 req/min
- Timeout
- 30000 ms
Send your API Key in the X-API-Key header from your backend.
Check both HTTP status and business fields before treating a call as successful.
Use retries and backoff together with rate limits in high-frequency scenarios.
Request Fields
Send requests from your server with the key in the X-API-Key header.
Request Fields
Fields are read from the API schema. Missing descriptions and examples are marked as unspecified.
| Path | Type | Required | Description | Sample |
|---|---|---|---|---|
| STRING | string | Yes | 搜索字符串,如:AY6863 | AY6863 |
| PAGE_NUM | string | Yes | 搜索结果页码序列,如:1 | 1 |
Request Example
{
"STRING": "AY6863",
"PAGE_NUM": "1"
}- Authentication
- Send X-API-Key in request headers
- Rate limit
- 60 req/min
- Timeout
- 30000 ms
Response Fields
Examples illustrate the response structure. Actual results depend on the API response.
Response Fields
Fields are read from the API schema. Missing descriptions and examples are marked as unspecified.
| Path | Type | Required | Description | Sample |
|---|---|---|---|---|
| 索引条件 | object | No | Unspecified | Unspecified |
| 索引条件.索引字符串 | string | No | Unspecified | AY6863 |
| 索引状态 | string | No | Unspecified | 一切都如您的神机妙算,天下均在您的掌握之中 |
| 索引总数量 | string | No | Unspecified | 2 |
| 索引总页数 | string | No | Unspecified | 0 |
| 索引页容量 | string | No | Unspecified | 10 |
| 索引页序号 | string | No | Unspecified | 1 |
| 索引实体信息 | array | No | Unspecified | Unspecified |
| 索引实体信息[] | object | Unspecified | Unspecified | Unspecified |
| 索引实体信息[].数据编码 | string | No | Unspecified | 0000618A49CF960D91DD25A2C4B6FC75 |
| 索引实体信息[].出发洲际_中文 | string | No | Unspecified | 亚洲 |
| 索引实体信息[].出发洲际_英文 | string | No | Unspecified | AISA |
| 索引实体信息[].出发国家_中文 | string | No | Unspecified | 泰国 |
| 索引实体信息[].出发国家_英文 | string | No | Unspecified |
Documentation
Capabilities, use cases, and considerations.
接口说明
按航班号查询航线、航空公司、机场、计划起降时间和参考班期,支持分页。
请求方式
GET /v1/flight-number-query,通过查询字符串传参,参数名称区分大小写。
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| STRING | string | 是 | 搜索字符串,如:AY6863 |
| PAGE_NUM | string | 是 | 搜索结果页码序列,如:1 |
日期格式为 yyyyMMdd;文档示例仅展示数据结构,不代表当前航班或票价。
请求示例
```json { "STRING": "AY6863", "PAGE_NUM": "1" } ```