IP Interface API Interface query

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

Interface description

IP geolocation call, this interface is not pure data, compared to any other data on the market, but ... Cannot be completely 100% accurate!!! You can do unlimited calls!!!

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
Interface default is JSON format (no XML format provided)
If you want to use the JS call to display IP, then we recommend:

Return data
Returns 0 if the name return type description is empty
Country String Country or IANA (computer reserved address) is empty returns 0
Area string Region: East, Central, east ... Null to return 0
Region String Province: Beijing, Shanghai, Shandong ... Null to return 0
City string: Hangzhou, Wuxi, Laiwu ... Null to return 0
County string County-to-county NULL returns 0
ISP string operator: If telecom, Unicom is empty then return 0
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"}
Copy Code
    1. Return JS Code
    2. var api_ip=[' country ': ' \u4fc4\u7f57\u65af ', ' area ': ' 0 ', ' Region ': ' 0 ', ' City ': ' 0 ', ' County ': ' 0 ', ' ISP ': ' 0 '];
Copy Code
  • 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.