Sign in register

Product Overview

brief introduction

The meteorological big data platform is affiliated to Beijing Tianyi Technology Co., Ltd. It is the official carrier of China Weather Network to provide meteorological data product services through API interface for universities, research institutes, users and individual developers in various industries. With the gradual improvement of the meteorological big data platform, more abundant meteorological data will be provided to the majority of users to meet the different needs of different users. Through the customized data of the meteorological big data platform, users can freely select more than 40000 county and township stations nationwide, 180000 city stations worldwide, and freely select any element, forecast duration, and update frequency of the six major meteorological products, which is convenient and intuitive.

The meteorological big data platform has several packages for the public to choose from. At present, there are free packages, domestic packages, domestic travel packages, foreign packages, foreign travel packages. The Chinese weather and meteorological big data platform has more different packages to serve the public. Since its operation, the meteorological big data platform has successively established partnerships with well-known domestic enterprises. Among them, Tencent, Qihoo 360, Baidu and other domestic first-line Internet companies have long-term business cooperation, as well as providing weather data support for new companies, such as Ali Mama, Go Skiing GOSKI and so on. The meteorological big data platform is the preferred development platform for ordinary weather application enthusiasts, and it is also a good choice for all walks of life to explore weather value, improve service quality, and promote the better development of the industry.

Product features

The data categories involved in the meteorological big data platform include forecast, live data, early warning, air quality, index, graphic products, grid data, etc. The use of data sources is simple, convenient and cross platform.

Application scenarios

The website national urban weather forecast, weather forecast service APP application, TV box weather forecast application, game scene and weather combination, agricultural disaster prevention, insurance industry and weather combination, medical units and disease prevention and control center and weather service combination improve and optimize the service quality, and single car travel application service users travel.

Service telephone

Business phone: 010-68408994

Technical support telephone: 010-58991542

instructions

Use process

Register and apply for meteorological big data platform account

Log in to the official website of the meteorological big data platform http://www.weatherdt.com Click the "Register" button in the upper right corner to register and activate the account, as shown in the following figure:

developer's guide

Interface URL

http://api.weatherdt.com/common/?area= Station table ID&type=weather data category&key=741c428fc7116c6f718cb14f2dda49sm

Site assembly rules

http://api.weatherdt.com/common/?area= Station table ID | Station table ID | Station table ID&type=weather data category&key=741c428fc7116c6f718cb14f2dda49sm

Single site

Request URL: http://api.weatherdt.com/common/?area= Station table ID&type=weather data category&key=741c428fc7116c6f718cb14f2dda49sm

multistation

The site type can only be one of four types (Chinese sites, foreign sites, tourist attractions, airports), and can't be mixed. You can only ask for an error

Number of stations N (2<=N<=20), out of range error report

Request URL: http://api.weatherdt.com/common/?area=areaId |AreaId&type=weather data category&key=741c428fc7116c6f718cb14f2dda49sm

Element assembly rules

Single site request can request all data categories and all elements (Recommended, concise)

http://api.weatherdt.com/common/?area=areaId&type=index&key=741c428fc7116c6f718cb14f2dda49sm

http://api.weatherdt.com/common/?area=areaId&type=index |forecast|alarm&key=741c428fc7116c6f718cb14f2dda49sm

Multi site request can request all data categories and all elements

http://api.weatherdt.com/common/?area=areaId |areaId&type=air&key=741c428fc7116c6f718cb14f2dda49sm

http://api.weatherdt.com/common/?area=areaId |areaId&type=air|forecast|alarm&key=741c428fc7116c6f718cb14f2dda49sm

Parameter Description

parameter Must Example explain
area must 10010101001|10010101002 Station numbers. Multiple stations are separated by |. Up to 20 station numbers are supported
type must Type=forecast | alarm | air | observe or a single data category Request data type, use | to separate multiple categories
key must 741c428fc7116c6f718cb14f2dda49sm Key, corresponding to the order

Interface error code table

code Error description remarks
CC1000 Parameter error Check parameter spelling
CC1003 Order Expiration Please purchase the service again
CC1004 Access times exceeded Please access the interface reasonably
CC1005 Too many sites error Please visit less than 20 sites in a single visit
CC1006 Provider path error Provider path error
CC1100 connection timed out Please visit later
CC1101 Key error Check key
CC1102 No response from the system Please visit later
CC1200 Request invalid site error Check request site
CC1201 Error requesting too many sites and elements Check the number of stations or elements
CC1300 Request element format error Check feature request format
CC1301 Request Uncustomized Type Data Check custom type data
CC1302 Request type customization days exceeded error Check the customized days of the request type
CC1303 Request multi site and index multi element errors Check the number of stations or index elements

