公共資源下載

 

城市編碼表  下載

提供2565個城市對應的城市編碼,以便調用環境云提供的各類數據接口。

天氣現象表  下載

提供天氣現象一覽表,以及對應的天氣圖標。

常見問題  更多

 
代碼示例

 
  • 語言選擇

    • C(LibCurl)
    • cURL
    • C#(RestSharp)
    • Go
    • Java

      • OK HTTP
      • Unirest
    • JavaScript

      • Jquery AJAX
      • XHR
    • NodeJS

      • Native
      • Request
      • Unirest
    • Objective-C(NSURL)
    • PHP

      • HttpRequest
      • pecl_http
      • cURL
    • Python

      • http.client(Python 3)
      • Requests
    • Ruby(NET::Http)
    • Shell

      • wget
      • Httpie
      • cURL
    • Swift(NSURL)

GET

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, 接口URL地址);

CURLcode ret = curl_easy_perform(hnd);

POST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, 接口URL地址);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, Json格式請求Body體);

CURLcode ret = curl_easy_perform(hnd);

GET

curl -X GET 接口URL地址

POST

curl -X POST -d 'Json格式請求Body體' 接口URL地址

GET

var client = new RestClient(接口URL地址);
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);

POST

var client = new RestClient(接口URL地址);
var request = new RestRequest(Method.POST);
request.AddParameter("undefined", Json格式請求Body體, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

GET

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := 接口URL地址

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

POST

package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := 接口URL地址

	payload := strings.NewReader(Json格式請求Body體)

	req, _ := http.NewRequest("POST", url, payload)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

GET

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url(接口URL地址)
  .get()
  .build();

Response response = client.newCall(request).execute();

POST

OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, Json格式請求Body體);
Request request = new Request.Builder()
  .url(接口URL地址)
  .post(body)
  .build();

Response response = client.newCall(request).execute();

GET

HttpResponse<String> response = Unirest.get(接口URL地址)
  .asString();

POST

HttpResponse<String> response = Unirest.post(接口URL地址)
  .body(Json格式請求Body體)
  .asString();

GET

