欢迎来到淘码网(TMA.CN)

实时天气、历史天气、天气预报,想要的天气我们都有-易源在手,天气无忧

价格: ¥ 99 积分可抵¥ 1

最后更新: 2019-12-15 20:54:33

演示地址:

安装费: 免费

分类
类 型
品 牌
语 言
数据库
是否加密
是否授权
大小
10 MB
发货方式
自动发货
下载方式
远程下载

API接口

GPS经纬度坐标查询7天预报详情
查询地名对应的id
景点名称查询天气改
区号邮编查询天气
IP查询7天预报详情
id或地名查询未来15天预报
id或地名查询历史天气
id或地名查询7天预报详情
id或地名查询24小时预报

GPS经纬度坐标查询7天预报详情

调用地址:http(s)://weather01.market.alicloudapi.com/gps-to-weather

请求方式:GET

返回类型:JSON

API 调用:API 简单身份认证调用方法(APPCODE)展开API 签名认证调用方法(AppKey & AppSecret)

调试工具:去调试

请求参数(Headers)

无参数

请求参数(Query)
名称类型是否必须描述
fromSTRING必选输入的坐标类型: 1:GPS设备获取的角度坐标; 2:GPS获取的米制坐标、sogou地图所用坐标; 3:google地图、soso地图、aliyun地图、mapabc地图和amap地图所用坐标 4:3中列表地图坐标对应的米制坐标 5:百度地图采用的经纬度坐标 6:百度地图采用的米制坐标 7:mapbar地图坐标; 8:51地图坐标
latSTRING必选纬度值
lngSTRING必选经度值
need3HourForcastSTRING可选是否需要当天每3/6小时一次的天气预报列表。1为需要,0为不需要。
needAlarmSTRING可选是否需要天气预警。1为需要,0为不需要。
needHourDataSTRING可选是否需要每小时数据的累积数组。由于本系统是半小时刷一次实时状态,因此实时数组最大长度为48。每天0点长度初始化为0. 1为需要 0为不
needIndexSTRING可选是否需要返回指数数据,比如穿衣指数、紫外线指数等。1为返回,0为不返回。
needMoreDaySTRING可选是否需要返回7天数据中的后4天。1为返回,0为不返回。
请求参数(Body)

无参数

