手机号码手机归属省份批量查询暂未开通该服务是什么意思

手机号码归属地查询__API服务_API服务_API Store
手机号码归属地查询
手机号码归属地查询
所属分类:
社交分享、生活常用、其他数据
更新时间:
API调试工具 :
接口地址 :
/apistore/mobilephoneservice/mobilephone
请求方法 :
请求参数(header) :
您自己的apikey
请求参数(urlParam) :
请求示例 :
python示例
ObjectC示例
--get --include
'/apistore/mobilephoneservice/mobilephone?tel='
-H 'apikey:您自己的apikey'
$ch = curl_init();
$url = '/apistore/mobilephoneservice/mobilephone?tel=';
$header = array(
'apikey: 您自己的apikey',
// 添加apikey到header
curl_setopt($ch, CURLOPT_HTTPHEADER
, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// 执行HTTP请求
curl_setopt($ch , CURLOPT_URL , $url);
$res = curl_exec($ch);
var_dump(json_decode($res));
# -*- coding: utf-8 -*-
import sys, urllib, urllib2, json
url = '/apistore/mobilephoneservice/mobilephone?tel='
req = urllib2.Request(url)
req.add_header(&apikey&, &您自己的apikey&)
resp = urllib2.urlopen(req)
content = resp.read()
if(content):
print(content)
String httpUrl = &/apistore/mobilephoneservice/mobilephone&;
String httpArg = &tel=&;
String jsonResult = request(httpUrl, httpArg);
System.out.println(jsonResult);
* @param urlAll
* @param httpArg
* @return 返回结果
public static String request(String httpUrl, String httpArg) {
BufferedReader reader =
String result =
StringBuffer sbf = new StringBuffer();
httpUrl = httpUrl + &?& + httpA
URL url = new URL(httpUrl);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setRequestMethod(&GET&);
// 填入apikey到HTTP header
connection.setRequestProperty(&apikey&,
&您自己的apikey&);
connection.connect();
InputStream is = connection.getInputStream();
reader = new BufferedReader(new InputStreamReader(is, &UTF-8&));
String strRead =
while ((strRead = reader.readLine()) != null) {
sbf.append(strRead);
sbf.append(&\r\n&);
reader.close();
result = sbf.toString();
} catch (Exception e) {
e.printStackTrace();
string url = &/apistore/mobilephoneservice/mobilephone&;
string param = &tel=&;
string result = request(url,param);
/// &summary&
/// 发送HTTP请求
/// &/summary&
/// &param name=&url&&请求的URL&/param&
/// &param name=&param&&请求的参数&/param&
/// &returns&请求结果&/returns&
public static string request(string url, string param)
string strURL = url + '?' +
System.Net.HttpWebR
request = (System.Net.HttpWebRequest)WebRequest.Create(strURL);
request.Method = &GET&;
// 添加header
request.Headers.Add(&apikey&, &您自己的apikey&);
System.Net.HttpWebR
response = (System.Net.HttpWebResponse)request.GetResponse();
System.IO.S
s = response.GetResponseStream();
string StrDate = &&;
string strValue = &&;
StreamReader Reader = new StreamReader(s, Encoding.UTF8);
while ((StrDate = Reader.ReadLine()) != null)
strValue += StrDate + &\r\n&;
return strV
NSString *httpUrl = @&/apistore/mobilephoneservice/mobilephone&;
NSString *httpArg = @&tel=&;
[self request: httpUrl withHttpArg: httpArg];
-(void)request: (NSString*)httpUrl withHttpArg: (NSString*)HttpArg
NSString *urlStr = [[NSString alloc]initWithFormat: @&%@?%@&, httpUrl, HttpArg];
NSURL *url = [NSURL URLWithString: urlStr];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 10];
[request setHTTPMethod: @&GET&];
[request addValue: @&您自己的apikey& forHTTPHeaderField: @&apikey&];
[NSURLConnection sendAsynchronousRequest: request
queue: [NSOperationQueue mainQueue]
completionHandler: ^(NSURLResponse *response, NSData *data, NSError *error){
if (error) {
NSLog(@&Httperror: %@%ld&, error.localizedDescription, error.code);
NSInteger responseCode = [(NSHTTPURLResponse *)response statusCode];
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@&HttpResponseCode:%ld&, responseCode);
NSLog(@&HttpResponseBody %@&,responseString);
var url = &/apistore/mobilephoneservice/mobilephone&
var httpArg = &tel=&
request(url, httpArg: httpArg)
request(httpUrl: String, httpArg: String) {
var req = NSMutableURLRequest(URL: NSURL(string: httpUrl + &?& + httpArg)!)
req.timeoutInterval = 6
req.HTTPMethod = &GET&
req.addValue(&您自己的apikey&, forHTTPHeaderField: &apikey&)
NSURLConnection.sendAsynchronousRequest(req, queue: NSOperationQueue.mainQueue()) {
(response, data, error) -& Void in
let res = response as! NSHTTPURLResponse
println(res.statusCode)
if let e = error{
println(&请求失败&)
if let d = data {
var content = NSString(data: d, encoding: NSUTF8StringEncoding)
println(content)
JSON返回示例 :
errNum: 0,
errMsg: &success&,
retData: {
telString: &&, //手机号码
province: &黑龙江&,
carrier: &黑龙江移动&
请将apikey作为参数添加到header中;
当返回{&errNum&:300003,&errMsg&:&url is not parse&} 时,请校验是否传入apikey;
套餐权限套餐价格
限制类错误:
错误码返回
错误码返回说明
User's request is expired
用户请求过期
User call overrun per day
用户日调用量超限
Service call overrun per second
服务每秒调用量超限
Service call overrun per day
服务日调用量超限
调用方错误:
错误码返回
错误码返回说明
URL cannot be resolved
url无法解析
Missing apikey
请求缺少apikey,登录即可获取
Apikey or secretkey is NULL
服务没有取到apikey或secretkey
Apikey does not exist
apikey不存在
Api does not exist
Api out of service
api已关闭服务
Service overdue, please pay in time
余额不足,请充值
User not verified
未通过实名验证
Service provider response status error
服务商响应status非200
代理平台错误:
错误码返回
错误码返回说明
Internal error
Sorry,The system is busy. Please try again late
系统繁忙稍候再试
联系邮箱:
大家都在问
平均响应延迟
修改API链接接口,去掉端口号! 防止只打几台机器!!}

我要回帖

更多关于 号码归属地 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信