通过IP地址获取IP对应的区域信息,再根据区域信息获取对应的天气情况

| 参数名称 | 类型 | 示例值 | 必须 | 描述 |
|---|---|---|---|---|
| content-type | String | application/x-www-form-urlencoded | 否 |
| 参数名称 | 类型 | 示例值 | 必须 | 描述 |
|---|---|---|---|---|
| ip | String | 113.78.19.201 | 否 | 要查询天气的ip地址,如果不写,则系统取客户端的ip地址。 |
| needMoreDay | String | 0 | 否 | 是否需要返回7天数据中的后4天。1为返回,0为不返回。 |
| needIndex | String | 0 | 否 | 是否需要返回指数数据,比如穿衣指数、紫外线指数等。1为返回,0为不返回。 |
| needHourData | String | 0 | 否 | 是否需要每小时数据的累积数组。由于本系统是半小时刷一次实时状态,因此实时数组最大长度为48。每天0点长度初始化为0. 1为需要 0为不 |
| need3HourForcast | String | 0 | 否 | 是否需要当天每3/6/8小时一次的天气预报列表。1为需要,0为不需要。注意f1是3小时间隔,但f2到f7的间隔可能是6或8小时。 |
| needAlarm | String | 0 | 否 | 是否需要天气预警。1为需要,0为不需要。 |
showapi_res_body 系统封装,业务数据均位于该对象内;系统级字段见。curl -X POST "https://route.showapi.com/9-4?appKey=YOUR_APPKEY" \
-H "content-type: application/x-www-form-urlencoded" \
-d "ip=113.78.19.201&needMoreDay=0&needIndex=0&needHourData=0&need3HourForcast=0&needAlarm=0"{
"showapi_res_error": "",
"showapi_res_code": 0,
"showapi_res_id": "5fd9a6c68d57bae137f349d2",
"showapi_res_body": {
"ret_code": 0,
"time": "20201216120000",
"cityInfo": {
"c6": "yunnan",
"c5": "丽江",
"c4": "lijiang",
"c3": "丽江",
"c9": "中国",
"c8": "china",
"c7": "云南",
"c17": "+8",
"c16": "AZ9888",
"c1": "",
"c2": "lijiang",
"c0": "530700",
"longitude": 100.222,
"c11": "0888",
"latitude": 26.903,
"c10": "2",
"c12": "674100",
"c15": "2394"
},
"now": {
"aqiDetail": {
"co": "0.8",
"num": "138",
"area": "丽江",
"so2": "6",
"o3": "76",
"no2": "12",
"quality": "优质",
"aqi": "50",
"pm10": "50",
"pm2_5": "17",
"o3_8h": "76",
"primary_pollutant": ""
},
"weather_code": "00",
"temperature_time": "14:00",
"wind_direction": "西南风",
"wind_power": "3级",
"sd": "15%",
"aqi": "50",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"rain": "0.0",
"temperature": "15"
},
"alarmList": [
{
"signalLevel": "蓝色",
"issueContent": "丽江市气象台12月14日11时30分发布大风蓝色预警:预计未来12小时,我市大部地区平均风力4~5级,局地阵风可达7级以上,容易造成树枝刮断,宣传牌吹落、轻质屋顶掀起、塑料大棚破损、水面小型船只倾覆和引发各类火灾等危害,请加强防范。(预警信息来源:国家预警信息发布中心)",
"issueTime": "2020-12-14 11:34:25",
"province": "云南省",
"signalType": "大风",
"city": "丽江市"
},
{
"signalLevel": "蓝色",
"issueContent": "云南省气象台2020年12月14日11时发布大风蓝色预警:预计未来12小时,迪庆、丽江、大理、楚雄、昆明、玉溪北部、红河北部、曲靖西部平均风力可达5到6级,阵风7到8级,请注意防范。(预警信息来源:国家预警信息发布中心)",
"province": "云南省",
"issueTime": "2020-12-14 11:04:57",
"signalType": "大风",
"city": ""
}
],
"showapi_fee_code": 0,
"f1": {
"night_weather_code": "00",
"day_weather": "晴",
"night_weather": "晴",
"index": {
"yh": {
"title": "较适宜",
"desc": "虽然有点风,不用担心天气来调皮捣乱而影响了兴致。"
},
"ls": {
"title": "适宜",
"desc": "天气不错,适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧!"
},
"clothes": {
"title": "较冷",
"desc": "建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"
},
"dy": {
"title": "较适宜",
"desc": "较适合垂钓,但风力稍大,会对垂钓产生一定的影响。"
},
"sports": {
"title": "较适宜",
"desc": "温较低,推荐您进行室内运动。"
},
"travel": {
"title": "适宜",
"desc": "天气较好,温度适宜,是个好天气哦。这样的天气适宜旅游,您可以尽情地享受大自然的风光。"
},
"beauty": {
"title": "防晒",
"desc": "温湿适宜,最好使用SPF20以上防晒霜打底,建议使用中性保湿型化妆品。"
},
"xq": {
"title": "好",
"desc": "天气较好,空气温润,和风飘飘,美好的天气会带来一天接踵而来的好心情。"
},
"hc": {
"title": "较适宜",
"desc": "气温低注意及时添衣,小心着凉。"
},
"zs": {
"title": "无中暑风险",
"desc": "天气舒适,令人神清气爽的一天,不用担心中暑的困扰。"
},
"cold": {
"title": "少发",
"desc": "各项气象条件适宜,无明显降温过程,发生感冒机率较低。"
},
"gj": {
"title": "适宜",
"desc": "天气较好,在这种天气里去逛街,既可畅快地放松身心,又会有很多意外收获,真是无比惬意。"
},
"comfort": {
"title": "较好",
"desc": "偏凉或凉,部分人感觉不舒适"
},
"uv": {
"title": "很强",
"desc": "紫外线辐射极强,建议涂擦SPF20以上、PA++的防晒护肤品,尽量避免暴露于日光下。"
},
"cl": {
"title": "适宜",
"desc": "天气不错,空气清新。"
},
"glass": {
"title": "必要",
"desc": "白天天气晴朗,太阳辐射较强,建议佩戴透射比1级且标注UV380-UV400的遮阳镜"
},
"aqi": {
"title": "良好",
"desc": "可以正常在户外活动,易敏感人群应减少外出"
},
"ac": {
"title": "较少开启",
"desc": "您将感到很舒适,一般不需要开启空调。"
},
"wash_car": {
"title": "较适宜",
"desc": "较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"
},
"mf": {
"title": "一般",
"desc": "空气干燥,出门前要在头发上涂上含防晒和滋润成分的护发品,或备好遮阳帽、遮阳伞,以减轻太阳对头发的直接照射。"
},
"ag": {
"title": "极不易发",
"desc": "天气条件极不易诱发过敏。"
},
"pj": {
"title": "较不适宜",
"desc": "您将会感到有些凉意,建议饮用常温啤酒,并少量饮用为好。"
},
"nl": {
"title": "较适宜",
"desc": "天气较好,虽然有点风,比较适宜夜生活。"
},
"pk": {
"title": "适宜",
"desc": "天气不错,这种天气去放风筝既可以舒展筋骨,又可放松身心,超然自逸于广袤的天地之间。"
}
},
"jiangshui": "0%",
"air_press": "753.9hPa",
"night_wind_power": "0-3级 <5.4m/s",
"day_wind_power": "0-3级 <5.4m/s",
"day_weather_code": "00",
"3hourForcast": [
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "14",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "8时-11时",
"temperature_min": "6",
"temperature": "6"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "16",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "11时-14时",
"temperature_min": "6",
"temperature": "14"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "16",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "14时-17时",
"temperature_min": "14",
"temperature": "16"
},
{
"precip": "0.0",
"wind_direction": "西南风",
"wind_power": "<3级",
"temperature_max": "16",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "17时-20时",
"temperature_min": "11",
"temperature": "15"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "15",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "20时-23时",
"temperature_min": "8",
"temperature": "11"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "11",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "23时-2时",
"temperature_min": "3",
"temperature": "8"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "8",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "2时-5时",
"temperature_min": "3",
"temperature": "3"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "5",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "5时-8时",
"temperature_min": "3",
"temperature": "3"
}
],
"sun_begin_end": "08:00|18:28",
"ziwaixian": "很强",
"day_weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"weekday": 3,
"night_air_temperature": "2",
"day_wind_direction": "无持续风向",
"day_air_temperature": "17",
"night_wind_direction": "无持续风向",
"night_weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"day": "20201216"
},
"f3": {
"night_weather_code": "00",
"day_weather": "小雨",
"night_weather": "晴",
"index": {
"yh": {
"title": "较不适宜",
"desc": "室外有风,而且有降水,会给室外约会带来一些不便,如果外出约会,请一定做好准备。"
},
"ls": {
"title": "不宜",
"desc": "有降水,不适宜晾晒。若需要晾晒,请在室内准备出充足的空间。"
},
"clothes": {
"title": "较冷",
"desc": "建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"
},
"dy": {
"title": "不宜",
"desc": "天气不好,有风,不适合垂钓。"
},
"sports": {
"title": "较不宜",
"desc": "有降水,推荐您在室内进行休闲运动。"
},
"travel": {
"title": "适宜",
"desc": "温度适宜,又有较弱降水和微风作伴,会给您的旅行带来意想不到的景象,适宜旅游,可不要错过机会呦!"
},
"beauty": {
"title": "保湿",
"desc": "皮肤易缺水,用润唇膏后再抹口红,用保湿型霜类化妆品。"
},
"xq": {
"title": "较差",
"desc": "有降水,雨水可能会使心绪无端地挂上轻愁,与其因下雨而无精打采,不如放松心情,好好欣赏一下雨景。你会发现雨中的世界是那般洁净温和、清新葱郁。"
},
"hc": {
"title": "不适宜",
"desc": "天气不好,建议选择别的娱乐方式。"
},
"zs": {
"title": "无中暑风险",
"desc": "天气不热,在炎炎夏日中十分难得,可以告别暑气漫漫啦~"
},
"cold": {
"title": "少发",
"desc": "各项气象条件适宜,无明显降温过程,发生感冒机率较低。"
},
"gj": {
"title": "较不宜",
"desc": "有降水,较不适宜逛街,若坚持出门,请带上雨具避免淋雨。"
},
"comfort": {
"title": "较好",
"desc": "偏凉或凉,部分人感觉不舒适"
},
"uv": {
"title": "最弱",
"desc": "属弱紫外线辐射天气,无需特别防护。若长期在户外,建议涂擦SPF在8-12之间的防晒护肤品。"
},
"cl": {
"title": "不宜",
"desc": "有较强降水,风力稍大,请避免户外晨练,建议在室内做适当锻炼,保持身体健康。"
},
"glass": {
"title": "不需要",
"desc": "白天有降水天气,视线较差,不需要佩戴太阳镜"
},
"aqi": {
"title": "良好",
"desc": "可以正常在户外活动,易敏感人群应减少外出"
},
"ac": {
"title": "较少开启",
"desc": "您将感到很舒适,一般不需要开启空调。"
},
"wash_car": {
"title": "不宜",
"desc": "不宜洗车,未来24小时内有雨,如果在此期间洗车,雨水和路上的泥水可能会再次弄脏您的爱车。"
},
"mf": {
"title": "适宜",
"desc": "洗发后最好用毛巾把头发吸干,若用吹风机,吹风前记得用适合干性发质的护发素,吹风时保持10cm距离,风的温度不要太高。"
},
"ag": {
"title": "极不易发",
"desc": "天气条件极不易诱发过敏,有降水,出行注意携带雨具。"
},
"pj": {
"title": "较不适宜",
"desc": "您将会感到有些凉意,建议饮用常温啤酒,并少量饮用为好。"
},
"nl": {
"title": "较不适宜",
"desc": "有风,且有降水,会给您的出行带来很大的不便,建议就近或最好在室内进行夜生活。"
},
"pk": {
"title": "不宜",
"desc": "天气不好,不适宜放风筝。"
}
},
"jiangshui": "88%",
"air_press": "752.7hPa",
"night_wind_power": "0-3级 <5.4m/s",
"day_wind_power": "0-3级 <5.4m/s",
"day_weather_code": "07",
"3hourForcast": [
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "10",
"weather": "小雨",
"weather_pic": "http://app1.showapi.com/weather/icon/day/07.png",
"hour": "8时-11时",
"temperature_min": "2",
"temperature": "5"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "13",
"weather": "小雨",
"weather_pic": "http://app1.showapi.com/weather/icon/day/07.png",
"hour": "11时-14时",
"temperature_min": "5",
"temperature": "10"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "13",
"weather": "小雨",
"weather_pic": "http://app1.showapi.com/weather/icon/day/07.png",
"hour": "14时-17时",
"temperature_min": "10",
"temperature": "13"
},
{
"precip": "0.1",
"wind_direction": "西南风",
"wind_power": "<3级",
"temperature_max": "13",
"weather": "小雨",
"weather_pic": "http://app1.showapi.com/weather/icon/day/07.png",
"hour": "17时-20时",
"temperature_min": "6",
"temperature": "13"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "13",
"weather": "多云",
"weather_pic": "http://app1.showapi.com/weather/icon/night/01.png",
"hour": "20时-23时",
"temperature_min": "3",
"temperature": "6"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "6",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "23时-2时",
"temperature_min": "1",
"temperature": "3"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "3",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "2时-5时",
"temperature_min": "0",
"temperature": "1"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "1",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"hour": "5时-8时",
"temperature_min": "0",
"temperature": "0"
}
],
"sun_begin_end": "08:01|18:29",
"ziwaixian": "最弱",
"day_weather_pic": "http://app1.showapi.com/weather/icon/day/07.png",
"weekday": 5,
"night_air_temperature": "0",
"day_wind_direction": "无持续风向",
"day_air_temperature": "14",
"night_wind_direction": "无持续风向",
"night_weather_pic": "http://app1.showapi.com/weather/icon/night/00.png",
"day": "20201218"
},
"f2": {
"night_weather_code": "06",
"day_weather": "晴",
"night_weather": "雨夹雪",
"index": {
"yh": {
"title": "较适宜",
"desc": "虽然有点风,不用担心天气来调皮捣乱而影响了兴致。"
},
"ls": {
"title": "适宜",
"desc": "天气不错,适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧!"
},
"clothes": {
"title": "较冷",
"desc": "建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"
},
"dy": {
"title": "较适宜",
"desc": "较适合垂钓,但风力稍大,会对垂钓产生一定的影响。"
},
"sports": {
"title": "较适宜",
"desc": "温较低,推荐您进行室内运动。"
},
"travel": {
"title": "适宜",
"desc": "天气较好,温度适宜,是个好天气哦。这样的天气适宜旅游,您可以尽情地享受大自然的风光。"
},
"beauty": {
"title": "防晒",
"desc": "温湿适宜,最好使用SPF20以上防晒霜打底,建议使用中性保湿型化妆品。"
},
"xq": {
"title": "好",
"desc": "天气较好,空气温润,和风飘飘,美好的天气会带来一天接踵而来的好心情。"
},
"hc": {
"title": "较适宜",
"desc": "气温低注意及时添衣,小心着凉。"
},
"zs": {
"title": "无中暑风险",
"desc": "天气舒适,对易中暑人群来说非常友善。"
},
"cold": {
"title": "少发",
"desc": "各项气象条件适宜,无明显降温过程,发生感冒机率较低。"
},
"gj": {
"title": "适宜",
"desc": "天气较好,在这种天气里去逛街,既可畅快地放松身心,又会有很多意外收获,真是无比惬意。"
},
"comfort": {
"title": "较好",
"desc": "普遍感觉舒适"
},
"uv": {
"title": "很强",
"desc": "紫外线辐射极强,建议涂擦SPF20以上、PA++的防晒护肤品,尽量避免暴露于日光下。"
},
"cl": {
"title": "适宜",
"desc": "天气不错,空气清新。"
},
"glass": {
"title": "必要",
"desc": "白天天气晴朗,太阳辐射较强,建议佩戴透射比1级且标注UV380-UV400的遮阳镜"
},
"aqi": {
"title": "良好",
"desc": "可以正常在户外活动,易敏感人群应减少外出"
},
"ac": {
"title": "较少开启",
"desc": "您将感到很舒适,一般不需要开启空调。"
},
"wash_car": {
"title": "不宜",
"desc": "不宜洗车,未来24小时内有雪,如果在此期间洗车,雪水和路上的泥水可能会再次弄脏您的爱车。"
},
"mf": {
"title": "一般",
"desc": "空气干燥,出门前要在头发上涂上含防晒和滋润成分的护发品,或备好遮阳帽、遮阳伞,以减轻太阳对头发的直接照射。"
},
"ag": {
"title": "极不易发",
"desc": "天气条件极不易诱发过敏。"
},
"pj": {
"title": "较不适宜",
"desc": "您将会感到有些凉意,建议饮用常温啤酒,并少量饮用为好。"
},
"nl": {
"title": "较适宜",
"desc": "天气较好,虽然有点风,比较适宜夜生活。"
},
"pk": {
"title": "适宜",
"desc": "天气不错,这种天气去放风筝既可以舒展筋骨,又可放松身心,超然自逸于广袤的天地之间。"
}
},
"jiangshui": "0%",
"air_press": "752.8hPa",
"night_wind_power": "0-3级 <5.4m/s",
"day_wind_power": "0-3级 <5.4m/s",
"day_weather_code": "00",
"3hourForcast": [
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "12",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "8时-11时",
"temperature_min": "3",
"temperature": "5"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "14",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "11时-14时",
"temperature_min": "5",
"temperature": "12"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "14",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "14时-17时",
"temperature_min": "12",
"temperature": "14"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "14",
"weather": "晴",
"weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"hour": "17时-20时",
"temperature_min": "7",
"temperature": "13"
},
{
"precip": "0.0",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "13",
"weather": "小雨",
"weather_pic": "http://app1.showapi.com/weather/icon/night/07.png",
"hour": "20时-23时",
"temperature_min": "2",
"temperature": "7"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "7",
"weather": "雨夹雪",
"weather_pic": "http://app1.showapi.com/weather/icon/night/06.png",
"hour": "23时-2时",
"temperature_min": "2",
"temperature": "2"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "2",
"weather": "雨夹雪",
"weather_pic": "http://app1.showapi.com/weather/icon/night/06.png",
"hour": "2时-5时",
"temperature_min": "2",
"temperature": "2"
},
{
"precip": "0.1",
"wind_direction": "西风",
"wind_power": "<3级",
"temperature_max": "5",
"weather": "雨夹雪",
"weather_pic": "http://app1.showapi.com/weather/icon/night/06.png",
"hour": "5时-8时",
"temperature_min": "2",
"temperature": "2"
}
],
"sun_begin_end": "08:00|18:28",
"ziwaixian": "很强",
"day_weather_pic": "http://app1.showapi.com/weather/icon/day/00.png",
"weekday": 4,
"night_air_temperature": "2",
"day_air_temperature": "15",
"day_wind_direction": "无持续风向",
"day": "20201217",
"night_weather_pic": "http://app1.showapi.com/weather/icon/night/06.png",
"night_wind_direction": "无持续风向"
}
}
}在 Cherry Studio、ChatBox 等支持 MCP 的客户端中配置,将 {your_appKey} 替换为真实 AppKey(AppKey 管理)。该服务覆盖本接口全部接入点。
{
"mcpServers": {
"showapi-mcp-9": {
"url": "http://www.showapi.com.cn/mcp/9/{your_appKey}"
}
}
}
7*24小时服务
保证您的售后无忧

1v1专属服务
保证服务质量

担保交易
全程担保交易保证资金安全

服务全程监管
全周期保证商品服务质量
© 2015-2023 WWW.SHOWAPI.COM ALL RIGHTS RESERVED.昆明秀派科技有限公司
本网站所列接口及文档全部由SHOWAPI网站提供,并对其拥有最终解释权 POWERED BY SHOWAPI
