潮流

平台: API iOS Android

未来10天全球潮流数据,包括潮流流速和流向。

请求URL

https://api.qweather.com/v7/ocean/currents

请求参数

请求参数包括必选和可选参数,参数之间使用&进行分隔。

  • location(必选)需要查询的潮流站点,请填写潮流站点的LocationID,LocationID可通过POI搜索服务获取。例如 location=P66981
  • date(必选)选择日期,最多可选择未来10天(包含今天)的数据。日期格式为yyyyMMdd,例如 date=20200531

请求示例

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://api.qweather.com/v7/ocean/currents?location=P66981&date=20210310'

请将your_token替换为你的JWT或了解身份认证

返回数据

返回数据是JSON格式并进行了Gzip压缩

{
  "code": "200",
  "updateTime": "2021-02-16T05:02+07:00",
  "fxLink": "https://www.qweather.com",
  "currentsTable": [
    {
      "dir360": "293",
      "fxTime": "2021-03-10T02:27+07:00",
      "speedMax": "6.0"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T08:03+07:00",
      "speedMax": "60.0"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T15:33+07:00",
      "speedMax": "91.0"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T22:40+07:00",
      "speedMax": "41.0"
    }
  ],
  "currentsHourly": [
    {
      "dir360": "293",
      "fxTime": "2021-03-10T00:00+07:00",
      "speed": "22.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T01:00+07:00",
      "speed": "13.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T02:00+07:00",
      "speed": "7.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T03:00+07:00",
      "speed": "7.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T04:00+07:00",
      "speed": "15.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T05:00+07:00",
      "speed": "28.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T06:00+07:00",
      "speed": "43.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T07:00+07:00",
      "speed": "55.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T08:00+07:00",
      "speed": "60.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T09:00+07:00",
      "speed": "55.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T10:00+07:00",
      "speed": "39.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T11:00+07:00",
      "speed": "13.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T12:00+07:00",
      "speed": "19.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T13:00+07:00",
      "speed": "49.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T14:00+07:00",
      "speed": "75.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T15:00+07:00",
      "speed": "89.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T16:00+07:00",
      "speed": "90.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T17:00+07:00",
      "speed": "77.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T18:00+07:00",
      "speed": "54.000"
    },
    {
      "dir360": "113",
      "fxTime": "2021-03-10T19:00+07:00",
      "speed": "25.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T20:00+07:00",
      "speed": "3.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T21:00+07:00",
      "speed": "26.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T22:00+07:00",
      "speed": "38.000"
    },
    {
      "dir360": "293",
      "fxTime": "2021-03-10T23:00+07:00",
      "speed": "40.000"
    }
  ],
  "refer": {
    "sources": [
      "qweather.com"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code 请参考状态码
  • updateTime 当前API的最近更新时间
  • fxLink 当前数据的响应式页面,便于嵌入网站或应用
  • currentsTable.fxTime 潮流最大流速时间
  • currentsTable.speedMax 潮流最大流速,单位:厘米/秒
  • currentsTable.dir360 潮流360度方向
  • currentsHourly.fxTime 逐小时预报时间
  • currentsHourly.speed 潮流流速,单位:厘米/秒
  • currentsHourly.dir360 潮流360度方向
  • refer.sources 原始数据来源,或数据源说明,可能为空
  • refer.license 数据许可或版权声明,可能为空