/api/ip के लिए IP लुकअप API गाइड

इस गाइड की मदद से /api/ip पर single-IP lookup request भेजें, वापस आने वाले JSON fields समझें, और अधिक context चाहिए तो live browser workflow पर जाएं।

दायरा तथ्यात्मक रखें: /api/ip एक समय में एक पब्लिक IP के लिए lookup helper है। यह bulk, authenticated या SLA-backed API product नहीं है।

इसे तब उपयोग करें जब
आप एक single public IP lookup के लिए JSON output चाहते हैं और fetch या CLI call को automate करने से पहले exact request pattern जानना चाहते हैं।
मौजूदा कॉन्ट्रैक्ट
/api/ip के लिए ip query parameter आवश्यक है और यह एक समय में एक पब्लिक IP के लिए JSON ownership context लौटाता है।
गार्डरेल
अमान्य, private या reserved input error JSON लौटाते हैं। यह surface bulk lookup, authentication या uptime commitments का वादा नहीं करता।
उदाहरण अनुरोध और प्रतिक्रिया
Browser fetch उदाहरण
जब frontend या debugging script को browser lookup जैसा वही ASN और network context चाहिए, तब simple GET request का उपयोग करें।
fetch("/api/ip?ip=8.8.8.8")
  .then((response) => response.json())
  .then((data) => console.log(data));
CLI curl उदाहरण
जब आपको plain-text /ip terminal shortcut के बजाय JSON चाहिए, तब ip query parameter को साफ़ तौर पर भेजें।
curl https://comutil.com/api/ip?ip=8.8.8.8
उदाहरण response fields
यह live endpoint top-level ASN metadata के साथ एक nested network object भी लौटाता है, जो मौजूदा RDAP और WHOIS lookup flow से आता है।
{
  "asn_registry": "arin",
  "asn": "15169",
  "asn_cidr": "8.8.8.0/24",
  "asn_country_code": "US",
  "asn_date": "1992-12-01",
  "asn_description": "GOOGLE, US",
  "network": {
    "name": "GOGL",
    "country": "US",
    "start_address": "8.8.8.0",
    "end_address": "8.8.8.255",
    "type": "DIRECT ALLOCATION",
    "status": "active",
    "links": []
  },
  "nir_postal_code": null,
  "nir_range": null,
  "address": "1600 Amphitheatre Parkway",
  "email_admin": "arin-contact@google.com",
  "email_tech": null
}
पहले ये response fields पढ़ें

address या contact details समझने से पहले उन fields से शुरू करें जो ownership और range समझाती हैं।

  • asn_registry, asn और asn_description बताते हैं कि आप किस registry और operator को देख रहे हैं।
  • network.start_address, network.end_address और network.status allocation की visible range और lifecycle context दिखाते हैं।
  • address, email_admin और email_tech escalation notes में मदद कर सकते हैं, लेकिन ये पहले triage signal के बजाय सहायक details हैं।
एरर सीमाएं

ये live endpoint की मौजूदा सीमाएं हैं, इसलिए अपनी automation को इन्हीं के अनुसार रखें।

  • ip न होने पर {"error": "IP address is required."} लौटता है।
  • Private या reserved addresses public ownership data के बजाय error JSON लौटाते हैं।
  • गलत फ़ॉर्मेट वाला input ऐसा error JSON लौटाता है जो invalid IP format समझाता है।
API docs surface से कब आगे बढ़ें

कॉन्ट्रैक्ट समझने के लिए docs route का उपयोग करें, फिर जब आपको richer investigation context या shareable lookup page चाहिए हो तो live browser workflow पर जाएं।

  • जब आपको उसी lookup के लिए browser UI, share URL, map और investigation summary चाहिए, तब /ip खोलें।
  • जब आपको सिर्फ JSON fields नहीं, बल्कि workflow framing चाहिए, तब IP और ASN गाइड पढ़ें।
  • जब सवाल domain ownership या CIDR scope तक बढ़ जाए, तब Network/Security hub पर लौटें।