var settings = {
  "async": true,
  "crossDomain": true,
  "url": 接口URL地址,
  "method": "GET",
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

POST

var settings = {
  "async": true,
  "crossDomain": true,
  "url": 接口URL地址,
  "method": "POST",
  "data": Json格式請求Body體
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

GET

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", 接口URL地址);

xhr.send(data);

POST

var data = Json格式請求Body體;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", 接口URL地址);

xhr.send(data);

GET

var http = require("http");

var options = {
  "method": "GET",
  "hostname": "service.envicloud.cn",
  "port": "8082",
  "path": 接口URL地址(從/v2開始),
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();

POST

var http = require("http");

var options = {
  "method": "POST",
  "hostname": "service.envicloud.cn",
  "port": "8082",
  "path": 接口URL地址(從/v2開始)
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(Json格式請求Body體);
req.end();

GET

var request = require("request");

var options = { 
  method: 'GET',
  url: 接口URL地址 
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

POST

var request = require("request");

var options = { 
  method: 'POST',
  url: 接口URL地址,
  body: Json格式請求Body體 
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

GET

var unirest = require("unirest");

var req = unirest("GET", 接口URL地址);

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

POST

var unirest = require("unirest");

var req = unirest("POST", 接口URL地址);

req.send(Json格式請求Body體);

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

GET

#import <Foundation/Foundation.h>

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@接口URL地址]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];

POST

#import <Foundation/Foundation.h>

NSData *postData = [[NSData alloc] initWithData:[@Json格式請求Body體 dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@接口URL地址]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];

GET

<?php

$request = new HttpRequest();
$request->setUrl(接口URL地址);
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

POST

<?php

$request = new HttpRequest();
$request->setUrl(接口URL地址);
$request->setMethod(HTTP_METH_POST);

$request->setBody(Json格式請求Body體);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

GET

<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl(接口URL地址);
$request->setRequestMethod('GET');

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

POST

<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append(Json格式請求Body體);

$request->setRequestUrl(接口URL地址);
$request->setRequestMethod('POST');
$request->setBody($body);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

GET

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_PORT => "8082",
  CURLOPT_URL => 接口URL地址,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

POST

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_PORT => "8082",
  CURLOPT_URL => 接口URL地址,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => Json格式請求Body體,
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

GET

import http.client

conn = http.client.HTTPConnection("service.envicloud.cn:8082")

payload = ""

headers = {
    'cache-control': "no-cache"
    }
    
conn.request("GET", 接口URL地址(從/V2開始), payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

POST

import http.client

conn = http.client.HTTPConnection("service.envicloud.cn:8082")

payload = Json格式請求Body體

headers = {
    'cache-control': "no-cache",
    }

conn.request("POST", 接口URL地址(從/V2開始), payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

GET

import requests

url = 接口URL地址

payload = ""
headers = {
    'cache-control': "no-cache"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

POST

import requests

url = 接口URL地址

payload = Json格式請求Body體
headers = {
    'cache-control': "no-cache",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

GET

require 'uri'
require 'net/http'

url = URI(接口URL地址)

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body

POST

require 'uri'
require 'net/http'

url = URI(接口URL地址)

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request.body = Json格式請求Body體

response = http.request(request)
puts response.read_body

GET

wget --quiet \
  --method GET \
  --output-document \
  - 接口URL地址

POST

wget --quiet \
  --method POST \
  --body-data Json格式請求Body體 \
  --output-document \
  - 接口URL地址

GET

http GET 接口URL地址

POST

echo Json格式請求Body體 |  \
  http POST 接口URL地址

GET

curl --request GET \
  --url 接口URL地址

POST

curl --request POST \
  --url 接口URL地址 \
  --data Json格式請求Body體

GET

import Foundation

let request = NSMutableURLRequest(url: NSURL(string: 接口URL地址)! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()

POST

import Foundation

let postData = NSData(data: Json格式請求Body體.data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: 接口URL地址)! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
 
API Version 2.0 文檔

 
基礎URL
http://service.envicloud.cn:8082
 
結果碼 含義
200 成功
201 內部錯誤
202 結果集為空
203 參數錯誤
 
天氣預報查詢

 
城市天氣預報
接口說明
根據城市編碼查詢指定城市7天天氣預報和生活指數
 
數據更新
每天9點
 
GET
/v2/weatherforecast/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
cityname String 城市名稱
forecast List 天氣預報
date String 預報日期
astro Object 天文數據
mr String 月升時間
ms String 月落時間
sr String 日出時間
ss String 日落時間
cond Object 天氣現象
cond_d String 白天天氣現象
cond_n String 夜間天氣現象
tmp Object 氣溫
max String 最高氣溫(℃)
min String 最低氣溫(℃)
hum String 相對濕度(%)
pop String 降水概率(%)
pcpn String 降水量(mm)
pres String 氣壓(hPa)
vis String 能見度(km)
uv String 紫外線級別
wind Object 風力風向數據
deg String 風向(360°)
dir String 風向
sc String 風力
spd String 風速(m/s)
suggestion Object 生活指數
air Object 空氣質量指數
comf Object 舒適度指數
cw Object 洗車指數
drs Object 穿衣指數
flu Object 感冒指數
sport Object 運動指數
trav Object 旅游指數
uv Object 紫外線指數
brf String 生活指數簡述
txt String 生活指數詳情

響應示例

{
  "citycode":"101190101",
  "rdesc":"Success",
  "forecast":
  [{
    "wind":{
      "dir":"東風",
      "deg":"74",
      "sc":"3-4",
      "spd":"11"
    },
    "hum":"94",
    "astro":{
      "mr":"19:57",
      "sr":"06:35",
      "ms":"09:07",
      "ss":"17:04"
    },
    "pcpn":"11.0",
    "uv":"2",
    "tmp":{
      "min":"14",
      "max":"16"
    },
    "pop":"100",
    "pres":"1020",
    "date":"2016-11-17",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"陰"
    },
    "vis":"2"
  },{
    "wind":{
      "dir":"西南風",
      "deg":"272",
      "sc":"3-4",
      "spd":"12"
    },
    "hum":"93",
    "astro":{
      "mr":"20:58",
      "sr":"06:36",
      "ms":"10:06",
      "ss":"17:03"
    },
    "pcpn":"8.0",
    "uv":"2",
    "tmp":{
      "min":"16",
      "max":"19"
    },
    "pop":"79",
    "pres":"1015",
    "date":"2016-11-18",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"小雨"
    },
    "vis":"10"
  },{
    "wind":{
      "dir":"北風",
      "deg":"331",
      "sc":"微風",
      "spd":"3"
    },
    "hum":"88",
    "astro":{
      "mr":"21:59",
      "sr":"06:37",
      "ms":"10:59",
      "ss":"17:03"
    },
    "pcpn":"0.1",
    "uv":"3",
    "tmp":{
      "min":"15",
      "max":"20"
    },
    "pop":"4",
    "pres":"1016",
    "date":"2016-11-19",
    "cond":{
      "cond_n":"陰",
      "cond_d":"陰"
    },
    "vis":"10"
  },{
    "wind":{
      "dir":"東北風",
      "deg":"75",
      "sc":"4-5",
      "spd":"17"
    },
    "hum":"93",
    "astro":{
      "mr":"22:59",
      "sr":"06:38",
      "ms":"11:46",
      "ss":"17:02"
    },
    "pcpn":"4.4",
    "uv":"1",
    "tmp":{
      "min":"14",
      "max":"17"
    },
    "pop":"82",
    "pres":"1020",
    "date":"2016-11-20",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"小雨"
    },
    "vis":"2"
  },{
    "wind":{
      "dir":"東風",
      "deg":"90",
      "sc":"4-5",
      "spd":"24"
    },
    "hum":"93",
    "astro":{
      "mr":"23:57",
      "sr":"06:39",
      "ms":"12:27",
      "ss":"17:02"
    },
    "pcpn":"24.2",
    "uv":"N/A",
    "tmp":{
      "min":"12",
      "max":"16"
    },
    "pop":"81",
    "pres":"1018",
    "date":"2016-11-21",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"小雨"
    },
    "vis":"2"
  },{
    "wind":{
      "dir":"北風",
      "deg":"28",
      "sc":"5-6",
      "spd":"29"
    },
    "hum":"91",
    "astro":{
      "mr":"null",
      "sr":"06:40",
      "ms":"13:05",
      "ss":"17:02"
    },
    "pcpn":"10.7",
    "uv":"N/A",
    "tmp":{
      "min":"5",
      "max":"16"
    },
    "pop":"83",
    "pres":"1025",
    "date":"2016-11-22",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"陰"
    },
    "vis":"9"
  },{
    "wind":{
      "dir":"北風",
      "deg":"27",
      "sc":"4-5",
      "spd":"24"
    },
    "hum":"86",
    "astro":{
      "mr":"00:53",
      "sr":"06:41",
      "ms":"13:40",
      "ss":"17:01"
    },
    "pcpn":"8.8",
    "uv":"N/A",
    "tmp":{
      "min":"3",
      "max":"12"
    },
    "pop":"82",
    "pres":"1032",
    "date":"2016-11-23",
    "cond":{
      "cond_n":"小雨",
      "cond_d":"小雨"
    },
    "vis":"10"
  }],
  "rcode":200,
  "suggestion":{
    "trav":{
      "brf":"適宜",
      "txt":"天氣較好,風稍大,但溫度適宜,總體來說還是好天氣。這樣的天氣適宜旅游,您可以盡情享受大自然的風光。"
    },
    "uv":{
      "brf":"最弱",
      "txt":"屬弱紫外線輻射天氣,無需特別防護。若長期在戶外,建議涂擦SPF在8-12之間的防曬護膚品。"
    },
    "flu":{
      "brf":"少發",
      "txt":"各項氣象條件適宜,無明顯降溫過程,發生感冒機率較低。"
    },
    "comf":{
      "brf":"舒適",
      "txt":"白天不太熱也不太冷,風力不大,相信您在這樣的天氣條件下,應會感到比較清爽和舒適。"
    },
    "sport":{
      "brf":"較適宜",
      "txt":"陰天,較適宜進行各種戶內外運動。"
    },
    "air":{
      "brf":"良",
      "txt":"氣象條件有利于空氣污染物稀釋、擴散和清除,可在室外正常活動。"
    },
    "cw":{
      "brf":"較適宜",
      "txt":"較適宜洗車,未來一天無雨,風力較小,擦洗一新的汽車至少能保持一天。"
    },
    "drs":{
      "brf":"較舒適",
      "txt":"建議著薄外套、開衫牛仔衫褲等服裝。年老體弱者應適當添加衣物,宜著夾克衫、薄毛衣等。"
    }
  }
  ,"cityname":"南京"
}

POST
/v2/weatherforecast

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycodes 必填 請求的城市編號列表,最多支持50個城市

請求示例

{
  "accesskey":"您的Accesskey",
  "citycodes":[
    "101190101"
  ]
}

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info List 結果信息
citycode String 城市編碼
cityname String 城市名稱
forecast List 天氣預報
date String 預報日期
astro Object 天文數據
mr String 月升時間
ms String 月落時間
sr String 日出時間
ss String 日落時間
cond Object 天氣現象
cond_d String 白天天氣現象
cond_n String 夜間天氣現象
tmp Object 氣溫
max String 最高氣溫(℃)
min String 最低氣溫(℃)
hum String 相對濕度(%)
pop String 降水概率(%)
pcpn String 降水量(mm)
pres String 氣壓(hPa)
vis String 能見度(km)
uv String 紫外線級別
wind Object 風力風向數據
deg String 風向(360°)
dir String 風向
sc String 風力
spd String 風速(m/s)
suggestion Object 生活指數
air Object 空氣質量指數
comf Object 舒適度指數
cw Object 洗車指數
drs Object 穿衣指數
flu Object 感冒指數
sport Object 運動指數
trav Object 旅游指數
uv Object 紫外線指數
brf String 生活指數簡述
txt String 生活指數詳情

響應示例

{
  "rdesc":"Success",
  "rcode":200,
  "info":
  [{
    "citycode":"101190101",
    "forecast":
    [{
      "wind":{
        "dir":"東風",
        "deg":"74",
        "sc":"3-4",
        "spd":"11"
      },
      "hum":"94",
      "astro":{
        "mr":"19:57",
        "sr":"06:35",
        "ms":"09:07",
        "ss":"17:04"
      },
      "pcpn":"11.0",
      "uv":"2",
      "tmp":{
        "min":"14",
        "max":"16"
      },
      "pop":"100",
      "pres":"1020",
      "date":"2016-11-17",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"陰"
      },
      "vis":"2"
    },{
      "wind":{
        "dir":"西南風",
        "deg":"272",
        "sc":"3-4",
        "spd":"12"
      },
      "hum":"93",
      "astro":{
        "mr":"20:58",
        "sr":"06:36",
        "ms":"10:06",
        "ss":"17:03"
      },
      "pcpn":"8.0",
      "uv":"2",
      "tmp":{
        "min":"16",
        "max":"19"
      },
      "pop":"79",
      "pres":"1015",
      "date":"2016-11-18",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"小雨"
      },
      "vis":"10"
    },{
      "wind":{
        "dir":"北風",
        "deg":"331",
        "sc":"微風",
        "spd":"3"
      },
      "hum":"88",
      "astro":{
        "mr":"21:59",
        "sr":"06:37",
        "ms":"10:59",
        "ss":"17:03"
      },
      "pcpn":"0.1",
      "uv":"3",
      "tmp":{
        "min":"15",
        "max":"20"
      },
      "pop":"4",
      "pres":"1016",
      "date":"2016-11-19",
      "cond":{
        "cond_n":"陰",
        "cond_d":"陰"
      },
      "vis":"10"
    },{
      "wind":{
        "dir":"東北風",
        "deg":"75",
        "sc":"4-5",
        "spd":"17"
      },
      "hum":"93",
      "astro":{
        "mr":"22:59",
        "sr":"06:38",
        "ms":"11:46",
        "ss":"17:02"
      },
      "pcpn":"4.4",
      "uv":"1",
      "tmp":{
        "min":"14",
        "max":"17"
      },
      "pop":"82",
      "pres":"1020",
      "date":"2016-11-20",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"小雨"
      },
      "vis":"2"
    },{
      "wind":{
        "dir":"東風",
        "deg":"90",
        "sc":"4-5",
        "spd":"24"
      },
      "hum":"93",
      "astro":{
        "mr":"23:57",
        "sr":"06:39",
        "ms":"12:27",
        "ss":"17:02"
      },
      "pcpn":"24.2",
      "uv":"N/A",
      "tmp":{
        "min":"12",
        "max":"16"
      },
      "pop":"81",
      "pres":"1018",
      "date":"2016-11-21",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"小雨"
      },
      "vis":"2"
    },{
      "wind":{
        "dir":"北風",
        "deg":"28",
        "sc":"5-6",
        "spd":"29"
      },
      "hum":"91",
      "astro":{
        "mr":"null",
        "sr":"06:40",
        "ms":"13:05",
        "ss":"17:02"
      },
      "pcpn":"10.7",
      "uv":"N/A",
      "tmp":{
        "min":"5",
        "max":"16"
      },
      "pop":"83",
      "pres":"1025",
      "date":"2016-11-22",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"陰"
      },
      "vis":"9"
    },{
      "wind":{
        "dir":"北風",
        "deg":"27",
        "sc":"4-5",
        "spd":"24"
      },
      "hum":"86",
      "astro":{
        "mr":"00:53",
        "sr":"06:41",
        "ms":"13:40",
        "ss":"17:01"
      },
      "pcpn":"8.8",
      "uv":"N/A",
      "tmp":{
        "min":"3",
        "max":"12"
      },
      "pop":"82",
      "pres":"1032",
      "date":"2016-11-23",
      "cond":{
        "cond_n":"小雨",
        "cond_d":"小雨"
      },
      "vis":"10"
    }],
    "suggestion":{
      "trav":{
        "brf":"適宜",
        "txt":"天氣較好,風稍大,但溫度適宜,總體來說還是好天氣。這樣的天氣適宜旅游,您可以盡情享受大自然的風光。"
      },
      "uv":{
        "brf":"最弱",
        "txt":"屬弱紫外線輻射天氣,無需特別防護。若長期在戶外,建議涂擦SPF在8-12之間的防曬護膚品。"
      },
      "flu":{
        "brf":"少發",
        "txt":"各項氣象條件適宜,無明顯降溫過程,發生感冒機率較低。"
      },
      "comf":{
        "brf":"舒適",
        "txt":"白天不太熱也不太冷,風力不大,相信您在這樣的天氣條件下,應會感到比較清爽和舒適。"
      },
      "sport":{
        "brf":"較適宜",
        "txt":"陰天,較適宜進行各種戶內外運動。"
      },
      "air":{
        "brf":"良",
        "txt":"氣象條件有利于空氣污染物稀釋、擴散和清除,可在室外正常活動。"
      },
      "cw":{
        "brf":"較適宜",
        "txt":"較適宜洗車,未來一天無雨,風力較小,擦洗一新的汽車至少能保持一天。"
      },
      "drs":{
        "brf":"較舒適",
        "txt":"建議著薄外套、開衫牛仔衫褲等服裝。年老體弱者應適當添加衣物,宜著夾克衫、薄毛衣等。"
      }
    }
    ,"cityname":"南京"
  }]
}
 
