小小API是一个稳定 快速 的 API 接口服务   点击加入QQ群

今日油价查询

GEThttps://v2.xxapi.cn/api/oilPrice

接口描述

免费API提供全国各省油价查询服务,实时返回各省和主要城市的油价信息,适用于油价监控、出行规划和能源管理。

请求参数

暂无数据

请求示例

var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://v2.xxapi.cn/api/oilPrice'
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

返回示例

{
	"code": 200,
	"msg": "数据请求成功",
	"data": {
		"data": [{
				"changeLog": null,
				"command": null,
				"createdAt": null,
				"creator": null,
				"currentPage": 1,
				"date": "2024-09-21",
				"fields": null,
				"id": 11471,
				"ids": null,
				"modifier": null,
				"n0": 6.95,
				"n0Change": -0.3,
				"n89": 6.88,
				"n89Change": -0.27,
				"n92": 7.33,
				"n92Change": -0.29,
				"n95": 7.85,
				"n95Change": -0.32,
				"n98": 8.56,
				"n98Change": -0.34,
				"new": false,
				"orderBy": null,
				"pageSize": 30,
				"pageStart": 0,
				"queryBeginTime": null,
				"queryEndTime": null,
				"queryKeyword": null,
				"regionId": 441,
				"regionName": "青海省",
				"strids": null,
				"time": 1727145521000,
				"updatedAt": null,
				"version": null
			},
			{
				"changeLog": null,
				"command": null,
				"createdAt": null,
				"creator": null,
				"currentPage": 1,
				"date": "2024-09-21",
				"fields": null,
				"id": 11473,
				"ids": null,
				"modifier": null,
				"n0": 7.57,
				"n0Change": -0.29,
				"n89": 7.79,
				"n89Change": -0.27,
				"n92": 8.25,
				"n92Change": -0.29,
				"n95": 8.73,
				"n95Change": -0.3,
				"n98": 9.73,
				"n98Change": -0.34,
				"new": false,
				"orderBy": null,
				"pageSize": 30,
				"pageStart": 0,
				"queryBeginTime": null,
				"queryEndTime": null,
				"queryKeyword": null,
				"regionId": 405,
				"regionName": "西藏",
				"strids": null,
				"time": 1727145521000,
				"updatedAt": null,
				"version": null
			}
		]
	}
}