号码归属地查询API(返回json和XML数据)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010696927/article/details/22159319

手机号码归属地查询api

请求参数
参数名称 类型 是否必须 说明
appkey string 使用API的唯一凭证 说明
sign string md5后的32位密文,登陆用. 说明
format {json|xml} 返回类型.
phone string 手机号码 例如:13800138000
返回字段
字段 类型 说明
success {0/1} 执行结果
phone string 查询的手机号码
msg string 出错消息,当出错时将会出现此节点,否则不出现
area string 手机号码所在地区区号
postno string 所在地区邮编
att string 手机号码归属地
ctype string 号码卡类型
par string 所有号码区间
prefix string 运营商号段
operators string 所属运营商
style_simcall string 简写归属地
style_citynm string 完整归属地


返回json数据
{
        "success":"1",
        "result":{
                "phone":"13800138000",
                "area":"010",
                "postno":"100000",
                "att":"中国,北京",
                "ctype":"北京移动全球通卡",
                "par":"1380013",
                "prefix":"138",
                "operators":"移动",
                "style_simcall":"中国,北京",
                "style_citynm":"中华人民共和国,北京市"
        }
}

另外返回XML数据
 <?xml version="1.0" encoding="utf-8" ?> 
- <root>
  <success>1</success> 
- <result>
      <phone>13800138000</phone> 
      <area>010</area> 
      <postno>100000</postno> 
      <att>中国,北京</att> 
      <ctype>北京移动全球通卡</ctype> 
      <par>1380013</par> 
      <prefix>138</prefix> 
      <operators>移动</operators> 
      <style_simcall>中国,北京</style_simcall> 
      <style_citynm>中华人民共和国,北京市</style_citynm> 
  </result>
  </root>


猜你喜欢

转载自blog.csdn.net/u010696927/article/details/22159319