异想之旅:本人原创博客完全手敲,绝对非搬运,全网不可能有重复;本人无团队,仅为技术爱好者进行分享,所有内容不牵扯广告。本人所有文章仅在CSDN、掘金和个人博客(一定是异想之旅域名)发布,除此之外全部是盗文!


天气API

官网:https://www.tianqiapi.com/

文档:https://www.tianqiapi.com/index/doc?version=day

官方文档写的很清楚了,这里不再赘述。

上面的文档链接给出的API注册即可使用,无调用限制,可以放心使用。

中国天气网

这个并不是开放的API,是本人抓包整理出来的:

请求地址:http://d1.weather.com.cn/sk_2d/[[1]].html?_=[[2]]

请求方式:GET

Header:{“Referer”: “http://www.weather.com.cn/weather1d/[[1]].shtml”}

参数:

  • [[1]]:填写要查询城市的城市ID(见文末给出了全国所有地级市的ID信息;下同)
  • [[2]]:当前的毫秒级时间戳(目前随意传一个数字似乎就可以)

所有的城市id:

{
  "北京": {
    "北京": {
      "AREAID": "101010100"
    }
  },
  "上海": {
    "上海": {
      "AREAID": "101020100"
    }
  },
  "天津": {
    "天津": {
      "AREAID": "101030100"
    }
  },
  "重庆": {
    "重庆": {
      "AREAID": "101040100"
    }
  },
  "黑龙江": {
    "哈尔滨": {
      "AREAID": "101050101"
    },
    "齐齐哈尔": {
      "AREAID": "101050201"
    },
    "牡丹江": {
      "AREAID": "101050301"
    },
    "佳木斯": {
      "AREAID": "101050401"
    },
    "绥化": {
      "AREAID": "101050501"
    },
    "黑河": {
      "AREAID": "101050601"
    },
    "大兴安岭": {
      "AREAID": "101050701"
    },
    "伊春": {
      "AREAID": "101050801"
    },
    "大庆": {
      "AREAID": "101050901"
    },
    "七台河": {
      "AREAID": "101051002"
    },
    "鸡西": {
      "AREAID": "101051101"
    },
    "鹤岗": {
      "AREAID": "101051201"
    },
    "双鸭山": {
      "AREAID": "101051301"
    }
  },
  "吉林": {
    "长春": {
      "AREAID": "101060101"
    },
    "吉林": {
      "AREAID": "101060201"
    },
    "延边": {
      "AREAID": "101060306"
    },
    "四平": {
      "AREAID": "101060401"
    },
    "通化": {
      "AREAID": "101060501"
    },
    "白城": {
      "AREAID": "101060601"
    },
    "辽源": {
      "AREAID": "101060701"
    },
    "松原": {
      "AREAID": "101060801"
    },
    "白山": {
      "AREAID": "101060901"
    }
  },
  "辽宁": {
    "沈阳": {
      "AREAID": "101070101"
    },
    "大连": {
      "AREAID": "101070201"
    },
    "鞍山": {
      "AREAID": "101070301"
    },
    "抚顺": {
      "AREAID": "101070401"
    },
    "本溪": {
      "AREAID": "101070501"
    },
    "丹东": {
      "AREAID": "101070601"
    },
    "锦州": {
      "AREAID": "101070701"
    },
    "营口": {
      "AREAID": "101070801"
    },
    "阜新": {
      "AREAID": "101070901"
    },
    "辽阳": {
      "AREAID": "101071001"
    },
    "铁岭": {
      "AREAID": "101071101"
    },
    "朝阳": {
      "AREAID": "101071201"
    },
    "盘锦": {
      "AREAID": "101071301"
    },
    "葫芦岛": {
      "AREAID": "101071401"
    }
  },
  "内蒙古": {
    "呼和浩特": {
      "AREAID": "101080101"
    },
    "包头": {
      "AREAID": "101080201"
    },
    "乌海": {
      "AREAID": "101080301"
    },
    "乌兰察布": {
      "AREAID": "101080405"
    },
    "通辽": {
      "AREAID": "101080501"
    },
    "赤峰": {
      "AREAID": "101080601"
    },
    "鄂尔多斯": {
      "AREAID": "101080701"
    },
    "巴彦淖尔": {
      "AREAID": "101080811"
    },
    "锡林郭勒": {
      "AREAID": "101080902"
    },
    "呼伦贝尔": {
      "AREAID": "101081013"
    },
    "兴安盟": {
      "AREAID": "101081108"
    },
    "阿拉善盟": {
      "AREAID": "101081213"
    }
  },
  "河北": {
    "石家庄": {
      "AREAID": "101090101"
    },
    "保定": {
      "AREAID": "101090201"
    },
    "张家口": {
      "AREAID": "101090301"
    },
    "承德": {
      "AREAID": "101090402"
    },
    "唐山": {
      "AREAID": "101090501"
    },
    "廊坊": {
      "AREAID": "101090601"
    },
    "沧州": {
      "AREAID": "101090701"
    },
    "衡水": {
      "AREAID": "101090801"
    },
    "邢台": {
      "AREAID": "101090901"
    },
    "邯郸": {
      "AREAID": "101091001"
    },
    "秦皇岛": {
      "AREAID": "101091101"
    },
    "雄安新区": {
      "AREAID": "101091201"
    }
  },
  "山西": {
    "太原": {
      "AREAID": "101100101"
    },
    "大同": {
      "AREAID": "101100201"
    },
    "阳泉": {
      "AREAID": "101100301"
    },
    "晋中": {
      "AREAID": "101100401"
    },
    "长治": {
      "AREAID": "101100501"
    },
    "晋城": {
      "AREAID": "101100601"
    },
    "临汾": {
      "AREAID": "101100701"
    },
    "运城": {
      "AREAID": "101100801"
    },
    "朔州": {
      "AREAID": "101100901"
    },
    "忻州": {
      "AREAID": "101101001"
    },
    "吕梁": {
      "AREAID": "101101100"
    }
  },
  "陕西": {
    "西安": {
      "AREAID": "101110101"
    },
    "咸阳": {
      "AREAID": "101110200"
    },
    "延安": {
      "AREAID": "101110300"
    },
    "榆林": {
      "AREAID": "101110401"
    },
    "渭南": {
      "AREAID": "101110501"
    },
    "商洛": {
      "AREAID": "101110601"
    },
    "安康": {
      "AREAID": "101110701"
    },
    "汉中": {
      "AREAID": "101110801"
    },
    "宝鸡": {
      "AREAID": "101110901"
    },
    "铜川": {
      "AREAID": "101111001"
    },
    "杨凌": {
      "AREAID": "101111101"
    }
  },
  "山东": {
    "济南": {
      "AREAID": "101120101"
    },
    "青岛": {
      "AREAID": "101120201"
    },
    "淄博": {
      "AREAID": "101120301"
    },
    "德州": {
      "AREAID": "101120401"
    },
    "烟台": {
      "AREAID": "101120501"
    },
    "潍坊": {
      "AREAID": "101120601"
    },
    "济宁": {
      "AREAID": "101120701"
    },
    "泰安": {
      "AREAID": "101120801"
    },
    "临沂": {
      "AREAID": "101120901"
    },
    "菏泽": {
      "AREAID": "101121001"
    },
    "滨州": {
      "AREAID": "101121101"
    },
    "东营": {
      "AREAID": "101121201"
    },
    "威海": {
      "AREAID": "101121301"
    },
    "枣庄": {
      "AREAID": "101121401"
    },
    "日照": {
      "AREAID": "101121501"
    },
    "莱芜": {
      "AREAID": "101121601"
    },
    "聊城": {
      "AREAID": "101121701"
    }
  },
  "新疆": {
    "乌鲁木齐": {
      "AREAID": "101130101"
    },
    "克拉玛依": {
      "AREAID": "101130201"
    },
    "石河子": {
      "AREAID": "101130301"
    },
    "昌吉": {
      "AREAID": "101130401"
    },
    "吐鲁番": {
      "AREAID": "101130501"
    },
    "巴音郭楞": {
      "AREAID": "101130609"
    },
    "阿拉尔": {
      "AREAID": "101130701"
    },
    "阿克苏": {
      "AREAID": "101130801"
    },
    "喀什": {
      "AREAID": "101130901"
    },
    "伊犁": {
      "AREAID": "101131012"
    },
    "塔城": {
      "AREAID": "101131101"
    },
    "哈密": {
      "AREAID": "101131201"
    },
    "和田": {
      "AREAID": "101131301"
    },
    "阿勒泰": {
      "AREAID": "101131401"
    },
    "克州": {
      "AREAID": "101131505"
    },
    "博尔塔拉": {
      "AREAID": "101131604"
    },
    "图木舒克": {
      "AREAID": "101131701"
    },
    "五家渠": {
      "AREAID": "101131801"
    },
    "铁门关": {
      "AREAID": "101131901"
    },
    "昆玉": {
      "AREAID": "101131920"
    },
    "北屯": {
      "AREAID": "101132101"
    },
    "双河": {
      "AREAID": "101132201"
    },
    "可克达拉": {
      "AREAID": "101132301"
    }
  },
  "西藏": {
    "拉萨": {
      "AREAID": "101140101"
    },
    "日喀则": {
      "AREAID": "101140201"
    },
    "山南": {
      "AREAID": "101140301"
    },
    "林芝": {
      "AREAID": "101140401"
    },
    "昌都": {
      "AREAID": "101140501"
    },
    "那曲": {
      "AREAID": "101140601"
    },
    "阿里": {
      "AREAID": "101140701"
    }
  },
  "青海": {
    "西宁": {
      "AREAID": "101150101"
    },
    "海东": {
      "AREAID": "101150207"
    },
    "黄南": {
      "AREAID": "101150305"
    },
    "海南": {
      "AREAID": "101150402"
    },
    "果洛": {
      "AREAID": "101150507"
    },
    "玉树": {
      "AREAID": "101150601"
    },
    "海西": {
      "AREAID": "101150702"
    },
    "海北": {
      "AREAID": "101150804"
    }
  },
  "甘肃": {
    "兰州": {
      "AREAID": "101160101"
    },
    "定西": {
      "AREAID": "101160201"
    },
    "平凉": {
      "AREAID": "101160301"
    },
    "庆阳": {
      "AREAID": "101160401"
    },
    "武威": {
      "AREAID": "101160501"
    },
    "金昌": {
      "AREAID": "101160601"
    },
    "张掖": {
      "AREAID": "101160701"
    },
    "酒泉": {
      "AREAID": "101160801"
    },
    "天水": {
      "AREAID": "101160901"
    },
    "陇南": {
      "AREAID": "101161010"
    },
    "临夏": {
      "AREAID": "101161101"
    },
    "甘南": {
      "AREAID": "101161209"
    },
    "白银": {
      "AREAID": "101161301"
    },
    "嘉峪关": {
      "AREAID": "101161401"
    }
  },
  "宁夏": {
    "银川": {
      "AREAID": "101170101"
    },
    "石嘴山": {
      "AREAID": "101170201"
    },
    "吴忠": {
      "AREAID": "101170301"
    },
    "固原": {
      "AREAID": "101170401"
    },
    "中卫": {
      "AREAID": "101170501"
    }
  },
  "河南": {
    "郑州": {
      "AREAID": "101180101"
    },
    "安阳": {
      "AREAID": "101180201"
    },
    "新乡": {
      "AREAID": "101180301"
    },
    "许昌": {
      "AREAID": "101180401"
    },
    "平顶山": {
      "AREAID": "101180501"
    },
    "信阳": {
      "AREAID": "101180601"
    },
    "南阳": {
      "AREAID": "101180701"
    },
    "开封": {
      "AREAID": "101180801"
    },
    "洛阳": {
      "AREAID": "101180901"
    },
    "商丘": {
      "AREAID": "101181001"
    },
    "焦作": {
      "AREAID": "101181101"
    },
    "鹤壁": {
      "AREAID": "101181201"
    },
    "濮阳": {
      "AREAID": "101181301"
    },
    "周口": {
      "AREAID": "101181401"
    },
    "漯河": {
      "AREAID": "101181501"
    },
    "驻马店": {
      "AREAID": "101181601"
    },
    "三门峡": {
      "AREAID": "101181701"
    },
    "济源": {
      "AREAID": "101181801"
    }
  },
  "江苏": {
    "南京": {
      "AREAID": "101190101"
    },
    "无锡": {
      "AREAID": "101190201"
    },
    "镇江": {
      "AREAID": "101190301"
    },
    "苏州": {
      "AREAID": "101190401"
    },
    "南通": {
      "AREAID": "101190501"
    },
    "扬州": {
      "AREAID": "101190601"
    },
    "盐城": {
      "AREAID": "101190701"
    },
    "徐州": {
      "AREAID": "101190801"
    },
    "淮安": {
      "AREAID": "101190901"
    },
    "连云港": {
      "AREAID": "101191001"
    },
    "常州": {
      "AREAID": "101191101"
    },
    "泰州": {
      "AREAID": "101191201"
    },
    "宿迁": {
      "AREAID": "101191301"
    }
  },
  "湖北": {
    "武汉": {
      "AREAID": "101200101"
    },
    "襄阳": {
      "AREAID": "101200201"
    },
    "鄂州": {
      "AREAID": "101200301"
    },
    "孝感": {
      "AREAID": "101200401"
    },
    "黄冈": {
      "AREAID": "101200501"
    },
    "黄石": {
      "AREAID": "101200601"
    },
    "咸宁": {
      "AREAID": "101200701"
    },
    "荆州": {
      "AREAID": "101200801"
    },
    "宜昌": {
      "AREAID": "101200901"
    },
    "恩施": {
      "AREAID": "101201001"
    },
    "十堰": {
      "AREAID": "101201101"
    },
    "神农架": {
      "AREAID": "101201201"
    },
    "随州": {
      "AREAID": "101201301"
    },
    "荆门": {
      "AREAID": "101201401"
    },
    "天门": {
      "AREAID": "101201501"
    },
    "仙桃": {
      "AREAID": "101201601"
    },
    "潜江": {
      "AREAID": "101201701"
    }
  },
  "浙江": {
    "杭州": {
      "AREAID": "101210101"
    },
    "湖州": {
      "AREAID": "101210201"
    },
    "嘉兴": {
      "AREAID": "101210301"
    },
    "宁波": {
      "AREAID": "101210401"
    },
    "绍兴": {
      "AREAID": "101210507"
    },
    "台州": {
      "AREAID": "101210601"
    },
    "温州": {
      "AREAID": "101210701"
    },
    "丽水": {
      "AREAID": "101210801"
    },
    "金华": {
      "AREAID": "101210901"
    },
    "衢州": {
      "AREAID": "101211001"
    },
    "舟山": {
      "AREAID": "101211101"
    }
  },
  "安徽": {
    "合肥": {
      "AREAID": "101220101"
    },
    "蚌埠": {
      "AREAID": "101220201"
    },
    "芜湖": {
      "AREAID": "101220301"
    },
    "淮南": {
      "AREAID": "101220401"
    },
    "马鞍山": {
      "AREAID": "101220501"
    },
    "安庆": {
      "AREAID": "101220601"
    },
    "宿州": {
      "AREAID": "101220701"
    },
    "阜阳": {
      "AREAID": "101220801"
    },
    "亳州": {
      "AREAID": "101220901"
    },
    "黄山": {
      "AREAID": "101221001"
    },
    "滁州": {
      "AREAID": "101221101"
    },
    "淮北": {
      "AREAID": "101221201"
    },
    "铜陵": {
      "AREAID": "101221301"
    },
    "宣城": {
      "AREAID": "101221401"
    },
    "六安": {
      "AREAID": "101221501"
    },
    "池州": {
      "AREAID": "101221701"
    }
  },
  "福建": {
    "福州": {
      "AREAID": "101230101"
    },
    "厦门": {
      "AREAID": "101230201"
    },
    "宁德": {
      "AREAID": "101230301"
    },
    "莆田": {
      "AREAID": "101230401"
    },
    "泉州": {
      "AREAID": "101230501"
    },
    "漳州": {
      "AREAID": "101230601"
    },
    "龙岩": {
      "AREAID": "101230701"
    },
    "三明": {
      "AREAID": "101230801"
    },
    "南平": {
      "AREAID": "101230901"
    },
    "钓鱼岛": {
      "AREAID": "101231001"
    }
  },
  "江西": {
    "南昌": {
      "AREAID": "101240101"
    },
    "九江": {
      "AREAID": "101240201"
    },
    "上饶": {
      "AREAID": "101240301"
    },
    "抚州": {
      "AREAID": "101240401"
    },
    "宜春": {
      "AREAID": "101240501"
    },
    "吉安": {
      "AREAID": "101240601"
    },
    "赣州": {
      "AREAID": "101240701"
    },
    "景德镇": {
      "AREAID": "101240801"
    },
    "萍乡": {
      "AREAID": "101240901"
    },
    "新余": {
      "AREAID": "101241001"
    },
    "鹰潭": {
      "AREAID": "101241101"
    }
  },
  "湖南": {
    "长沙": {
      "AREAID": "101250101"
    },
    "湘潭": {
      "AREAID": "101250201"
    },
    "株洲": {
      "AREAID": "101250301"
    },
    "衡阳": {
      "AREAID": "101250401"
    },
    "郴州": {
      "AREAID": "101250501"
    },
    "常德": {
      "AREAID": "101250601"
    },
    "益阳": {
      "AREAID": "101250700"
    },
    "娄底": {
      "AREAID": "101250801"
    },
    "邵阳": {
      "AREAID": "101250901"
    },
    "岳阳": {
      "AREAID": "101251001"
    },
    "张家界": {
      "AREAID": "101251101"
    },
    "怀化": {
      "AREAID": "101251201"
    },
    "永州": {
      "AREAID": "101251401"
    },
    "湘西": {
      "AREAID": "101251509"
    }
  },
  "贵州": {
    "贵阳": {
      "AREAID": "101260101"
    },
    "遵义": {
      "AREAID": "101260201"
    },
    "安顺": {
      "AREAID": "101260301"
    },
    "黔南": {
      "AREAID": "101260413"
    },
    "黔东南": {
      "AREAID": "101260506"
    },
    "铜仁": {
      "AREAID": "101260601"
    },
    "毕节": {
      "AREAID": "101260701"
    },
    "六盘水": {
      "AREAID": "101260803"
    },
    "黔西南": {
      "AREAID": "101260906"
    }
  },
  "四川": {
    "成都": {
      "AREAID": "101270101"
    },
    "攀枝花": {
      "AREAID": "101270201"
    },
    "自贡": {
      "AREAID": "101270301"
    },
    "绵阳": {
      "AREAID": "101270401"
    },
    "南充": {
      "AREAID": "101270501"
    },
    "达州": {
      "AREAID": "101270601"
    },
    "遂宁": {
      "AREAID": "101270701"
    },
    "广安": {
      "AREAID": "101270801"
    },
    "巴中": {
      "AREAID": "101270901"
    },
    "泸州": {
      "AREAID": "101271001"
    },
    "宜宾": {
      "AREAID": "101271101"
    },
    "内江": {
      "AREAID": "101271201"
    },
    "资阳": {
      "AREAID": "101271301"
    },
    "乐山": {
      "AREAID": "101271401"
    },
    "眉山": {
      "AREAID": "101271501"
    },
    "凉山": {
      "AREAID": "101271601"
    },
    "雅安": {
      "AREAID": "101271701"
    },
    "甘孜": {
      "AREAID": "101271801"
    },
    "阿坝": {
      "AREAID": "101271901"
    },
    "德阳": {
      "AREAID": "101272001"
    },
    "广元": {
      "AREAID": "101272101"
    }
  },
  "广东": {
    "广州": {
      "AREAID": "101280101"
    },
    "韶关": {
      "AREAID": "101280201"
    },
    "惠州": {
      "AREAID": "101280301"
    },
    "梅州": {
      "AREAID": "101280401"
    },
    "汕头": {
      "AREAID": "101280501"
    },
    "深圳": {
      "AREAID": "101280601"
    },
    "珠海": {
      "AREAID": "101280701"
    },
    "佛山": {
      "AREAID": "101280800"
    },
    "肇庆": {
      "AREAID": "101280901"
    },
    "湛江": {
      "AREAID": "101281001"
    },
    "江门": {
      "AREAID": "101281101"
    },
    "河源": {
      "AREAID": "101281201"
    },
    "清远": {
      "AREAID": "101281301"
    },
    "云浮": {
      "AREAID": "101281401"
    },
    "潮州": {
      "AREAID": "101281501"
    },
    "东莞": {
      "AREAID": "101281601"
    },
    "中山": {
      "AREAID": "101281701"
    },
    "阳江": {
      "AREAID": "101281801"
    },
    "揭阳": {
      "AREAID": "101281901"
    },
    "茂名": {
      "AREAID": "101282001"
    },
    "汕尾": {
      "AREAID": "101282101"
    }
  },
  "云南": {
    "昆明": {
      "AREAID": "101290101"
    },
    "大理": {
      "AREAID": "101290201"
    },
    "红河": {
      "AREAID": "101290301"
    },
    "曲靖": {
      "AREAID": "101290401"
    },
    "保山": {
      "AREAID": "101290501"
    },
    "文山": {
      "AREAID": "101290601"
    },
    "玉溪": {
      "AREAID": "101290701"
    },
    "楚雄": {
      "AREAID": "101290801"
    },
    "普洱": {
      "AREAID": "101290901"
    },
    "昭通": {
      "AREAID": "101291001"
    },
    "临沧": {
      "AREAID": "101291101"
    },
    "怒江": {
      "AREAID": "101291201"
    },
    "迪庆": {
      "AREAID": "101291305"
    },
    "丽江": {
      "AREAID": "101291401"
    },
    "德宏": {
      "AREAID": "101291501"
    },
    "西双版纳": {
      "AREAID": "101291602"
    }
  },
  "广西": {
    "南宁": {
      "AREAID": "101300101"
    },
    "崇左": {
      "AREAID": "101300201"
    },
    "柳州": {
      "AREAID": "101300301"
    },
    "来宾": {
      "AREAID": "101300401"
    },
    "桂林": {
      "AREAID": "101300501"
    },
    "梧州": {
      "AREAID": "101300601"
    },
    "贺州": {
      "AREAID": "101300701"
    },
    "贵港": {
      "AREAID": "101300801"
    },
    "玉林": {
      "AREAID": "101300901"
    },
    "百色": {
      "AREAID": "101301001"
    },
    "钦州": {
      "AREAID": "101301101"
    },
    "河池": {
      "AREAID": "101301201"
    },
    "北海": {
      "AREAID": "101301301"
    },
    "防城港": {
      "AREAID": "101301401"
    }
  },
  "海南": {
    "海口": {
      "AREAID": "101310101"
    },
    "三亚": {
      "AREAID": "101310201"
    },
    "东方": {
      "AREAID": "101310202"
    },
    "临高": {
      "AREAID": "101310203"
    },
    "澄迈": {
      "AREAID": "101310204"
    },
    "儋州": {
      "AREAID": "101310205"
    },
    "昌江": {
      "AREAID": "101310206"
    },
    "白沙": {
      "AREAID": "101310207"
    },
    "琼中": {
      "AREAID": "101310208"
    },
    "定安": {
      "AREAID": "101310209"
    },
    "屯昌": {
      "AREAID": "101310210"
    },
    "琼海": {
      "AREAID": "101310211"
    },
    "文昌": {
      "AREAID": "101310212"
    },
    "保亭": {
      "AREAID": "101310214"
    },
    "万宁": {
      "AREAID": "101310215"
    },
    "陵水": {
      "AREAID": "101310216"
    },
    "乐东": {
      "AREAID": "101310221"
    },
    "五指山": {
      "AREAID": "101310222"
    },
    "三沙": {
      "AREAID": "101310301"
    }
  },
  "香港": {
    "香港": {
      "AREAID": "101320101"
    }
  },
  "澳门": {
    "澳门": {
      "AREAID": "101330101"
    }
  },
  "台湾": {
    "台北": {
      "AREAID": "101340101"
    },
    "高雄": {
      "AREAID": "101340201"
    },
    "台中": {
      "AREAID": "101340401"
    }
  }
}
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