请求示例
curl
Java
C#
PHP
Python
ObjectC
curl -i -k --get --include 'https://weather01.market.alicloudapi.com/gps-to-weather?from=5&lat=40.242266&lng=116.2278&need3HourForcast=0&needAlarm=0&needHourData=0&needIndex=0&needMoreDay=0'  -H 'Authorization:APPCODE 你自己的AppCode'
    正常返回示例
    {
    	"showapi_res_code": 0,
    	"showapi_res_error": "",
    	"showapi_res_body": {
    		"cityInfo": {//查询的地区基本资料
    	      "c6": "yunnan",//城市所在省英文名
    	      "c5": "丽江",//城市所在市中文名
    	      "c4": "lijiang",//城市所在市英文名
    	      "c3": "丽江",//城市中文名
    	      "c9": "中国",//城市所在国家中文名
    	      "c8": "china",//城市所在国家英文名
    	      "c7": "云南",//城市所在省中文名
    	      "c17": "+8",
    	      "c16": "AZ9888",//雷达站号
    	      "c1": "101291401",//区域id
    	      "c2": "lijiang",//城市英文名
    	      "c11": "0888",//城市区号
    	      "longitude": 100.222,//经度
    	      "c10": "2",//城市级别
    	      "latitude": 26.903,//纬度
    	      "c12": "674100",//邮编
    	      "c15": "2394"//海拔
    	    },
    		"now": {//现在实时的天气情况
    			"aqi": "71",  //空气质量指数,越小越好
    			"aqiDetail": { //aqi明细数据
    				"aqi": "71",  
    				"area": "北京",
    				"area_code": "beijing",
    				"co": "0.817", //一氧化碳1小时平均
    				"no2": "52",  //二氧化氮1小时平均
    				"o3": "33", //臭氧1小时平均
    				"o3_8h": "9", //臭氧8小时平均
    				"pm10": "56", //颗粒物(粒径小于等于10μm)1小时平均
    				"pm2_5": "51", //颗粒物(粒径小于等于2.5μm)1小时平均
    				"primary_pollutant": "颗粒物(PM2.5)",
    				"quality": "良", //空气质量指数类别,有“优、良、轻度污染、中度污染、重度污染、严重污染”6类
    				"so2": "3" //二氧化硫1小时平均
    			},
    			"sd": "70%",  //空气湿度
    			"temperature": "15", //当前气温
    			"temperature_time": "18:30",  //采集时间
    			"weather": "晴",  //天气文字标识
    			"weather_pic": "http://appimg.showapi.com/images/weather/icon/day/00.png", //天气图片地址
    			"wind_direction": "北风",  //风向名称
    			"wind_power": "1级"  //风力
    		},
    		"f1": {//今天的天气预报 ,f2是明天,f3是后天,直到f7
    			"air_press": "1008 hPa",  //大气压
    			"day": "20151023",   //日期
    			"day_air_temperature": "18",  //白天天气温度(摄氏度)
    			"day_weather": "晴", //白天天气标识
    			"day_weather_pic": "http://app1.showapi.com/weather/icon/day/00.png", //白天天气图标
    			"day_wind_direction": "无持续风向", //白天风向 
    			"day_wind_power": "微风<10m/h", //白天风力
    			"jiangshui": "3%",  //降水概率
    			"night_air_temperature": "9",  //晚上气温(摄氏度)
    			"night_weather": "晴",//晚上天气标识
    			"night_weather_pic": "http://app1.showapi.com/weather/icon/night/00.png", //晚上天气图标
    			"night_wind_direction": "无持续风向", //晚上风向
    			"night_wind_power": "微风<10m/h", //晚上风力 
    			"sun_begin_end": "06:35|17:23",  //日出|日落时间
    			"weekday": 5,					//星期几
    			"ziwaixian": "中等",			//紫外线强度
    			"index": {
    				 "yh": {//约会指数
    		          "title": "较不适宜",
    		          "desc": "建议尽量不要去室外约会。"
    		        },
    		        "ls": {//晾晒指数
    		          "title": "不宜",
    		          "desc": "降水可能会淋湿衣物,请选择在室内晾晒。"
    		        },
    		        "clothes": {//穿衣指数
    		          "title": "较舒适",
    		          "desc": "建议穿薄外套或牛仔裤等服装。"
    		        },
    		        "dy": {//钓鱼指数
    		          "title": "不宜",
    		          "desc": "天气不好,不适宜垂钓。"
    		        },
    		        "beauty": {//化妆指数
    		          "title": "保湿",
    		          "desc": "请选用中性保湿型霜类化妆品。"
    		        },
    		        "xq": {//心情指数
    		          "title": "较差",
    		          "desc": "雨水可能会使心绪无端地挂上轻愁。"
    		        },
    		        "travel": {//旅游
    		          "title": "适宜",
    		          "desc": "较弱降水和微风将伴您共赴旅程。"
    		        },
    		        "hc": {//划船指数
    		          "title": "不适宜",
    		          "desc": "天气不好,建议选择别的娱乐方式。"
    		        },
    		        "zs": {//中暑指数
    		          "title": "无",
    		          "desc": "气温不高,中暑几率极低。"
    		        },
    		        "cold": {//感冒
    		          "title": "较易发",
    		          "desc": "降温幅度较大,预防感冒。"
    		        },
    		        "gj": {//逛街指数
    		          "title": "较适宜",
    		          "desc": "有降水,逛街需要带雨具。"
    		        },
    		        "uv": {//紫外线
    		          "title": "最弱",
    		          "desc": "辐射弱,涂擦SPF8-12防晒护肤品。"
    		        },
    		        "cl": {//晨练指数
    		          "title": "较不宜",
    		          "desc": "室外锻炼请携带雨具。"
    		        },
    		        "glass": {//太阳镜
    		          "title": "不需要",
    		          "desc": "白天能见度差不需要佩戴太阳镜"
    		        },
    		        "wash_car": {//洗车
    		          "title": "不宜",
    		          "desc": "有雨,雨水和泥水会弄脏爱车。"
    		        },
    		        "aqi": {//空气质量指数,越小越好
    		          "title": "中",
    		          "desc": "无需特别防护"
    		        },
    		        "ac": {//空调控制
    		          "title": "较少开启",
    		          "desc": "体感舒适,不需要开启空调。"
    		        },
    		        "mf": {//美发指数
    		          "title": "一般",
    		          "desc": "建议选用防晒滋润型护发品或带遮阳帽。"
    		        },
    		        "ag": {//过敏指数
    		          "title": "极不易发",
    		          "desc": "无需担心过敏,可放心外出,享受生活。"
    		        },
    		        "pj": {//啤酒指数
    		          "title": "较适宜",
    		          "desc": "适量的饮用啤酒,注意不要过量。"
    		        },
    		        "nl": {//夜生活指数
    		          "title": "较不适宜",
    		          "desc": "建议夜生活最好在室内进行。"
    		        },
    		        "pk": {//放风筝指数
    		          "title": "不宜",
    		          "desc": "天气不好,不适宜放风筝。"
    		        }
    			},
    			"alarmList": [
    				{
    					"city": "大连",  //预警城市
    					"issueContent": "大风蓝色预警:预计23日23时到24日08时:大连、锦州、营口、盘锦、葫芦岛地区陆地偏北风6级,阵风7级;渤海、渤海海峡、黄海北部偏北风7级,阵风8级。大连、丹东、锦州、营口、盘锦、葫芦岛附近海域和航线将受影响,请注意防范。省气象灾害预警中心10月23日16时35分发布",
    					"issueTime": "2015-10-23 16:40:00",
    					"province": "辽宁省",
    					"signalLevel": "蓝色",
    					"signalType": "大风"
    				}
    			],
    			"3hourForcast": [
    				{
    					"hour": "20时-23时 ",
    					"temperature": "12℃/10℃",
    					"weather": "晴",
    					"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
    					"wind_direction": "无持续风向",
    					"wind_power": "微风"
    				},
    				{
    					"hour": "23时-02时 ",
    					"temperature": "10℃/9℃",
    					"weather": "晴",
    					"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
    					"wind_direction": "无持续风向",
    					"wind_power": "微风"
    				},
    				{
    					"hour": "02时-05时 ",
    					"temperature": "10℃/9℃",
    					"weather": "晴",
    					"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
    					"wind_direction": "无持续风向",
    					"wind_power": "微风"
    				},
    				{
    					"hour": "05时-08时 ",
    					"temperature": "13℃/10℃",
    					"weather": "晴",
    					"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
    					"wind_direction": "无持续风向",
    					"wind_power": "微风"
    				}
    			]
    		},
    		"hourDataList": [ //当天每半小时数据的累积数组。当天0点清空重新累积。
    			{
    				"aqi": "53",
    				"aqiDetail": {
    		          "num": "12",
    		          "co": "0.3",
    		          "area": "北京",
    		          "so2": "3",
    		          "o3": "52",
    		          "no2": "16",
    		          "aqi": "32",
    		          "quality": "优质",
    		          "pm10": "15",
    		          "pm2_5": "6",
    		          "o3_8h": "62",
    		          "primary_pollutant": ""
    		        },
    				"sd": "85%",
    				"temperature": "9",
    				"temperature_time": "00:00",
    				"weather": "多云",
    				"weather_pic": "http://appimg.showapi.com/images/weather/icon/night/01.png",
    				"wind_direction": "北风",
    				"wind_power": "1级"
    			},
    			{
    				"aqi": "53",
    				"aqiDetail": {},
    				"sd": "81%",
    				"temperature": "10",
    				"temperature_time": "00:30",
    				"weather": "多云",
    				"weather_pic": "http://appimg.showapi.com/images/weather/icon/night/01.png",
    				"wind_direction": "北风",
    				"wind_power": "1级"
    			} 
    		],
    		"ret_code": 0,
    		"time": "20151023180000"
    	}
    }
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    失败返回示例

    无数据

    错误码定义

    无数据

    0 (0%)

    好评

    0 (0%)

    中评

    0 (0%)

    差评

    • 在线客服

      点击这里给我发消息 点击这里给我发消息

      官方微信

      仅处理投诉、举报及平台使用问题;
      商品问题请咨询商家客服!

    浏览记录