API Professional Service
电影票票房
电影票票房,我们致力于为用户提供专业的免费 API 数据接口服务
返回接口列表
GET
电影票票房
v1.0最后更新:
免费
调用次数:44
正常运行
响应速度:535 ms
无需API密钥
电影票票房
电影票房实时查询接口,数据来自国家电影专资办「中国电影数据信息网」官方接口。默认返回当日影片票房 TOP10,含实时大盘(今日总票房、场次、人次、平均票价)与每部影片的当日票房、场次、人次、累计票房。另支持院线 TOP10、城市 TOP10、影院 TOP10 以及近 7 日大盘,纯文本输出。缓存仅 15 秒,可传 refresh=1 强制刷新;大盘为秒级实时数据,影片榜单由源站约每 20~30 分钟重算,返回中会标明「数据时点」。调用示例:https://api.qsxfr.top/API/dyppf.php
总调用:44
今日:44
格式:text/plain; charset=utf-8
接口地址
https://api.qsxfr.top/API/dyppf.php
请求地址
https://api.qsxfr.top/API/dyppf.php
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 可选 | 榜单类型:film(默认,影片TOP10) \/ all(全部榜单) \/ chain(院线) \/ city(城市) \/ cinema(影院) \/ total(仅实时大盘) \/ week(近7日大盘) |
| refresh | string | 可选 | 传 1 强制跳过缓存取最新数据(默认缓存 15 秒,保证实时性) |
type
string榜单类型:film(默认,影片TOP10) \/ all(全部榜单) \/ chain(院线) \/ city(城市) \/ cinema(影院) \/ total(仅实时大盘) \/ week(近7日大盘)
refresh
string传 1 强制跳过缓存取最新数据(默认缓存 15 秒,保证实时性)
在线测试
返回结果
点击「发送请求」按钮,查看接口返回结果
返回码说明
| 返回码 | 说明 |
|---|---|
| 正常 | 查询成功,返回实时大盘与当日前十榜单 |
| -1 | 参数错误:type 取值不支持 |
| -3 | 数据源(国家电影专资办)接口异常或无响应 |
正常
查询成功,返回实时大盘与当日前十榜单
-1
参数错误:type 取值不支持
-3
数据源(国家电影专资办)接口异常或无响应
多语言调用示例
授权提醒:本接口及其示例代码需经本站站长授权后方可使用,支持按 域名 或 IP 授权。
未授权的域名与 IP 调用接口将无法正常获取数据。如需授权请联系 QQ:
1747470487
cURL
curl -X GET "https://api.qsxfr.top/API/dyppf.php?type=your_type&refresh=your_refresh"
Python
import requests
url = "https://api.qsxfr.top/API/dyppf.php"
params = {
'type': 'your_type',
'refresh': 'your_refresh'
}
response = requests.get(url, params=params)
print(response.text)
PHP
<?php
$url = "https://api.qsxfr.top/API/dyppf.php";
$params = [
'type' => 'your_type',
'refresh' => 'your_refresh'
];
$full_url = $url . (strpos($url, '?') === false ? '?' : '&') . http_build_query($params);
$result = file_get_contents($full_url);
echo $result;
?>
JavaScript
// 使用 fetch 发送GET请求
const url = new URL('https://api.qsxfr.top/API/dyppf.php');
url.searchParams.append('type', 'your_type');
url.searchParams.append('refresh', 'your_refresh');
fetch(url)
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error('请求失败:', err));
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ApiRequest {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.qsxfr.top/API/dyppf.php";
// 拼接请求参数
url += "?" + "type=your_type&refresh=your_refresh";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET()
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
}
}
Go
package main
import (
"fmt"
"net/http"
"net/url"
"io/ioutil"
)
func main() {
baseUrl := "https://api.qsxfr.top/API/dyppf.php"
parsedUrl, _ := url.Parse(baseUrl)
q := parsedUrl.Query()
q.Set("type", "your_type");
q.Set("refresh", "your_refresh");
parsedUrl.RawQuery = q.Encode()
resp, err := http.Get(parsedUrl.String())
if err != nil {
fmt.Println("请求失败:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
C#
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
var url = new Uri("https://api.qsxfr.top/API/dyppf.php");
var queryParams = new Dictionary<string, string>();
queryParams.Add("type", "your_type");
queryParams.Add("refresh", "your_refresh");
var uriBuilder = new UriBuilder(url);
uriBuilder.Query = new FormUrlEncodedContent(queryParams).ReadAsStringAsync().Result;
url = uriBuilder.Uri;
var response = await client.GetAsync(url);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
Shell
# 使用curl发送GET请求
curl -X GET "https://api.qsxfr.top/API/dyppf.php?type=your_type&refresh=your_refresh"
API Key 配置说明
=== API Key 使用说明 ===
1. 在本站注册账号并登录
2. 进入用户中心 → API密钥 → 申请API Key
3. 管理员审核通过后获得 apikey
4. 调用接口时在URL参数中添加 apikey 参数
示例:
https://api.qsxfr.top/API/dyppf.php&apikey=你的apikey
注意事项:
- 请勿将 apikey 泄露给他人
- 如发现 apikey 泄露,请及时在用户中心申请删除
- 每个 apikey 有调用频率限制,请合理使用
词库
# Secluded/QRspeed/ClousX6
A:$访问 https://api.qsxfr.top/API/dyppf.php?type=your_type&refresh=your_refresh$
Kotlin
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
fun main() {
val client = OkHttpClient()
val url = "https://api.qsxfr.top/API/dyppf.php"
// GET 请求拼接参数
val requestBuilder = Request.Builder().url(url + "?" + "type=your_type&refresh=your_refresh")
val request = requestBuilder.get().build()
client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw RuntimeException("请求失败: ${response.code}")
println(response.body?.string())
}
}