<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amin Imani (iman)</title>
    <description>The latest articles on DEV Community by Amin Imani (iman) (@aminimaniv).</description>
    <link>https://dev.to/aminimaniv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3774588%2Fc7ba3d72-0bcc-46cf-b60a-04c36b3cbcfe.jpg</url>
      <title>DEV Community: Amin Imani (iman)</title>
      <link>https://dev.to/aminimaniv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aminimaniv"/>
    <language>en</language>
    <item>
      <title>How to Get IP, ASN, and Network Information with curl (No API Key Required)</title>
      <dc:creator>Amin Imani (iman)</dc:creator>
      <pubDate>Sun, 15 Feb 2026 22:42:27 +0000</pubDate>
      <link>https://dev.to/aminimaniv/how-to-get-ip-asn-and-network-information-with-curl-no-api-key-required-1l5g</link>
      <guid>https://dev.to/aminimaniv/how-to-get-ip-asn-and-network-information-with-curl-no-api-key-required-1l5g</guid>
      <description>&lt;p&gt;If you work with infrastructure, servers, or networking, you probably look up IP addresses more often than you’d like.&lt;/p&gt;

&lt;p&gt;Sometimes you just need to quickly answer questions like:&lt;br&gt;
    • What ASN does this IP belong to?&lt;br&gt;
    • What network (CIDR) is it part of?&lt;br&gt;
    • Where is it located?&lt;br&gt;
    • Which organization owns it?&lt;/p&gt;

&lt;p&gt;Most IP lookup tools are built for browsers. They’re heavy, full of ads, or require an API key.&lt;/p&gt;

&lt;p&gt;But what if you just want something simple that works directly from your terminal?&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;The Problem with Most IP Lookup Services&lt;/p&gt;

&lt;p&gt;When you try to fetch IP data programmatically, you usually face one of these issues:&lt;br&gt;
    • API keys required&lt;br&gt;
    • Rate limits with complicated plans&lt;br&gt;
    • Noisy JSON responses&lt;br&gt;
    • Slow dashboards meant for humans, not scripts&lt;/p&gt;

&lt;p&gt;For automation workflows, monitoring scripts, or quick debugging sessions, this adds friction.&lt;/p&gt;

&lt;p&gt;Sometimes you just want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl &amp;lt;endpoint&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And get clean, predictable output.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;A Simple Way to Get IP Information from the Terminal&lt;/p&gt;

&lt;p&gt;You can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns structured information about your IP address, including:&lt;br&gt;
    • IP address&lt;br&gt;
    • CIDR network&lt;br&gt;
    • ASN&lt;br&gt;
    • Organization&lt;br&gt;
    • Country&lt;br&gt;
    • City&lt;br&gt;
    • Timezone&lt;/p&gt;

&lt;p&gt;If you want information about a specific IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir/8.8.8.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is designed to be readable for humans and predictable for scripts.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;JSON Output for Automation&lt;/p&gt;

&lt;p&gt;If you’re integrating this into a script or backend service, you can request JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir/json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or for a specific IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir/8.8.8.8/json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes it easy to pipe into tools like jq:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir/json | jq -r .asn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can use IP and ASN data directly in:&lt;br&gt;
    • Bash scripts&lt;br&gt;
    • Monitoring systems&lt;br&gt;
    • CI/CD workflows&lt;br&gt;
    • Security automation&lt;br&gt;
    • Logging pipelines&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Example Use Cases&lt;/p&gt;

&lt;p&gt;Here are a few practical scenarios:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Debugging Infrastructure Issues&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You see an unknown IP in your logs. Instead of opening a browser, you run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://ipkit.ir/&amp;lt;ip&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instantly see ASN and network ownership.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Filtering Traffic by ASN&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In abuse detection or rate-limiting logic, ASN data can help identify traffic sources. You can fetch the ASN and apply rules accordingly.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enriching Logs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can enrich raw IP logs with network metadata using a simple script that calls an IP lookup endpoint and appends ASN or location info.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Why Simplicity Matters&lt;/p&gt;

&lt;p&gt;Tools that work well in the browser don’t always work well in automation.&lt;/p&gt;

&lt;p&gt;The goal behind ipkit was simple:&lt;br&gt;
    • No authentication required&lt;br&gt;
    • No heavy UI&lt;br&gt;
    • Predictable output&lt;br&gt;
    • Works equally well in a browser or in curl&lt;/p&gt;

&lt;p&gt;Sometimes the best tools are the ones that stay out of your way.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;If you frequently deal with IP addresses in your workflow, having a fast and script-friendly lookup tool can save time and reduce friction.&lt;/p&gt;

&lt;p&gt;You can try it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ipkit.ir" rel="noopener noreferrer"&gt;https://ipkit.ir&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have suggestions or use cases, I’d be interested to hear how you’re handling IP lookups in your infrastructure.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>networking</category>
      <category>iplookup</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
