全国实时油价查询-API接口
正常 需密钥调用免费
接口信息
总调用次数: 22
所属分类: 查询
请求方式: GET
响应格式: JSON
添加时间: 2026-05-24
更新时间: 2026-06-16
接口描述: 查询全国各省份的实时油价
请求信息
请求地址
https://api.key5.site/API/youjia/index.php
示例地址
https://api.key5.site/API/youjia/index.php?region=92
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
region |
string | 否 | 92油价查询 示例:?region=92 |
region |
string | 否 | 95油价查询 示例:?region=95 |
region |
string | 否 | 98油价查询 示例:?region=98 |
region |
string | 否 | 柴油价格查询 示例:?region=chaiyou |
返回示例
{
"code": 200,
"msg": "今日92号汽油最新价格[获取成功]",
"update_time": "2026-05-24",
"title": "今日92号汽油最新价格",
"tiaojia": "今日92号汽油是2026年5月21日24时,下调92汽油75元/吨(0.05元/升-0.07元/升)后的价格,新一次92汽油价格调整将在2026年6月4日24时进行。现在全国92汽油多少钱一升,请看下方92号汽油价格列表",
"next_change_date": "",
"type": "92号汽油价格(元/升)",
"data": {
"北京": 8.78,
"上海": 8.74,
"江苏": 8.74,
"天津": 8.77,
"重庆": 8.83,
"江西": 8.73,
"辽宁": 8.85,
"安徽": 8.71,
"内蒙古": 8.78,
"福建": 8.73,
"宁夏": 8.67,
"甘肃": 8.78,
"青海": 8.73,
"广东": 8.79,
"山东": 8.74,
"广西": 8.83,
"山西": 8.71,
"贵州": 8.91,
"陕西": 8.65,
"海南": 9.89,
"四川": 8.87,
"河北": 8.77,
"西藏": 9.64,
"河南": 8.79,
"新疆": 8.58,
"黑龙江": 8.74,
"吉林": 8.74,
"云南": 8.92,
"湖北": 8.79,
"浙江": 8.74,
"湖南": 8.72
},
"tips": "",
"remarks": "备注:云南、陕西、四川、辽宁、新疆、青海、西藏,贵州、内蒙古、黑龙江油价没有实现统一价格",
"warning": "声明:此汽油柴油价格表仅供参考,数据来源于各地网友提供的中石油或中石化加油站最新价格. 本API接口对使用该油价数据导致的结果概不承担任何责任"
}
状态码说明
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。 |
| 404 | 请求的资源未找到。请检查您的请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
调用示例
<?php
$url = 'https://api.key5.site/API/youjia/index.php';
$params = [
'region' => 'YOUR_VALUE',
'region' => 'YOUR_VALUE',
'region' => 'YOUR_VALUE',
'region' => 'YOUR_VALUE',
];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.key5.site/API/youjia/index.php"
params = {
"region": "YOUR_VALUE",
"region": "YOUR_VALUE",
"region": "YOUR_VALUE",
"region": "YOUR_VALUE",
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.key5.site/API/youjia/index.php');
const params = {
'region': 'YOUR_VALUE',
'region': 'YOUR_VALUE',
'region': 'YOUR_VALUE',
'region': 'YOUR_VALUE',
};
Object.keys(params).forEach(key => {
url.searchParams.append(key, params[key]);
});
fetch(url)
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl "https://api.key5.site/API/youjia/index.php?region=YOUR_VALUE®ion=YOUR_VALUE®ion=YOUR_VALUE®ion=YOUR_VALUE"