各种免费api

本文分享了多个免费接口及API使用方法,包括天气查询、物流快递、气象局数据、多米音乐搜索、IP信息查询等,涵盖了从天气预报到物流追踪的多种应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第一份工作就是写接口的~_(:з」∠)_

过程中找到的一些免费接口,挺好用的ლ(╹◡╹ლ)

java里的用法(其实根本没必要ti)~当然浏览器直接用可以~

public static void main(String[] args) {
		String city = "广州";
		String urlStr = "http://php.weather.sina.com.cn/iframe/index/w_cl.php?code=js&day=0&city=" + city + "&dfc=1";
		URL url = null;
		BufferedReader in = null;
		StringBuffer str = new StringBuffer();
		try {
			url = new URL(urlStr);
			in = new BufferedReader(new InputStreamReader(url.openStream(), "GBK"));
			String s = null;
			while((s = in.readLine()) != null){
				str.append(s);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally{
			try {
				if(in != null){
					in.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		System.out.println(str.toString());
	}

结果↓

(function(){var w=[];w['广州']=[{s1:'多云',s2:'多云',f1:'duoyun',f2:'duoyun',t1:'28',t2:'20',p1:'≤3',p2:'≤3',d1:'无持续风向',d2:'无持续风向'}];var add={now:'2015-03-20 15:07:38',time:'1426835258',update:'北京时间03月20日08:05更新',error:'0',total:'1'};window.SWther={w:w,add:add};})();//3

 

 还有其他的接口~↓

物流快递接口

http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号 

ps:快递公司编码:申通="shentong" EMS="ems" 顺丰="shunfeng" 圆通="yuantong" 中通="zhongtong" 韵达="yunda" 天天="tiantian" 汇通="huitongkuaidi" 全峰="quanfengkuaidi" 德邦="debangwuliu" 宅急送="zhaijisong"

 

气象局接口

http://m.weather.com.cn/data/城市代码.html(城市代码请看附件ლ(╹◡╹ლ))

 

多米音乐接口

http://v5.pc.duomi.com/search-ajaxsearch-searchall?kw=关键字&pi=页码&pz=每页音乐数

 

IP接口

新浪接口(ip值为空的时候 获取本地的) http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=218.4.255.255

淘宝接口 http://ip.taobao.com/service/getIpInfo.php?ip=63.223.108.42

 

手机信息查询接口

淘宝网接口

http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=手机号

拍拍接口

http://virtual.paipai.com/extinfo/GetMobileProductInfo?mobile=手机号&amount=10000&callname=getPhoneNumInfoExtCallback 用例

百付宝接口

https://www.baifubao.com/callback?cmd=1059&callback=phone&phone=手机号

115接口

http://cz.115.com/?ct=index&ac=get_mobile_local&callback=jsonp1333962541001&mobile=手机号

有道接口

http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=手机号

手机在线接口

http://api.showji.com/Locating/www.showji.com.aspx?m=手机号&output=json&callback=querycallback

 

接口转至JSON在线工具:http://www.bejson.com/go.html?u=http://www.bejson.com/webInterface.html

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值