Interface returns JSON example

				

{

"Air": {//Air quality

"101010100": {//Station No

"2001006": {//Data category

"006": "2.0",//SO2

"007": "32.0",//CO

"003": "65.0",//NO2

"004": "2.0",//O3

"000": "201611041000",//Update time

"001": "290.0",//PM2.5

"005": "166.0",//PM10

"002": "290.0"//AQI

}

}

},

"Alarm": {//Alert

"101010100": {//Station No

"1001003": [//data category

{

"006": "02",//Alert level number

"010": "201611032200545111 Fog yellow",//Warning information

"008": "2016-11-03 22:00",//Alert release time

"011": "10101-20161103220000-1202. html",//The jump address of the weather website

"009": "The Beijing Meteorological Observatory issued a yellow fog warning at 22:00 on the 3rd. It is estimated that there will be fog in the city from now to around 10:00 on the 4th. The visibility in some areas is less than 500 meters. Please take precautions."//The content of the warning release

"001": "Beijing",//The provincial name of the alert issuing unit

"005": "Fog",//Alert category name

"004": "12",//Alert category number

"003": "",//The county name of the alert publishing company

"007": "yellow",//Alert level name

"002": ""//The city level name of the alert publishing company

},

{

"006": "03",//Alert level number

"010": "201611031750545111 haze orange",//warning information

"008": "2016-11-03 17:50",//Alert release time

"011": "10101-20161103175000-1303. html",//The jump address of the weather website

"009": "At 17:50 on the 3rd, the Beijing Meteorological Observatory updated and issued an orange haze warning. It is expected that moderate to severe haze will occur in the city from the night of the 3rd to the 4th, with low visibility. Please take precautions."//The content of the warning release

"001": "Beijing",//The provincial name of the alert issuing unit

"005": "Haze",//Alert category name

"004": "13",//Alert category number

"003": "",//The county name of the alert publishing company

"007": "orange",//Alert level name

"002": ""//The city level name of the alert publishing company

}

]

}

},

"Forecast": {//forecast

"24h": {//Every 24 hours

"101010100": {//Station No

"1001001": [//data category

{

"006": "0",//Night wind

"008": "0",//Night direction

"007": "0",//daytime direction

"003": "15",//daytime temperature

"004": "4",//Night temperature

"001": "53",//daytime weather phenomenon code

"005": "0",//daytime wind

"002": "53"//Weather phenomenon code at night

},

{

"006": "0",//Night wind

"008": "0",//Night direction

"007": "0",//daytime direction

"003": "17",//daytime temperature

"004": "3",//Night temperature

"001": "01",//daytime weather phenomenon code

"005": "0",//daytime wind

"002": "02"//Weather phenomenon code at night

},

{

"006": "0",//Night wind

"008": "0",//Night direction

"007": "0",//daytime direction

"003": "10",//daytime temperature

"004": "4",//Night temperature

"001": "02",//daytime weather phenomenon code

"005": "0",//daytime wind

"002": "07"//Weather phenomenon code at night

}

],

"000": "201611040800"//Update time

}

}

},

"Observe": {//Live

"101010100": {//Station No

"1001002": {//Data category

"006": "0",//Current precipitation (unit: mm)

"007": "1004",//Current air pressure (in hPa)

"003": "1",//Current wind force (unit: level, no transcoding)

"004": "2",//Current wind direction number

"000": "10:25",//Live release time

"005": "79",//Current humidity (unit:%)

"002": "7"//Current temperature (unit: ℃)

}

}

},

"Index": {//Index

"24h": {//Every 24 hours

"101010100": {//Station No

"1001004": [//data category

{

"002": {

"002002": "colder",//index grade

"002003": "It is recommended to wear thick coats and sweaters. The elderly and the infirm should wear coats and woolen coats and sweaters.",//Index interpretation

"002001": "Clothing index"//Index name

},

"000": "20161104",

"005": {

"005001": "Traffic index",//index name

"005003": "The weather is good, but the visibility is very low, the traffic meteorological conditions are very poor, the vehicles drive slowly, and the travel should be minimized.",//Index interpretation

"005002": "Very poor"//Index grade

},

"004": {

"004001": "Cold Index",//Index name

"004003": "The temperature difference between day and night is large, and the air humidity is high, so it is easy to catch a cold. Please pay attention to the appropriate increase or decrease of clothing, and strengthen self-protection to avoid catching a cold.",//Definition of index

"004002": "vulnerable"//Index grade

}

},

{

"002": {

"002002": "colder",//index grade

"002003": "It is recommended to wear thick coats and sweaters. The elderly and the infirm should wear coats and woolen coats and sweaters.",//Index interpretation

"002001": "Clothing index"//Index name

},

"000": "20161105",

"005": {

"005001": "Traffic index",//index name

"005003": "The weather is good, the road surface is dry, the traffic weather conditions are good, and the vehicles can run normally.",//Index interpretation

"005002": "Good"//Index grade

},

"004": {

"004001": "Cold Index",//Index name

"004003": "The temperature difference between day and night is very large, and colds are easy to occur. Please pay attention to the appropriate increase or decrease of clothing, and strengthen self-protection to avoid colds.",//Index definition

"004002": "vulnerable"//Index grade

}

},

{

"002": {

"002002": "colder",//index grade

"002003": "It is recommended to wear thick coats and sweaters. The elderly and the infirm should wear coats and woolen coats and sweaters.",//Index interpretation

"002001": "Clothing index"//Index name

},

"000": "20161106",

"005": {

"005001": "Traffic index",//index name

"005003": "On cloudy days, the road is dry, the traffic weather conditions are good, and the vehicle can run normally.",//Index interpretation

"005002": "Good"//Index grade

},

"004": {

"004001": "Cold Index",//Index name

"004003": "Various meteorological conditions are suitable, there is no obvious cooling process, and the probability of colds is low."//Index interpretation

"004002": "seldom issued"//Index grade

}

}

],

"000": "201611040800"//Update time

}

}

}

}