海區天氣預報
接口說明
查詢全國海區天氣預報
 
數據更新
每天7點
 
GET
/v2/marineforecast/{accesskey}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果計數
forecast List 預報列表
station String 站點名稱
lng String 站點經度(東經)
lat String 站點緯度(北緯)
type String 站點類型(沿海、近海、遠海)
time String 預報時間(格式:yyyy_MM_dd_HH)
vis1 String 白天能見度(km)
vis2 String 夜間能見度(km)
wdir1 String 白天風向
wdir2 String 夜間風向
wpow1 String 白天風力(級)
wpow2 String 夜間風力(級)
weather1 String 白天天氣現象
weather2 String 夜間天氣現象

響應示例

{
  "rdesc":"Success",
  "count":73,
  "forecast":
  [{
    "station":"浙江北部沿岸",
    "vis1":"12",
    "lng":"122.83",
    "vis2":"12",
    "type":"沿海",
    "wpow1":"2",
    "time":"2016_09_09_08",
    "wdir1":"東北東",
    "wpow2":"3",
    "wdir2":"東北東",
    "weather1":"多云",
    "weather2":"多云",
    "lat":"30.18"
  },
  ……,
  {
    "station":"東海北部",
    "vis1":"10",
    "lng":"125.77",
    "vis2":"10",
    "type":"近海",
    "wpow1":"2",
    "time":"2016_09_09_08",
    "wdir1":"西北風",
    "wpow2":"1",
    "wdir2":"北風",
    "weather1":"小雨",
    "weather2":"小雨",
    "lat":"30.78"
  },
  ……,
  {
    "station":"馬六甲海峽",
    "vis1":"8",
    "lng":"98.8",
    "vis2":"6",
    "type":"遠海",
    "wpow1":"2",
    "time":"2016_09_09_08",
    "wdir1":"西風",
    "wpow2":"2",
    "wdir2":"西南風",
    "weather1":"中雨",
    "weather2":"大雨",
    "lat":"5.8"
  }],
  "rcode":200
}
 
歷史天氣查詢

 
24小時歷史天氣
接口說明
查詢指定城市過去24小時的歷史天氣
 
數據更新
每小時
 
GET
/v2/weatherhistory/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
history List 歷史天氣列表
updatetime String 更新時間
phenomena String 天氣現象
temperature String 氣溫(℃)
feelst String 體感溫度(℃)
airpressure String 氣壓(hPa)
humidity String 相對濕度(%)
rain String 降雨量(mm)
winddirect String 風向
windpower String 風力
windspeed String 風速(m/s)

響應示例

{
  "history":
  [{
    "windspeed":"0.3",
    "airpressure":"1004.0",
    "phenomena":"晴",
    "humidity":"62.0",
    "updatetime":"2016-09-08 10:05",
    "windpower":"微風",
    "feelst":"24.7",
    "winddirect":"東北風",
    "rain":"0.0",
    "temperature":"24.4"
  },{
    "windspeed":"1.9",
    "airpressure":"1004.0",
    "phenomena":"晴",
    "humidity":"49.0",
    "updatetime":"2016-09-08 11:05",
    "windpower":"微風",
    "feelst":"24.5",
    "winddirect":"西北風",
    "rain":"0.0",
    "temperature":"26.5"
  },
  ……,
  {
    "windspeed":"3.1",
    "airpressure":"1005.0",
    "phenomena":"晴",
    "humidity":"36.0",
    "updatetime":"2016-09-09 09:05",
    "windpower":"微風",
    "feelst":"23.1",
    "winddirect":"西北風",
    "rain":"0.0",
    "temperature":"26.1"
  }],
  "rdesc":"Success",
  "rcode":200
}
 
指定日期歷史天氣
接口說明
查詢指定城市指定日期的歷史天氣
 
數據更新
每天
 
GET
/v2/weatherhistory/{accesskey}/{citycode}/{date}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
date 必填 請求日期(yyyyMMdd)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
date String 日期
sunny_percent Int 晴好天氣比率(%)
rain_percent Int 降水天氣比率(%)
rain_full String 總降水量(mm)
pressure_avg String 平均氣壓(hPa)
hum_avg String 平均濕度(%)
tem_max String 日最高氣溫(℃)
tem_min String 日最低氣溫(℃)
tem_avg String 日平均氣溫(℃)
wdir_most String 最常見風向
wspd_avg String 平均風速

響應示例

{
  "hum_avg":"63.67",
  "citycode":"101010100",
  "rain_percent":0,
  "tem_max":"31.0",
  "rdesc":"Success",
  "rain_full":"0.0",
  "tem_avg":"24.63",
  "tem_min":"16.8",
  "rcode":200,
  "date":"20160908",
  "wdir_most":"西南風",
  "pressure_avg":"1002.88",
  "sunny_percent":100,
  "wspd_avg":"1.56m/s"
}
 
指定小時歷史天氣
接口說明
查詢指定城市指定小時的歷史天氣
 
數據更新
每小時
 
GET
/v2/weatherhistory/{accesskey}/{citycode}/{date}/{hour}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
date 必填 請求日期(yyyyMMdd)
hour 必填 請求小時(HH)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
updatetime String 更新時間
phenomena String 天氣現象
temperature String 氣溫(℃)
feelst String 體感溫度(℃)
airpressure String 氣壓(hPa)
humidity String 相對濕度(%)
rain String 降雨量(mm)
winddirect String 風向
windpower String 風力
windspeed String 風速(m/s)

響應示例

{
  "windspeed":"1.9",
  "airpressure":"1005.0",
  "phenomena":"晴",
  "rdesc":"Success",
  "humidity":"55.0",
  "updatetime":"2016-09-09 08:05",
  "windpower":"微風",
  "feelst":"23.0",
  "winddirect":"東北風",
  "rcode":200,
  "rain":"0.0",
  "temperature":"23.1"
}
 
月度歷史天氣
接口說明
查詢指定城市指定年份12個月的月度歷史天氣
 
數據更新
每年
 
GET
/v2/monthlymete/{accesskey}/{citycode}/{year}/{type}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
year 必填 查詢年份(1996-2015)
type 可選 查詢類型(僅支持pre、avg、max和min,大小寫不敏感)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
info List 信息列表
year Int 年份
month Int 月份
pre String 降水量(mm)
tem_max String 最高氣溫(℃)
tem_min String 最低氣溫(℃)
tem_avg String 平均氣溫(℃)

響應示例

{
  "citycode":"101010100",
  "rdesc":"Success",
  "rcode":200,
  "info":
  [{
    "tem_max":"5.0",
    "pre":"0.7",
    "tem_min":"-13.0",
    "month":1,
    "year":2015,
    "tem_avg":"-3.5"
  },{
    "tem_max":"7.1",
    "pre":"8.2",
    "tem_min":"-11.8",
    "month":2,
    "year":2015,
    "tem_avg":"-1.3"
  },{
    "tem_max":"15.4",
    "pre":"1.6",
    "tem_min":"-5.6",
    "month":3,
    "year":2015,
    "tem_avg":"6.3"
  },{
    "tem_max":"22.0",
    "pre":"35.2",
    "tem_min":"2.0",
    "month":4,
    "year":2015,
    "tem_avg":"13.5"
  },{
    "tem_max":"27.5",
    "pre":"44.3",
    "tem_min":"7.6",
    "month":5,
    "year":2015,
    "tem_avg":"19.3"
  },{
    "tem_max":"30.8",
    "pre":"65.9",
    "tem_min":"12.4",
    "month":6,
    "year":2015,
    "tem_avg":"22.5"
  },{
    "tem_max":"32.1",
    "pre":"160.3",
    "tem_min":"15.3",
    "month":7,
    "year":2015,
    "tem_avg":"24.8"
  },{
    "tem_max":"31.8",
    "pre":"77.1",
    "tem_min":"14.0",
    "month":8,
    "year":2015,
    "tem_avg":"24.1"
  },{
    "tem_max":"26.3",
    "pre":"117.8",
    "tem_min":"9.4",
    "month":9,
    "year":2015,
    "tem_avg":"18.4"
  },{
    "tem_max":"20.3",
    "pre":"14.2",
    "tem_min":"2.5",
    "month":10,
    "year":2015,
    "tem_avg":"12.0"
  },{
    "tem_max":"6.9",
    "pre":"45.8",
    "tem_min":"-5.7",
    "month":11,
    "year":2015,
    "tem_avg":"1.4"
  },{
    "tem_max":"4.4",
    "pre":"2.0",
    "tem_min":"-11.1",
    "month":12,
    "year":2015,
    "tem_avg":"-2.5"
  }]
}
 
