IP interface API query

Source: Internet
Author: User
IP interface API query
IP interface query
Http://api.apidatas.com/ip/doc

Interface Description

The IP address location is called. this interface is not pure data and is not comparable to any other data on the market, but... it cannot be completely 100% accurate !!! Unlimited calls are available !!!

Interface address
Http://api.apidatas.com/ip/
Interface parameters
Http://api.apidatas.com/ip/127.0.0.1
Http://api.apidatas.com/ip? Ip = 127.0.0.1
Interface Type
Http://api.apidatas.com/ip/127.0.0.1/json
Http://api.apidatas.com/ip/127.0.0.1/js
The interface is in JSON format by default (XML format not provided currently)
If you want to use JS calls to display IP addresses, we suggest:

Returned data
If the name return type is null, 0 is returned.
Country string country or IANA (computer reserved address) is null, 0 is returned
Area string region: East China, Central China, east China... if it is null, 0 is returned.
Region string province: Beijing, Shanghai, Shandong... if it is null, 0 is returned.
City string city: Hangzhou, Wuxi, Laiwu... if it is null, 0 is returned.
County string if the county magistrate is null, 0 is returned.
Isp string operator: if China Telecom or China Unicom is empty, 0 is returned.
Error code
Name error code description
State 10000 IP input error

  1. // Return JSON data
  2. {"Country": "IANA", "area": "0", "region": "0", "city": "0", "county ": "0", "isp": "0 "}

  1. // Return JS code
  2. Var API_IP = ["country": "\ u4fc4 \ u7f57 \ u65af", "area": "0", "region": "0", "city ": "0", "county": "0", "isp": "0"];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.