Data encoding

Product Category Code Table

code Chinese name English name
001 prediction forecast
002 Live observe
003 early warning alarm
004 index index
006 air quality air

Data frequency table

data type update frequency
Conventional forecast Three times a day at 08:00, 12:00 and 18:00
Live Update every hour
early warning It is updated irregularly. In order to ensure the timeliness of early warning, it is recommended that the procedure should be rotated every 10 minutes after starting
index Three times a day at 08:00, 12:00 and 18:00
air quality Update every hour

Wind direction number table

Wind direction number Chinese name English name
zero No continuous wind direction No wind
one northeasterly wind Northeast
two east wind East
three Southeast wind Southeast
four Southerly wind South
five Southwest wind Southwest
six westerly West
seven northwest wind Northwest
eight north wind North
nine Rotating wind Whirl wind

Wind number table

Wind number Chinese name English name
zero breeze <5.4m/s
one Level 3-4 5.5~7.9m/s
two Level 4-5 8.0~10.7m/s
three Level 5-6 10.8~13.8m/s
four Grade 6-7 13.9~17.1m/s
five Grade 7-8 17.2~20.7m/s
six Grade 8-9 20.8~24.4m/s
seven Grade 9-10 24.5~28.4m/s
eight Grade 10-11 28.5~32.6m/s
nine Grade 11-12 32.7~36.9m/s

Weather phenomenon code table

Weather phenomenon code Chinese name English name
zero Clear Sunny
one cloudy Cloudy
two Yin Overcast
three shower Shower
four thunder shower Thundershower
five Thunderstorm accompanied by hail Thundershower with hail
six sleet Sleet
seven light rain Light rain
eight moderate rain Moderate rain
nine heavy rain Heavy rain
ten rainstorm Storm
eleven Heavy rain Heavy storm
twelve Heavy rain Severe storm
thirteen snow shower Snow flurry
fourteen light snow Light snow
fifteen moderate snow Moderate snow
sixteen heavy snow Heavy snow
seventeen Blizzard Snowstorm
eighteen fog Foggy
nineteen Freezing rain Ice rain
twenty sand storm Duststorm
twenty-one Light to moderate rain Light to moderate rain
twenty-two Moderate to heavy rain Moderate to heavy rain
twenty-three Heavy to rainstorm Heavy rain to storm
twenty-four Heavy rain to heavy rain Storm to heavy storm
twenty-five Heavy rain to heavy rain Heavy to severe storm
twenty-six Light to moderate snow Light to moderate snow
twenty-seven Moderate to heavy snow Moderate to heavy snow
twenty-eight Heavy to blizzard Heavy snow to snowstorm
twenty-nine Floating dust Dust
thirty Sand blowing Sand
thirty-one Strong sandstorm Sandstorm
fifty-three Haze Haze
ninety-nine nothing Unknown
thirty-two dense fog Dense fog
forty-nine Strong fog Strong fog
fifty-four Moderate haze Moderate haze
fifty-five Severe haze Severe haze
fifty-six Severe haze Severe haze
fifty-seven dense fog Dense fog
fifty-eight Extremely strong fog Extra heavy fog
three hundred and one rain rain
three hundred and two snow snow