年度歷史天氣
接口說明
查詢指定城市指定時段的年度歷史天氣
 
數據更新
每年
 
GET
/v2/yearlymete/{accesskey}/{citycode}/{start_year}/{end_year}/{type}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
start_year 必填 起始年份(1996-2015)
end_year 必填 結束年份(1996-2015,不早于起始年份)
type 可選 查詢類型(僅支持jan、july和pre,大小寫不敏感

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
info List 信息列表
year Int 年份
pre_full String 年降水量(mm)
tem_jan String 一月平均氣溫(℃)
tem_july String 七月平均氣溫(℃)

響應示例

{
  "citycode":"101010100",
  "rdesc":"Success",
  "rcode":200,
  "info":
  [{
    "tem_jan":"-3.2",
    "pre_full":"456.0",
    "year":2014,
    "tem_july":"26.1"
  },{
    "tem_jan":"-3.5",
    "pre_full":"573.1",
    "year":2015,
    "tem_july":"24.8"
  }]
}
 
天氣實況查詢

 
城市天氣實況
接口說明
查詢指定城市的天氣實況
 
數據更新
每小時
 
GET
/v2/weatherlive/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
updatetime String 更新時間
phenomena String 天氣現象
temperature String 氣溫(℃)
feelst String 體感溫度(℃)
airpressure String 氣壓(hPa)
humidity String 相對濕度(%)
rain String 降雨量(mm)
winddirect String 風向
windpower String 風力
windspeed String 風速(m/s)

響應示例

{
  "windspeed":"1.9",
  "airpressure":"1005.0",
  "phenomena":"晴",
  "rdesc":"Success",
  "humidity":"55.0",
  "updatetime":"2016-09-09 08:05",
  "windpower":"微風",
  "feelst":"23.0",
  "winddirect":"東北風",
  "rcode":200,
  "rain":"0.0",
  "temperature":"23.1"
}

POST
/v2/weatherlive

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycodes 必填 請求的城市編號列表,最多支持50個城市

請求示例

{
  "accesskey":"您的Accesskey",
  "citycodes":[
    "101190101",
    "101010100"
  ]
}

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
updatetime String 更新時間
phenomena String 天氣現象
temperature String 氣溫(℃)
feelst String 體感溫度(℃)
airpressure String 氣壓(hPa)
humidity String 相對濕度(%)
rain String 降雨量(mm)
winddirect String 風向
windpower String 風力
windspeed String 風速(m/s)

響應示例

{
  "rdesc":"Success",
  "rcode":200,
  "info":
  [{
    "windspeed":"2.3",
    "citycode":"101010100",
    "phenomena":"晴",
    "airpressure":"1002.0",
    "humidity":"28.0",
    "updatetime":"2016-09-08 14:05",
    "windpower":"微風",
    "feelst":"27.3",
    "winddirect":"西北風",
    "weekofday":"4",
    "rain":"0.0",
    "temperature":"30.6"
  },{
    "windspeed":"2.3",
    "citycode":"101190101",
    "phenomena":"多云",
    "airpressure":"1005.0",
    "humidity":"49.0",
    "updatetime":"2016-09-08 14:15",
    "windpower":"微風",
    "feelst":"28.2",
    "winddirect":"東南風",
    "weekofday":"4",
    "rain":"0.0",
    "temperature":"30.0"
  }]
}
 
水體環境查詢

 
水質周報
接口說明
查詢指定年份和周數的全國主要水體的水質周報
 
數據更新
每周
 
GET
/v2/waterquality/{accesskey}/{year}/{week}/{filter}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
year 必填 請求年份(2004-今年)
week 必填 請求周數(1-52)
filter 可選 過濾條件,支持模糊匹配

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果集大小
info List 水質周報
drainage String 流域
river String 河流或湖泊名稱
section String 斷面
point String 點位
PH String PH值
DO String 溶解氧
NH3N String 氨氮
CODMn String 高錳酸鉀化學需氧量
pollution String 主要污染指標
prevweek String 上周水質
thisweek String 本周水質

響應示例

{
  "rdesc":"Success",
  "count":68,
  "rcode":200,
  "info":
  [{
    "point":"上海青浦急水港",
    "DO":"7.68",
    "PH":"7.36",
    "thisweek":"劣Ⅴ",
    "drainage":"太湖流域",
    "NH3N":"5.03",
    "pollution":"氨氮",
    "CODMn":"5.50",
    "prevweek":"劣Ⅴ",
    "section":"急水港(蘇-滬省界)",
    "river":"急水港河"
  },
  ……,
  {
    "point":"甘肅蘭州新城橋",
    "DO":"11.60",
    "PH":"7.81",
    "thisweek":"Ⅱ",
    "drainage":"黃河流域",
    "NH3N":"0.28",
    "pollution":"無",
    "CODMn":"2.10",
    "prevweek":"Ⅱ",
    "section":"干流",
    "river":"海拉爾河"
  }]
}
 
空氣質量查詢

 
城市空氣質量實況
接口說明
查詢指定城市的空氣質量實況
 
數據更新
每小時
 
GET
/v2/cityairlive/{accesskey}/{citycode}/{type}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
type 可選 查詢指標(僅支持AQI、PM25、PM10、CO、SO2、NO2和O3,大小寫不敏感)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
time String 時間(yyyyMMddHH)
AQI String 空氣質量指數
PM25 String PM2.5濃度(μg/m3)
PM10 String PM10濃度(μg/m3)
CO String 一氧化碳濃度(mg/m3)
SO2 String 二氧化硫濃度(μg/m3)
NO2 String 二氧化氮濃度(μg/m3)
o3 String 臭氧濃度(μg/m3)
primary String 首要污染物

響應示例

{
  "citycode":"101010100",
  "PM25":"9",
  "time":"2016090913",
  "rdesc":"Success",
  "PM10":"13",
  "SO2":"3.75",
  "o3":"55.17",
  "NO2":"15.75",
  "primary":"無",
  "rcode":200,
  "CO":"0.38",
  "AQI":"21"
}
 
城市24小時空氣質量
接口說明
查詢指定城市過去24小時的空氣質量
 
數據更新
每小時
 
GET
/v2/cityairhistory/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
history List 空氣質量歷史
citycode String 城市編碼
time String 時間(yyyyMMddHH)
AQI String 空氣質量指數
PM25 String PM2.5濃度(μg/m3)
PM10 String PM10濃度(μg/m3)
CO String 一氧化碳濃度(mg/m3)
SO2 String 二氧化硫濃度(μg/m3)
NO2 String 二氧化氮濃度(μg/m3)
o3 String 臭氧濃度(μg/m3)
primary String 首要污染物

響應示例

{
  "history":
  [{
    "citycode":"101010100",
    "PM25":"13",
    "time":"2016090815",
    "PM10":"4",
    "SO2":"2.60",
    "o3":"77.60",
    "NO2":"13.00",
    "primary":"無",
    "CO":"0.35",
    "AQI":"28"
  },{
    "citycode":"101010100",
    "PM25":"12",
    "time":"2016090817",
    "PM10":"27",
    "SO2":"2.67",
    "o3":"77.83",
    "NO2":"15.67",
    "primary":"顆粒物(PM10)",
    "CO":"0.31",
    "AQI":"37"
  },
  ……,
  {
    "citycode":"101010100",
    "PM25":"10",
    "time":"2016090914",
    "PM10":"12",
    "SO2":"3.08",
    "o3":"60.00",
    "NO2":"14.00",
    "primary":"無",
    "CO":"0.34",
    "AQI":"22"
  }],
  "rdesc":"Success",
  "rcode":200
}
 
城市指定日期空氣質量
接口說明
查詢指定城市指定日期的空氣質量
 
數據更新
每天
 
GET
/v2/citydailyair/{accesskey}/{citycode}/{date}/{type}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
date 必填 查詢日期(yyyyMMdd)
type 可選 查詢指標(僅支持AQI、PM25、PM10、CO、SO2、NO2和O3,大小寫不敏感)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
date String 日期(yyyyMMdd)
AQI_max String 最高空氣質量指數
AQI_min String 最低空氣質量指數
AQI_avg String 平均空氣質量指數
PM25_max String 最高PM2.5濃度(μg/m3)
PM25_min String 最低PM2.5濃度(μg/m3)
PM25_avg String 平均PM2.5濃度(μg/m3)
PM10_max String 最高PM10濃度(μg/m3)
PM10_min String 最低PM10濃度(μg/m3)
PM10_avg String 平均PM10濃度(μg/m3)
CO_max String 最高一氧化碳濃度(mg/m3)
CO_min String 最低一氧化碳濃度(mg/m3)
CO_avg String 平均一氧化碳濃度(mg/m3)
SO2_max String 最高二氧化硫濃度(μg/m3)
SO2_min String 最低二氧化硫濃度(μg/m3)
SO2_avg String 平均二氧化硫濃度(μg/m3)
NO2_max String 最高二氧化氮濃度(μg/m3)
NO2_min String 最低二氧化氮濃度(μg/m3)
NO2_avg String 平均二氧化氮濃度(μg/m3)
o3_max String 最高臭氧濃度(μg/m3)
o3_min String 最低臭氧濃度(μg/m3)
o3_avg String 平均臭氧濃度(μg/m3)

響應示例

{
  "rcode":200,
  "rdesc":"Success",
  "citycode":"101010100",
  "date":"20160908",
  "o3_avg":"40.74",
  "o3_min":"0.00",
  "NO2_avg":"40.40",
  "PM10_avg":"28",
  "PM10_max":"135",
  "o3_max":"47.00",
  "NO2_max":"117.00",
  "PM25_avg":"20",
  "NO2_min":"0.00",
  "PM10_min":"0",
  "AQI_avg":"39",
  "CO_max":"1.30",
  "SO2_avg":"2.50",
  "CO_min":"0.00",
  "PM25_max":"44",
  "SO2_min":"0.00",
  "AQI_max":"93",
  "PM25_min":"5",
  "SO2_max":"26.00",
  "AQI_min":"0",
  "CO_avg":"0.57"
}
 
城市指定小時空氣質量
接口說明
查詢指定城市指定小時的空氣質量
 
數據更新
每小時
 
GET
/v2/cityhourlyair/{accesskey}/{citycode}/{time}/{type}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
time 必填 查詢時間(yyyyMMddHH)
type 可選 查詢指標(僅支持AQI、PM25、PM10、CO、SO2、NO2和O3,大小寫不敏感)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
time String 時間(yyyyMMddHH)
AQI String 空氣質量指數
PM25 String PM2.5濃度(μg/m3)
PM10 String PM10濃度(μg/m3)
CO String 一氧化碳濃度(mg/m3)
SO2 String 二氧化硫濃度(μg/m3)
NO2 String 二氧化氮濃度(μg/m3)
o3 String 臭氧濃度(μg/m3)
primary String 首要污染物

響應示例

{
  "rcode":200,
  "rdesc":"Success",
  "citycode":"101010100",
  "time":"2016090908",
  "PM25":"19",
  "PM10":"44",
  "SO2":"3.33",
  "o3":"8.58",
  "NO2":"49.67",
  "primary":"無",
  "CO":"0.56",
  "AQI":"43"
}
 
空氣質量支持城市列表
接口說明
查詢空氣質量支持的城市列表
 
數據更新
暫無
 
GET
/v2/air/cities/{accesskey}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
cities List 城市列表
citycode String 城市編碼
cityname String 城市名稱
belong String 所屬地級市名稱

響應示例

{
    "rcode": 200
    "rdesc": "Success",
    "cities": [
        {
            "citycode": "101190102",
            "belong": "南京",
            "cityname": "溧水"
        },
        {
            "citycode": "101190101",
            "belong": "南京",
            "cityname": "南京"
        },
        {
            "citycode": "101010100",
            "belong": "北京",
            "cityname": "北京"
        },
        {
            "citycode": "101030100",
            "belong": "天津",
            "cityname": "天津"
        },
        ……
        {
            "citycode": "101190107",
            "belong": "南京",
            "cityname": "浦口"
        }
    ]
}
 
城市空氣質量測點列表
接口說明
查詢指定城市的空氣質量測點列表
 
數據更新
暫無
 
GET
/v2/air/devices/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
cityname String 城市名稱
devices List 測點列表
devid String 測點編號
stationname String 測點名稱
lng String 測點經度
lat String 測點緯度

響應示例

{
    "rdesc": "Success",
    "rcode": 200,
    "citycode": "101010100",
    "cityname": "北京",
    "devices": [
        {
            "devid": "1001A",
            "stationname": "萬壽西宮",
            "lng": "116.375",
            "lat": "39.886"
        },
        {
            "devid": "1002A",
            "stationname": "定陵",
            "lng": "116.232",
            "lat": "40.301"
        },
        {
            "devid": "1003A",
            "stationname": "東四",
            "lng": "116.396",
            "lat": "39.93"
        },
        {
            "devid": "1004A",
            "stationname": "天壇",
            "lng": "116.413",
            "lat": "39.886"
        },
        {
            "devid": "1005A",
            "stationname": "農展館",
            "lng": "116.47",
            "lat": "39.947"
        },
        {
            "devid": "1006A",
            "stationname": "官園",
            "lng": "116.365",
            "lat": "39.937"
        },
        {
            "devid": "1007A",
            "stationname": "海淀區萬柳",
            "lng": "116.306",
            "lat": "39.973"
        },
        {
            "devid": "1008A",
            "stationname": "順義新城",
            "lng": "116.659",
            "lat": "40.187"
        },
        {
            "devid": "1009A",
            "stationname": "懷柔鎮",
            "lng": "116.647",
            "lat": "40.308"
        },
        {
            "devid": "1010A",
            "stationname": "昌平鎮",
            "lng": "116.227",
            "lat": "40.229"
        },
        {
            "devid": "1011A",
            "stationname": "奧體中心",
            "lng": "116.407",
            "lat": "39.991"
        },
        {
            "devid": "1012A",
            "stationname": "古城",
            "lng": "116.502",
            "lat": "40.11"
        },
        {
            "devid": "94062",
            "stationname": "中國環境科學研究院",
            "lng": "116.426",
            "lat": "40.048"
        }
    ]
}
 
城市全測點空氣質量實況
接口說明
查詢指定城市所有測點的空氣質量實況
 
數據更新
每小時
 
GET
/v2/air/live/city/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
cityname String 城市名稱
time String 數據發布時間
info List 空氣質量數據列表
devid String 測點編號
stationname String 測點名稱
AQI String 空氣質量指數
PM25 String PM2.5值(μg/m3)
PM10 String PM10值(μg/m3)
CO String 一氧化碳值(mg/m3)
SO2 String 二氧化硫值(μg/m3)
NO2 String 二氧化氮值(μg/m3)
o3 String 臭氧值(μg/m3)
prkey String 首要污染物

響應示例

{
    "rcode": 200,
    "rdesc": "Success",
    "citycode": "101010100",
    "cityname": "北京",
    "time": "2017030913",
    "info": [
        {
            "PM25": "8",
            "prkey": "無",
            "PM10": "15",
            "SO2": "2",
            "o3": "79",
            "devid": "1001A",
            "NO2": "7",
            "stationname": "萬壽西宮",
            "CO": "0.3",
            "AQI": "25"
        },
        {
            "PM25": "12",
            "prkey": "無",
            "PM10": "30",
            "SO2": "4",
            "o3": "93",
            "devid": "1002A",
            "NO2": "3",
            "stationname": "定陵",
            "CO": "0.3",
            "AQI": "30"
        },
        {
            "PM25": "7",
            "prkey": "無",
            "PM10": "14",
            "SO2": "3",
            "o3": "89",
            "devid": "1003A",
            "NO2": "8",
            "stationname": "東四",
            "CO": "0.3",
            "AQI": "28"
        },
        {
            "PM25": "14",
            "prkey": "無",
            "PM10": "0",
            "SO2": "2",
            "o3": "107",
            "devid": "1004A",
            "NO2": "22",
            "stationname": "天壇",
            "CO": "0.3",
            "AQI": "34"
        },
        {
            "PM25": "9",
            "prkey": "無",
            "PM10": "21",
            "SO2": "4",
            "o3": "69",
            "devid": "1005A",
            "NO2": "13",
            "stationname": "農展館",
            "CO": "0.3",
            "AQI": "22"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "15",
            "SO2": "2",
            "o3": "78",
            "devid": "1006A",
            "NO2": "18",
            "stationname": "官園",
            "CO": "0.3",
            "AQI": "25"
        },
        {
            "PM25": "7",
            "prkey": "無",
            "PM10": "23",
            "SO2": "3",
            "o3": "2",
            "devid": "1007A",
            "NO2": "8",
            "stationname": "海淀區萬柳",
            "CO": "0.3",
            "AQI": "23"
        },
        {
            "PM25": "9",
            "prkey": "無",
            "PM10": "20",
            "SO2": "4",
            "o3": "0",
            "devid": "1008A",
            "NO2": "0",
            "stationname": "順義新城",
            "CO": "0.3",
            "AQI": "20"
        },
        {
            "PM25": "9",
            "prkey": "無",
            "PM10": "13",
            "SO2": "3",
            "o3": "112",
            "devid": "1009A",
            "NO2": "7",
            "stationname": "懷柔鎮",
            "CO": "0.2",
            "AQI": "35"
        },
        {
            "PM25": "13",
            "prkey": "無",
            "PM10": "35",
            "SO2": "6",
            "o3": "59",
            "devid": "1010A",
            "NO2": "21",
            "stationname": "昌平鎮",
            "CO": "0.5",
            "AQI": "35"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "15",
            "SO2": "3",
            "o3": "112",
            "devid": "1011A",
            "NO2": "10",
            "stationname": "奧體中心",
            "CO": "0.3",
            "AQI": "35"
        },
        {
            "PM25": "10",
            "prkey": "無",
            "PM10": "25",
            "SO2": "3",
            "o3": "62",
            "devid": "1012A",
            "NO2": "10",
            "stationname": "古城",
            "CO": "0.3",
            "AQI": "25"
        },
        {
            "PM25": "28",
            "prkey": "無",
            "PM10": "0",
            "SO2": "0",
            "o3": "0",
            "devid": "94062",
            "NO2": "0",
            "stationname": "中國環境科學研究院",
            "CO": "0",
            "AQI": "0"
        }
    ]
}
 
單測點空氣質量實況
接口說明
查詢指定測點的空氣質量實況
 
數據更新
每小時
 
GET
/v2/air/live/device/{accesskey}/{devid}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
devid 必填 請求的測點編號

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info Object 空氣質量數據
devid String 測點編號
stationname String 測點名稱
AQI String 空氣質量指數
PM25 String PM2.5值(μg/m3)
PM10 String PM10值(μg/m3)
CO String 一氧化碳值(mg/m3)
SO2 String 二氧化硫值(μg/m3)
NO2 String 二氧化氮值(μg/m3)
o3 String 臭氧值(μg/m3)
prkey String 首要污染物

響應示例

{
    "rdesc": "Success",
    "rcode": 200,
    "info": {
        "PM25": "8",
        "prkey": "無",
        "PM10": "15",
        "SO2": "2",
        "o3": "79",
        "devid": "1001A",
        "NO2": "7",
        "stationname": "萬壽西宮",
        "CO": "0.3",
        "AQI": "25"
    }
}
 
城市全測點指定小時空氣質量
接口說明
查詢指定城市所有測點指定小時的空氣質量
 
數據更新
每小時
 
GET
/v2/air/hourly/city/{accesskey}/{citycode}/{time}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 請求的城市編碼
time 必填 查詢時間(格式:yyyyMMddHH)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
cityname String 城市名稱
time String 數據發布時間
info List 空氣質量數據列表
devid String 測點編號
stationname String 測點名稱
AQI String 空氣質量指數
PM25 String PM2.5值(μg/m3)
PM10 String PM10值(μg/m3)
CO String 一氧化碳值(mg/m3)
SO2 String 二氧化硫值(μg/m3)
NO2 String 二氧化氮值(μg/m3)
o3 String 臭氧值(μg/m3)
prkey String 首要污染物

響應示例

{
    "rcode": 200,
    "rdesc": "Success",
    "citycode": "101010100",
    "cityname": "北京",
    "time": "2017030800",
    "info": [
        {
            "PM25": "3",
            "prkey": "無",
            "PM10": "8",
            "SO2": "2",
            "o3": "59",
            "devid": "1001A",
            "NO2": "22",
            "stationname": "萬壽西宮",
            "CO": "0.3",
            "AQI": "19"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "12",
            "SO2": "2",
            "o3": "85",
            "devid": "1002A",
            "NO2": "2",
            "stationname": "定陵",
            "CO": "0.2",
            "AQI": "27"
        },
        {
            "PM25": "5",
            "prkey": "無",
            "PM10": "11",
            "SO2": "5",
            "o3": "67",
            "devid": "1003A",
            "NO2": "23",
            "stationname": "東四",
            "CO": "0.4",
            "AQI": "21"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "21",
            "SO2": "2",
            "o3": "70",
            "devid": "1004A",
            "NO2": "21",
            "stationname": "天壇",
            "CO": "0.3",
            "AQI": "22"
        },
        {
            "PM25": "5",
            "prkey": "無",
            "PM10": "10",
            "SO2": "3",
            "o3": "53",
            "devid": "1005A",
            "NO2": "17",
            "stationname": "農展館",
            "CO": "0.3",
            "AQI": "17"
        },
        {
            "PM25": "3",
            "prkey": "無",
            "PM10": "7",
            "SO2": "3",
            "o3": "56",
            "devid": "1006A",
            "NO2": "17",
            "stationname": "官園",
            "CO": "0.3",
            "AQI": "18"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "13",
            "SO2": "2",
            "o3": "66",
            "devid": "1007A",
            "NO2": "23",
            "stationname": "海淀區萬柳",
            "CO": "0.2",
            "AQI": "21"
        },
        {
            "PM25": "8",
            "prkey": "無",
            "PM10": "27",
            "SO2": "4",
            "o3": "41",
            "devid": "1008A",
            "NO2": "45",
            "stationname": "順義新城",
            "CO": "0.5",
            "AQI": "27"
        },
        {
            "PM25": "7",
            "prkey": "無",
            "PM10": "0",
            "SO2": "2",
            "o3": "104",
            "devid": "1009A",
            "NO2": "2",
            "stationname": "懷柔鎮",
            "CO": "0.2",
            "AQI": "33"
        },
        {
            "PM25": "11",
            "prkey": "無",
            "PM10": "16",
            "SO2": "5",
            "o3": "39",
            "devid": "1010A",
            "NO2": "32",
            "stationname": "昌平鎮",
            "CO": "0.5",
            "AQI": "16"
        },
        {
            "PM25": "3",
            "prkey": "無",
            "PM10": "7",
            "SO2": "4",
            "o3": "89",
            "devid": "1011A",
            "NO2": "18",
            "stationname": "奧體中心",
            "CO": "0.3",
            "AQI": "28"
        },
        {
            "PM25": "6",
            "prkey": "無",
            "PM10": "0",
            "SO2": "3",
            "o3": "49",
            "devid": "1012A",
            "NO2": "15",
            "stationname": "古城",
            "CO": "0.3",
            "AQI": "16"
        },
        {
            "PM25": "28",
            "prkey": "無",
            "PM10": "",
            "SO2": "",
            "o3": "",
            "devid": "94062",
            "NO2": "",
            "stationname": "中國環境科學研究院",
            "CO": "",
            "AQI": ""
        }
    ]
}
 
單測點指定小時空氣質量
接口說明
查詢指定測點指定小時的空氣質量
 
數據更新
每小時
 
GET
/v2/air/hourly/device/{accesskey}/{devid}/{time}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
devid 必填 請求的測點編號
time 必填 查詢時間(格式:yyyyMMddHH)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info Object 空氣質量數據
devid String 測點編號
stationname String 測點名稱
AQI String 空氣質量指數
PM25 String PM2.5值(μg/m3)
PM10 String PM10值(μg/m3)
CO String 一氧化碳值(mg/m3)
SO2 String 二氧化硫值(μg/m3)
NO2 String 二氧化氮值(μg/m3)
o3 String 臭氧值(μg/m3)
prkey String 首要污染物

響應示例

{
    "rdesc": "Success",
    "rcode": 200,
    "info": {
        "PM25": "3",
        "prkey": "無",
        "PM10": "8",
        "SO2": "2",
        "o3": "59",
        "devid": "1001A",
        "NO2": "22",
        "stationname": "萬壽西宮",
        "CO": "0.3",
        "AQI": "19"
    }
}
 
單測點指定日期空氣質量
接口說明
查詢指定測點指定日期的每小時空氣質量
 
數據更新
每天
 
GET
/v2/air/daily/device/{accesskey}/{devid}/{date}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
devid 必填 請求的測點編號
date 必填 查詢日期(格式:yyyyMMdd)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
devid String 測點編號
stationname String 測點名稱
info List 空氣質量數據列表
time String 數據發布時間
AQI String 空氣質量指數
PM25 String PM2.5值(μg/m3)
PM10 String PM10值(μg/m3)
CO String 一氧化碳值(mg/m3)
SO2 String 二氧化硫值(μg/m3)
NO2 String 二氧化氮值(μg/m3)
o3 String 臭氧值(μg/m3)
prkey String 首要污染物

響應示例

{
    "rcode": 200,
    "rdesc": "Success",
    "devid": "1001A",
    "stationname": "萬壽西宮",
    "info": [
        {
            "PM25": "3",
            "time": "2017030800",
            "PM10": "8",
            "SO2": "2",
            "o3": "59",
            "NO2": "22",
            "CO": "0.3",
            "AQI": "19"
        },
        {
            "PM25": "7",
            "time": "2017030801",
            "PM10": "8",
            "SO2": "2",
            "o3": "55",
            "NO2": "25",
            "CO": "0.4",
            "AQI": "18"
        },
        {
            "PM25": "4",
            "time": "2017030802",
            "PM10": "12",
            "SO2": "2",
            "o3": "48",
            "NO2": "29",
            "CO": "0.4",
            "AQI": "15"
        },
        {
            "PM25": "6",
            "time": "2017030803",
            "PM10": "8",
            "SO2": "2",
            "o3": "50",
            "NO2": "25",
            "CO": "0.4",
            "AQI": "16"
        },
        {
            "PM25": "6",
            "time": "2017030804",
            "PM10": "10",
            "SO2": "3",
            "o3": "53",
            "NO2": "23",
            "CO": "0.4",
            "AQI": "17"
        },
        {
            "PM25": "5",
            "time": "2017030805",
            "PM10": "13",
            "SO2": "3",
            "o3": "54",
            "NO2": "18",
            "CO": "0.4",
            "AQI": "17"
        },
        {
            "PM25": "6",
            "time": "2017030806",
            "PM10": "18",
            "SO2": "2",
            "o3": "58",
            "NO2": "17",
            "CO": "0.3",
            "AQI": "19"
        },
        {
            "PM25": "6",
            "time": "2017030807",
            "PM10": "22",
            "SO2": "2",
            "o3": "59",
            "NO2": "19",
            "CO": "0.3",
            "AQI": "22"
        },
        {
            "PM25": "7",
            "time": "2017030808",
            "PM10": "28",
            "SO2": "2",
            "o3": "59",
            "NO2": "21",
            "CO": "0.4",
            "AQI": "28"
        },
        {
            "PM25": "7",
            "time": "2017030809",
            "PM10": "29",
            "SO2": "3",
            "o3": "51",
            "NO2": "30",
            "CO": "0.4",
            "AQI": "29"
        },
        {
            "PM25": "9",
            "time": "2017030810",
            "PM10": "24",
            "SO2": "2",
            "o3": "55",
            "NO2": "26",
            "CO": "0.4",
            "AQI": "24"
        },
        {
            "PM25": "12",
            "time": "2017030811",
            "PM10": "27",
            "SO2": "2",
            "o3": "67",
            "NO2": "15",
            "CO": "0.4",
            "AQI": "27"
        },
        {
            "PM25": "9",
            "time": "2017030812",
            "PM10": "25",
            "SO2": "2",
            "o3": "78",
            "NO2": "10",
            "CO": "0.3",
            "AQI": "25"
        },
        {
            "PM25": "11",
            "time": "2017030813",
            "PM10": "25",
            "SO2": "2",
            "o3": "86",
            "NO2": "7",
            "CO": "0.3",
            "AQI": "27"
        },
        {
            "PM25": "11",
            "time": "2017030814",
            "PM10": "23",
            "SO2": "2",
            "o3": "89",
            "NO2": "6",
            "CO": "0.3",
            "AQI": "28"
        },
        {
            "PM25": "14",
            "time": "2017030815",
            "PM10": "33",
            "SO2": "2",
            "o3": "92",
            "NO2": "5",
            "CO": "0.3",
            "AQI": "33"
        },
        {
            "PM25": "12",
            "time": "2017030816",
            "PM10": "35",
            "SO2": "2",
            "o3": "90",
            "NO2": "5",
            "CO": "0.3",
            "AQI": "35"
        },
        {
            "PM25": "10",
            "time": "2017030817",
            "PM10": "28",
            "SO2": "2",
            "o3": "87",
            "NO2": "6",
            "CO": "0.3",
            "AQI": "28"
        },
        {
            "PM25": "8",
            "time": "2017030818",
            "PM10": "9",
            "SO2": "2",
            "o3": "84",
            "NO2": "8",
            "CO": "0.3",
            "AQI": "27"
        },
        {
            "PM25": "8",
            "time": "2017030819",
            "PM10": "33",
            "SO2": "2",
            "o3": "80",
            "NO2": "14",
            "CO": "0.3",
            "AQI": "33"
        },
        {
            "PM25": "10",
            "time": "2017030820",
            "PM10": "35",
            "SO2": "2",
            "o3": "66",
            "NO2": "25",
            "CO": "0.4",
            "AQI": "35"
        },
        {
            "PM25": "10",
            "time": "2017030821",
            "PM10": "35",
            "SO2": "2",
            "o3": "66",
            "NO2": "25",
            "CO": "0.4",
            "AQI": "35"
        },
        {
            "PM25": "17",
            "time": "2017030822",
            "PM10": "35",
            "SO2": "3",
            "o3": "52",
            "NO2": "35",
            "CO": "0.5",
            "AQI": "35"
        },
        {
            "PM25": "13",
            "time": "2017030823",
            "PM10": "30",
            "SO2": "4",
            "o3": "51",
            "NO2": "32",
            "CO": "0.5",
            "AQI": "30"
        }
    ]
}
 
污染排放查詢

 
年度污染排放
接口說明
查詢指定年份的全國污染排放
 
數據更新
暫無
 
GET
/v2/discharge/{accesskey}/{year}/{filter}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
year 必填 查詢年份(2004-2014)
filter 可選 過濾條件,支持模糊匹配

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
year String 年份
count Int 結果集大小
info List 污染排放列表
province String 省份名稱
category String 指標種類
index String 具體指標
value String 排放量

響應示例

{
  "rdesc":"Success",
  "count":32,
  "rcode":200,
  "year":"2004",
  "info":
  [{
    "index":"六價鉻",
    "category":"空氣污染物排放",
    "value":"15.748 噸",
    "province":"江蘇"
  },
  ……,
  {
    "index":"生活及其他煙塵",
    "category":"空氣污染物排放",
    "value":"1.7 萬噸",
    "province":"江蘇"
  }]
}
 
省級歷史污染排放
接口說明
查詢指定省份指定時段的歷史污染排放年報
 
數據更新
暫無
 
GET
/v2/periodicdischarge/{accesskey}/{start_year}/{end_year}/{province}/{filter}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
start_year 必填 起始年份(2004-2014)
end_year 必填 結束年份(2004-2014,不早于起始年份)
province 必填 查詢省份
filter 可選 過濾條件,支持模糊匹配

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
province String 省份名稱
count Int 結果集大小
info List 污染排放列表
year String 年份
category String 指標種類
index String 具體指標
value String 排放量

響應示例

{
  "rcode":200,
  "rdesc":"Success",
  "count":2,
  "province":"江蘇",
  "info":
  [{
    "index":"工業煙塵",
    "category":"空氣污染物排放",
    "value":"39.8 萬噸",
    "year":"2004"
  },{
    "index":"工業煙塵",
    "category":"空氣污染物排放",
    "value":"42.6 萬噸",
    "year":"2005"
  }]
}
城市輻射查詢

 
城市大氣輻射
接口說明
查詢從2011年3月12日到2015年12月20日的全國每日輻射環境數據
 
數據更新
暫無
 
GET
/v2/radiation/{accesskey}/{date}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
date 必填 查詢日期(yyyyMMdd,范圍:20110312~20151220)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
datasource String 數據來源
info List 輻射數據列表
time String 監測時段,起始時間_結束時間,精確到小時
range String 監測范圍值
conclusion String 監測結論
place String 監測城市
reference String 參考范圍值(周邊原野監測值)
average String 監測平均值

響應示例

{
????{
????"rcode":200,???????????????? 
????"rdesc":"Success",?????????? 
????"datasource":"湖南省環境保護廳",?? 
????"info":
????[{
????????"time":"2015120308_0315",????
????????"range":"90.9-91.2",????????? 
????????"conclusion":"正常水平",?????? 
????????"place":"上海市",????????????? 
????????"reference":"54.9-108.2",????
????????"average":"91.1"????????????
????},{
????????……??????????????????????????? 
????},
????……
????]
}
 
地震查詢

 
最近一次地震
接口說明
查詢全球發生的最近一次地震
 
數據更新
每小時
 
GET
/v2/recentearthquake/{accesskey}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
time String 地震發生時間
update String 數據更新時間
mag String 震級(里氏)
longitude String 震源經度
latitude String 震源緯度
place String 震源位置
depth String 震源深度(km)

響應示例

{
  "rcode":200,
  "rdesc":"Success",
  "time":"2016-09-09 16:04:16",
  "updated":"2016-09-09 16:05:54",
  "mag":"1.08",
  "longitude":"-118.8816681",
  "latitude":"37.6331673",
  "place":"8km ESE of Mammoth Lakes, California",
  "depth":"6.58"
}
 
指定日期地震
接口說明
查詢指定日期發生的全球地震
 
數據更新
每天
 
GET
/v2/dailyearthquake/{accesskey}/{date}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
date 必填 查詢日期(yyyyMMdd)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果集大小
earthquakes List 地震列表
time String 地震發生時間
update String 數據更新時間
mag String 震級(里氏)
longitude String 震源經度
latitude String 震源緯度
place String 震源位置
depth String 震源深度(km)

響應示例

{
  "rdesc":"Success",
  "count":151,
  "rcode":200,
  "earthquakes":
  [{
    "time":"2016-09-08 00:12:11",
    "updated":"2016-09-08 00:15:56",
    "mag":"0.44",
    "longitude":"-116.6545",
    "latitude":"33.5645",
    "place":"2km ENE of Anza, CA",
    "depth":"9.28"
  },
  ……,
  {
    "time":"2016-09-08 23:56:44",
    "updated":"2016-09-09 00:02:30",
    "mag":"1.3",
    "longitude":"-150.9587",
    "latitude":"63.1828",
    "place":"103km WSW of Cantwell, Alaska",
    "depth":"155.8"
  }]
}
 
指定城市地震
接口說明
查詢指定城市受影響的地震
 
數據更新
每小時
 
GET
/v2/cityearthquake/{accesskey}/{citycode}/{count}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 城市編碼
count 可選 查詢條目數

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果集大小
earthquakes List 地震列表
time String 地震發生時間
update String 數據更新時間
mag String 震級(里氏)
longitude String 震源經度
latitude String 震源緯度
place String 震源位置
depth String 震源深度(km)
distance String 城市到震源的距離

響應示例

{
  "rdesc":"Success",
  "count":2,
  "rcode":200,
  "earthquakes":
  [{
    "distance":"243.507km",
    "time":"2016-09-09 08:30:01",
    "updated":"2016-09-09 09:14:09",
    "mag":"5.3",
    "longitude":"128.9744",
    "latitude":"41.2982",
    "place":"15km ENE of Sungjibaegam, North Korea",
    "depth":"0.0"
  },{
    "distance":"746.417km",
    "time":"2016-09-07 12:28:49",
    "updated":"2016-09-07 13:11:49",
    "mag":"4.9",
    "longitude":"140.0558",
    "latitude":"36.1851",
    "place":"4km WSW of Tsukuba, Japan",
    "depth":"47.6"
  }]
}
 
指定時段地震
接口說明
查詢指定時段全球發生的地震
 
數據更新
每天
 
GET
/v2/periodicearthquake/{accesskey}/{start_date}/{end_date}/{min_mag}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
start_date 必填 起始日期(yyyyMMdd)
end_date 必填 結束日期(yyyyMMdd,不早于起始日期)
min_mag 可選 最小展示震級

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果集大小
earthquakes List 地震列表
time String 地震發生時間
update String 數據更新時間
mag String 震級(里氏)
longitude String 震源經度
latitude String 震源緯度
place String 震源位置
depth String 震源深度(km)

響應示例

{
  "rdesc":"Success",
  "count":79,
  "rcode":200,
  "earthquakes":
  [{
    "time":"2016-09-07 00:35:59",
    "updated":"2016-09-07 00:47:11",
    "mag":"2.12",
    "longitude":"-116.039",
    "latitude":"33.1741667",
    "place":"9km ENE of Ocotillo Wells, CA",
    "depth":"2.05"
  },
  ……,
  {
    "time":"2016-09-08 23:21:35",
    "updated":"2016-09-08 23:33:29",
    "mag":"2.0",
    "longitude":"-152.5901",
    "latitude":"59.412",
    "place":"59km SW of Anchor Point, Alaska",
    "depth":"81.8"
  }]
}
臺風查詢

 
臺風概要
接口說明
查詢2002到2016年指定年份的臺風概要信息
 
數據更新
每年
 
GET
/v2/typhoon/{accesskey}/{year}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
year 必填 查詢年份(2002~2016)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info List 當年所有臺風概要信息列表(僅包含臺風英文名)

響應示例

{
    "rcode":200,       
    "rdesc":"Success", 
    "info":                 
    [
        "PAKHAR",          
        "SANVU",
        "MAWAR",
        "GUCHOL",
        "TALIM",
        "DOKSURI",
        "KHANUN",
        "VICENTE",
        "SAOLA",
        "DAMREY",
        "HAIKUI",
        "KIROGI",
        "KAI-TAK",
        "TEMBIN",
        "BOLAVEN",
        "SANBA",
        "JELAWAT",
        "EWINIAR",
        "MALIKSI",
        "GAEMI",
        "PRAPIROON",
        "MARIA",
        "SON-TINH",
        "BOPHA",
        "WUKONG"
    ]
}
臺風詳情
接口說明
查詢2002到2016年指定臺風的具體路徑信息
 
數據更新
每年
 
GET
/v2/typhoon/{accesskey}/{year}/{name}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
year 必填 查詢年份(2002~2016)
name 必填 臺風英文名稱(參見臺風概要)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info Object 臺風詳情
id String 臺風編號
name_cn String 臺風中文名稱
name_en String 臺風英文名稱
year String 年份
path List 臺風路徑列表
time String 時間
type String 類型(1:熱帶低壓,2:熱帶風暴,3:強熱帶風暴,4:臺風,5:強臺風,6:超強臺風)
cwspd String 臺風中心風速(m/s)
cwsc String 臺風中心風力
cpres String 臺風中心氣壓(hPa)
cr7 String 7級風力半徑(km)
cr10 String 10級風力半徑(km)
lng String 臺風中心經度
lat String 臺風中心緯度

響應示例

{
????"resultCode":"0",
????"resultDesc":"Success",
????"info":
????{
????????"id":"25",?????????????
????????"name_cn":"悟空",?????????????? 
????????"name_en":"WUKONG",????????????
????????"year":"2012",?????????????????  
????????"path":????????????????????? 
????????[{
??????????? "time":"2012-12-25_08:00",?
            "type":"2",
????????????"cwspd":"18",???? 
????????????"cwsc":"",?????? 
????????????"cpres":"1000",??? 
????????????"cr7":"150",????????? 
????????????"cr10":"",??????????? 
????????????"lat":"10.3",???????????????? 
????????????"lng":"128.6"???????????????? 
????????}]
????}
}
 
城市位置查詢

 
城市地理位置
接口說明
查詢指定城市的地理位置坐標
 
數據更新
暫無
 
GET
/v2/location/{accesskey}/{citycode}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
citycode 必填 城市編碼

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info Object 地理位置信息
citycode String 城市編碼
countyname_cn String 縣市中文名
countyname_en String 縣市英文名
cityname_cn String 所屬城市中文名
cityname_en String 所屬城市英文名
provincename_cn String 所屬省份中文名
provincename_en String 所屬省份英文名
nationname_cn String 所屬國家中文名
nationname_en String 所屬國家英文名
citylevel String 城市級別
zipcode String 郵政編碼
areanumber String 電話區號
uptime String 更新時間
longitude String 城市經度
latitude String 城市緯度
altitude String 城市海拔(m)

響應示例

{
  "rdesc":"Success",
  "rcode":200,
  "info":
  {
    "citylevel":"1",
    "countyname_cn":"北京",
    "countyname_en":"beijing",
    "altitude":"33",
    "zipcode":"100000",
    "uptime":"201509141100",
    "cityname_cn":"北京",
    "citycode":"101010100",
    "cityname_en":"beijing",
    "provincename_cn":"北京",
    "nationname_en":"china",
    "nationname_cn":"中國",
    "longitude":"116.391000",
    "provincename_en":"beijing",
    "latitude":"39.904000",
    "areanumber":"010"
  }
}
 
坐標范圍查詢

 
范圍覆蓋城市
接口說明
查詢指定坐標范圍內覆蓋的城市列表
 
數據更新
暫無
 
GET
/v2/area/{accesskey}/{start_lng}/{start_lat}/{end_lng}/{end_lat}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
start_lng 必填 起始坐標經度(東經)
start_lat 必填 起始坐標緯度(北緯)
end_lng 必填 結束坐標經度(東經)
end_lat 必填 結束坐標緯度(北緯)

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
count Int 結果集大小
cities List 城市列表
citycode String 城市編碼
cityname String 城市名稱
longitude String 城市經度
latitude String 城市緯度

響應示例

{
  "rdesc":"Success",
  "count":7,
  "cities":
  [{
    "citycode":"101190501",
    "longitude":"120.840000",
    "latitude":"32.016000",
    "cityname":"南通"
  },{
    "citycode":"101190502",
    "longitude":"120.270000",
    "latitude":"32.320000",
    "cityname":"海安"
  },{
    "citycode":"101190503",
    "longitude":"120.586000",
    "latitude":"32.245000",
    "cityname":"如皋"
  },{
    "citycode":"101190707",
    "longitude":"120.508000",
    "latitude":"32.794000",
    "cityname":"東臺"
  },{
    "citycode":"101191203",
    "longitude":"120.092000",
    "latitude":"32.188000",
    "cityname":"泰興"
  },{
    "citycode":"101191204",
    "longitude":"120.090000",
    "latitude":"32.310000",
    "cityname":"姜堰"
  },{
    "citycode":"101191205",
    "longitude":"120.282000",
    "latitude":"32.038000",
    "cityname":"靖江"
  }],
  "rcode":200
}
 
城市編碼查詢

 
所有城市編碼
接口說明
查詢所有支持城市的城市編碼
 
數據更新
暫無
 
GET
/v2/citycode/{accesskey}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info List 城市編碼列表
citycode String 城市編碼
cityname String 城市名稱

響應示例

{
  "rdesc":"Success",
  "rcode":200,
  "info":
  [{
    "citycode":"101010100",
    "cityname":"北京"
  },{
    "citycode":"101010200",
    "cityname":"海淀"
  },
  ……,
  {
    "citycode":"101340406",
    "cityname":"云林"
  }]
}
 
指定城市編碼
接口說明
查詢指定城市的城市編碼
 
數據更新
暫無
 
GET
/v2/citycode/{accesskey}/{cityname}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
cityname 必填 城市名稱

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
citycode String 城市編碼
cityname String 城市名稱

響應示例

{
  "citycode":"101190101",
  "rdesc":"Success",
  "rcode":200,
  "cityname":"南京"
}
 
定位服務

 
經緯度定位
接口說明
根據經緯度定位最接近的城市區域
 
數據更新
暫無
 
GET
/v2/locate/{accesskey}/{lng}/{lat}

請求參數說明

參數名稱 類型 參數含義
accesskey 必填 用戶私鑰
lng 必填 經度值
lat 必填 緯度值

響應參數說明

參數名稱 類型 參數含義
rcode Int 結果碼
rdesc String 結果描述
info Object 定位信息
citycode String 對應的環境云城市編碼
province String 省份名稱
city String 城市名稱
county String 區縣名稱

響應示例

{
    "rcode": 200,
    "rdesc": "Success",
    "info": {
        "citycode": "101190102",
        "province": "江蘇",
        "city": "南京",
        "county": "溧水"
    }
}
爱情岛论坛 - 亚洲品质自拍视频网站,极速福利视频在线观看