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

今日油价查询

GEThttps://v2.api-m.com/api/oilPrice

接口描述

返回各省油价

请求参数

No Data
广告
广告
广告
广告

请求示例

< !--导入JQ -->
  <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>

  <script>
    $.ajax({
      url: 'https://v2.api-m.com/api/oilPrice',
      type: 'get',
      beforeSend: function () {
        //请求中执行的代码
      },
      complete: function () {
        //请求完成执行的代码
      },
      error: function () {
        //请求成功失败执行的代码
      },
      success: function (res) {
        // 状态码 200 表示请求成功
        if (res.code === 200) {
          console.log(res)
        } else {
          console.log(res)
        }
      }
    })
  </script>

返回示例

{
	"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
			}
		]
	}
}