Php request code example (ip)

            	

<? php

$url=' http://api.weatherdt.com/common/?area=101020100&type=forecast&key=XXXXXX ';

$resultJson=file_get_contents($url);

echo $resultJson;

?>

Example of JAVA request code (ip)

            	

URL url = new URL(" http://api.weatherdt.com/common/?area=101020100&type=forecast&key=XXXXXX ");

HttpURLConnection uRLConnection = (HttpURLConnection)url.openConnection();

uRLConnection.setDoOutput(true);

uRLConnection.connect();

InputStream is = uRLConnection.getInputStream();

BufferedReader br = new BufferedReader(new InputStreamReader(is));

String respJson = "";

String readLine = null;

while((readLine =br.readLine()) != null){

respJson +=readLine;

}

is.close();

br.close();

uRLConnection.disconnect();

Example of C # request code (domain name)

            	

string url = " http://api.weatherdt.com/common/?area=101010100 |101010200&type=forecast&key="XXXXXXXX";

Uri httpURL = new Uri(url,true);

HttpWebRequest httpReq = (HttpWebRequest)WebRequest. Create(httpURL);

HttpWebResponse httpResp = (HttpWebResponse)httpReq. GetResponse();

Stream respStream = httpResp.GetResponseStream();

StreamReader respStreamReader = new StreamReader(respStream, Encoding.UTF8);

string jsonContent=respStreamReader.ReadToEnd();

Console.WriteLine(jsonContent);

Graphic Product Documentation

Interface URL

http://api.weatherdt.com/pic/?area=101&type=1001&date=20160822&key=613e381aa0e0c9d377e2bce4cf14db87

Area: region, (101) national

Type: picture type, only one type can be requested

Date: picture date, format (YYYYMMDD)

Key: key

Description of the json string returned by the product

				

{

"Date": "20160822",//Date

"Pictype": "1001",//Graphic product type

"Content": [//Image address and time

{

"Picurl": "",//Image address

"Time": "201600820080002400"//Image date

},

{

"Picurl": "",//Image address

"Time": "201600820080004800"//Image date

}]

}

Interface error code table

code Error description remarks
CC1000 Parameter error Check parameter spelling
CC1100 connection timed out Please visit later
CC1101 Key error Check key
CC1102 Access date is out of order date range Access date is out of order date range
CC1103 Cache expired Cache expired
CC1200 Request invalid site error Check request site
CC1300 Request Uncustomized Type Data Request Uncustomized Type Data

Download icon

Weather icon download Click Download>>

Alert icon download Click Download>>

common problem

Q: Where can I download the usage documents?

A: In User Center [Order Management], [My Order], [Interface Details], click the link to download the purchased station number, elements, and instructions on a new page.

Q: Can I renew or add elements and sites to the original order?

A: User center [Order Management], [My Order], click order change or order renewal, add elements and sites can only use the order change function

Q: Can invoices be provided?

A: Invoices can be provided. When submitting an order, please submit the invoice information at the same time. If no invoice information is submitted at the time of purchase, it will be deemed as waiver of the right to issue invoices, and no invoice of any nature will be issued later. If the invoice is issued by an individual user, the "taxpayer identification number" shall also be provided if it is a company name. If it is not uploaded, the invoice cannot be issued. If a 'VAT invoice' is to be issued, the payment amount must be more than 1000 yuan. The invoicing cycle of this website: the users of the previous calendar month will invoice from the 10th to the 20th of each month, and the invoicing cycle of the next month is needed to complete the transaction in this month. The user can log in to the user center to inquire about the mailing of invoices.

Q: Why does the forecast updated at night have no daytime data?

A: The day has passed, and it is meaningless to forecast the day again when updating the forecast at night. If necessary, users can cache data in the daytime.

Q: Consultation on data beyond the sales scope?

A: If you need data that has not been launched on the platform, you can call 010-68408994 for consultation.

