程序员福利:各大平台免费接口
2017-11-16 本文已影响298人
雨影
电商
京东价格信息:
http://p.3.cn/prices/mgets?skuIds=J_954086&type=1
ps:商品ID这么获取:http://item.jd.com/954086.html
返回格式:
[
{
"op": "459.00",
"m": "859.00",
"id": "J_954086",
"p": "-1.00"
}
]
物流接口
快递接口:
http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号
ps:快递公司编码:
申通=”shentong”
EMS=”ems”
顺丰=”shunfeng”
圆通=”yuantong”
中通=”zhongtong”
韵达=”yunda”
天天=”tiantian”
汇通=”huitongkuaidi”
全峰=”quanfengkuaidi”
德邦=”debangwuliu”
宅急送=”zhaijisong”
返回结果
{
"message": "ok",
"nu": "8871********8562",
"ischeck": "0",
"condition": "00",
"com": "yuantong",
"status": "200",
"state": "0",
"data": [
{
"time": "2017-11-16 11:38:16",
"ftime": "2017-11-16 11:38:16",
"context": "济南转运中心 已收入",
"location": null
},
{
"time": "2017-11-14 18:35:33",
"ftime": "2017-11-14 18:35:33",
"context": "合肥转运中心 已发出,下一站 济南转运中心",
"location": null
},
{
"time": "2017-11-14 18:34:50",
"ftime": "2017-11-14 18:34:50",
"context": "合肥转运中心 已收入",
"location": null
},
{
"time": "2017-11-14 14:17:14",
"ftime": "2017-11-14 14:17:14",
"context": "安徽省合肥市高新区公司 已发出,下一站 合肥转运中心",
"location": null
},
{
"time": "2017-11-14 12:53:52",
"ftime": "2017-11-14 12:53:52",
"context": "安徽省合肥市高新区公司 已打包",
"location": null
},
{
"time": "2017-11-14 11:28:57",
"ftime": "2017-11-14 11:28:57",
"context": "安徽省合肥市高新区公司(点击查询电话) 已揽收",
"location": null
}
]
}
谷歌接口
FeedXml转json接口:
http://ajax.googleapis.com/ajax/services/feed/load?q=Feed地址&v=1.0
备选参数:callback:&callback=foo就会在json外面嵌套foo({})方便做jsonp使用。
备选参数:n:返回多少条记录。 天气接口
百度接口:
http://api.map.baidu.com/telematics/v3/weather?location=嘉兴&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ
location:城市名或经纬度 ak:开发者密钥 output:默认xml
音乐接口
QQ空间音乐接口
http://qzone-music.qq.com/fcg-bin/cgi_playlist_xml.fcg?uin=QQ号码&json=1&g_tk=1916754934
返回:
jsonCallback({
code: 0,
subcode: 0,
qqmusic: {
curtime: 1510819478,
issmarter: 0,
systemtime: 1510819478,
iyellowbgm: 0,
xmusicnum: 0,
picurl: "",
playlist: {
song: [
]
}
}
})
多米音乐接口
http://v5.pc.duomi.com/search-ajaxsearch-searchall?kw=关键字&pi=页码&pz=每页音乐数
返回事例:
{
"album_offset": 0,
"albums": [
{
"artists": [
{
"id": 51031253,
"name": "Love",
"num_albums": 0,
"num_tracks": 0,
"portrait": "http://pic.cdn.duomi.com/imageproxy2/dimgm/scaleImage?url=http://img.kxting.cn//p1/09/09/70154280.jpg&w=150&h=150&s=100&c=0&o=0&m=",
"valid": true
},
{
"id": 51043484,
"name": "小爱",
"num_albums": 1,
"num_tracks": 2,
"portrait": "http://pic.cdn.duomi.com/imageproxy2/dimgm/scaleImage?url=http://img.kxting.cn//p1/23/12/70788213.jpg&w=150&h=150&s=100&c=0&o=0&m=",
"valid": true
},
{
"id": 61594324,
"name": "Ivy(韩国)",
"num_albums": 0,
"num_tracks": 0,
"portrait": "http://pic.cdn.duomi.com/imageproxy2/dimgm/scaleImage?url=http://img.kxting.cn//p1/17/18/70824849.jpg&w=150&h=150&s=100&c=0&o=0&m=",
"valid": true
},
{
"id": 50000185,
"name": "洪爱莉",
"num_albums": 0,
"num_tracks": 0,
"portrait": "http://pic.cdn.duomi.com/imageproxy2/dimgm/scaleImage?url=http://img.kxting.cn//p1/27/24/70232604.jpg&w=150&h=150&s=100&c=0&o=0&m=",
"valid": true
},
{
"id": 51042130,
"name": "愛名",
"num_albums": 0,
"num_tracks": 0,
"portrait": "http://pic.cdn.duomi.com/imageproxy2/dimgm/scaleImage?url=http://img.kxting.cn//p1/21/09/70553448.jpg&w=150&h=150&s=100&c=0&o=0&m=",
"valid": true
}
],
"dm_error": 0,
"error_msg": "操作成功",
"recommend": 0,
"total_albums": 1267,
"total_artists": 62,
"total_tracks": 5014,
"track_offset": 0,
"tracks": [
{
"album": {
"cover": "/p1/08/04/72395734.jpg",
"id": 2723405,
"name": "谢谢你@我"
},
"artists": [
{
"id": 61704635,
"name": "1931女子偶像组合",
"num_albums": 34,
"num_tracks": 48,
"portrait": "",
"valid": true
}
],
"availability": "1110",
"dlyric": "",
"id": 27995420,
"medias": [
{
"bitrate": 320,
"p2purl": "7AF7D143096C6D7D59050000007540527B00000095.mp3"
}
],
"mv": 0,
"slyric": "",
"title": "爱",
"isdown": "1",
"isplay": "1"
}
]
}
soso接口
http://cgi.music.soso.com/fcgi-bin/fcg_search_xmldata.q?source=10&w=关键字&perpage=1&ie=utf-8
返回示例:
searchJsonCallback({
retcode: 0,
subcode: 0,
totalnum: 11,
curnum: 1,
curpage: 1,
keyword: "hahah",
qcnum: 1,
g_searchid: "13686119657703615",
qc: [
"哈哈哈"
],
list: [
{
source: 12,
songid: 961933,
musicid: 961933,
musicsingerid: 22617,
musicalbumid: 81554,
songname: "哈哈哈",
singerid: 22617,
singername: "董育君",
albumid: 81554,
albumname: "飞",
pubtime: 1316102400,
songurl: "http://stream4.qqmusic.qq.com/12961933.wma",
conn: 20,
fromat: "qqhq;common;mp3common;wmacommon;crcommon",
download: 1,
size: 1978603,
interval: 243000,
songmid: "001Gf2Pl0yCdY7",
singermid: "004GRZQ43w9uGc",
albummid: "000CvhOB3MqiEB"
}
]
})
视频接口
土豆接口
http://api.tudou.com/v3/gw?method=album.item.get&appKey=Appkey&format=json&albumId=视频剧集ID&pageNo=当前页&pageSize=每页显示
地图接口
阿里云根据地区名获取经纬度接口
http://gc.ditu.aliyun.com/geocoding?a=苏州市
返回事例:
{
"lon": 120.58531,
"level": 2,
"address": "",
"cityName": "",
"alevel": 4,
"lat": 31.29888
}
参数解释: 纬度,经度type 001 (100代表道路,010代表POI,001代表门址,111可以同时显示前三项)
阿里云根据经纬度获取地区名接口
http://gc.ditu.aliyun.com/regeocoding?l=39.938133,116.395739&type=001
返回事例:
{
"queryLocation": [
39.938133,
116.395739
],
"addrList": [
{
"type": "doorPlate",
"status": 0,
"name": "",
"admCode": "",
"admName": "",
"nearestPoint": [],
"distance": -1
}
]
}
IP接口
新浪接口(ip值为空的时候 获取本地的)
http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=218.4.255.255
返回事例
{
"ret": 1,
"start": -1,
"end": -1,
"country": "中国",
"province": "山东",
"city": "济南",
"district": "",
"isp": "",
"type": "",
"desc": ""
}
淘宝接口
http://ip.taobao.com/service/getIpInfo.php?ip=63.223.108.42
返回格式:
{
"code": 0,
"data": {
"country": "美国",
"country_id": "US",
"area": "西部",
"area_id": "US_WT",
"region": "华盛顿州",
"region_id": "US_WA",
"city": "",
"city_id": "-1",
"county": "",
"county_id": "-1",
"isp": "电讯盈科",
"isp_id": "3000107",
"ip": "63.223.108.42"
}
}
手机信息查询接口
淘宝网手机信息接口:
http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=手机号
百付宝接口:
https://www.baifubao.com/callback?cmd=1059&callback=phone&phone=手机号