Q: Can the data purchased from the smart weather service cloud platform be resold?

A: According to the electronic contract, the data provided by the platform cannot be sold for the second time without authorization.

Q: How to get the weather phenomenon picture of the weather interface?

A: You can download it from the Help Center - Download icon.

Q: What is the difference between the interface data and the data displayed on the China Weather Network during the test?

A: First, please confirm whether the data of the same site, the same time and the same update time. The data provided by the smart weather service cloud platform and the data from China Weather Network are the same data source. If you have any questions, please call the after-sales support hotline 010-58991542.

Q: How to view your own key?

A: There are two ways: one is to view it on Order Management, My Order and Interface Details in the user center; One is [Order Management], in the product name column of [My Order], click the domestic site, and the details will pop up to see the key.

Interface commissioning

send out
parameter Return Results
type: forecast
area: 101160901|101160801
key: fd034bf8fe70289698ec4ea79876feaa



※ Description of internal user interface

Product Overview

brief introduction

This document is used to describe the downloading of authorized data by cloud platform users after they are authorized.

Download range

Users can download all files from the date of authorization after they are authorized by a certain type of data.

File download

Download Preparation

Log in through the user login button User Center - Usage Record , find the aid and akey of the current account, and find the code bucketName of this type of data in the authorized data list.

Download process

Note: This platform supports two ways to download files, one is interface calling, the other is shell script execution. Download source code

1、 Interface process demonstration:

1. Open the downloaded source code package ->Interface calling method ->FlieDownloadProcess.java, and import the associated jar package

2. Modify the variable of main method in java file

① Aid: the user's aid;

② Akey: user's akey;

③ BucketName: the user's authorized data code;

④ DownloadPathPre: the target path of the file download.

3. Execute the main method of FlieDownloadProcess.java to obtain the downloaded file


public static void main(String[] args) {

//TODO user modification

String aid = "3ab50537ff444cedb8d10573ea81";

String akey = "9e2fd4b5b6d54cd5b5297f937a64";

String bucketName = "product-nmc-nwpr-eki";

String downloadPathPre = "D:\\user\\file\\";

try {

System.out.println("download file start!");

//1. Get BucketId Example

String bucketId = getBucketIdByName(aid, akey, bucketName);

//2. Obtain an example of downloadable file information. The return type is JSONArray, which may be null. Null value judgment is required to avoid null pointers

JSONArray downFileIds = getDownFileIds(aid, akey, bucketId);

for (int i = 0; i < (downFileIds != null ? downFileIds.size() : 0); i++) {

JSONObject jo = JSON.parseObject(downFileIds.get(i).toString());

//3. Sample download application

String fileId = jo.getString("fileId");

String targetFileName = jo.getString("name");

JSONObject downApply = downApply(fileId, aid, akey, bucketId);

//4. Example of downloading

String downloadURL = downApply.getString("downloadURL");

String downloadToken = downApply.getString("downloadToken");

down(downloadURL, downloadToken, downloadPathPre + targetFileName);

}

System.out.println("download file end");

} catch (Exception e) {

e.printStackTrace();

}

}

2、 Demonstration of shell script execution:

1. Configure environment variables, open the downloaded source code package ->shell script, and place the jq file in any directory of Linux;

     ①[ root@localhost json]# pwd

     /user/json

     [ root@localhost json]# clear

     [ root@localhost json]# pwd

     /user/json

     [ root@localhost json]#  vi ~/.bash_profile

     # .bash_profile

     # Get the aliases and functions

     if [ -f ~/.bashrc ]; then

        . ~/. bashrc

     fi

     # User specific environment and startup programs

     ②PATH=$PATH:$HOME/bin: /User/json (the directory of jq in the first step)

     export PATH

     ③[ root@localhost json]#  source ~/.bash_profile

2. Modify authentication information

      aid=92775b34be5e4e89b47a82ba (User's aid

      akey=34243172bd030e04eae0c62 (User's akey


3. Perform download operation

   [ root@localhost user]# sh d.sh radar-png-az9734  /user/download

    200

    download success!


Error code table

code Error description remarks
B00001 Missing required parameter Please visit later
C00004 Insufficient operation authority Please check the authorization data
I00003 Illegal storage area or file permissions Please check whether the data has permission to modify
I00004 Store or file does not exist File not uploaded
I70203 User AID parameter error User AID ID error
I00021 Time parameter verification error Please confirm the upload time format

Consultation&Suggestions