### Install NetworksDB Python Library Source: https://github.com/networksdb/python/blob/master/README.md Use pip to install the official Python client for the NetworksDB API. Alternatively, clone the repository and install manually. ```bash pip install networksdb ``` ```bash python3 setup.py install ``` -------------------------------- ### Get API Key Information Source: https://context7.com/networksdb/python/llms.txt Checks the status, quota usage, and remaining allowances for your API key. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get API key information key_info = api.key_info() print(key_info) ``` -------------------------------- ### GET /reverse_dns Source: https://github.com/networksdb/python/blob/master/README.md Retrieves a list of domain names resolving to a specific IPv4 or IPv6 address. ```APIDOC ## GET /reverse_dns ### Description List the domain names resolving to a given IPv4 or IPv6 address. ### Parameters #### Query Parameters - **ip** (string) - Required - The IPv4 or IPv6 address to resolve. ### Response #### Success Response (200) - **total** (integer) - Total number of domains found. - **results** (list) - List of domain names. ``` -------------------------------- ### Get IPv6 Networks for an Organization Source: https://context7.com/networksdb/python/llms.txt Retrieves a list of IPv6 networks associated with a specific organization. Requires an initialized NetworksDB API object. ```python ipv6_networks = api.org_networks('github-inc', ipv6=True) for network in ipv6_networks.results: print(f"{network.netname}: {network.cidr}") ``` -------------------------------- ### Get IP Address Information Source: https://github.com/networksdb/python/blob/master/README.md Retrieve detailed information about an IP address, including owner, network, and domain details. Omitting the IP parameter defaults to your source IP. ```python >>> ip = api.ip_info('8.8.8.8') ``` ```python >>> ip.organisation.name 'Google LLC' ``` ```python >>> ip.domains_on_ip 7243 ``` ```python >>> ip.network.cidr '8.8.8.0/24' ``` ```python >>> ip.network.netname 'LVLT-GOGL-8-8-8' ``` -------------------------------- ### GET /asn_networks Source: https://github.com/networksdb/python/blob/master/README.md Retrieves the list of networks announced by a specific ASN. ```APIDOC ## GET /asn_networks ### Description Retrieve the networks announced by the ASN and identify the assigned organization. ### Parameters #### Query Parameters - **asn** (integer) - Required - The Autonomous System Number. - **ipv6** (boolean) - Optional - Set to True to retrieve IPv6 networks. ### Response #### Success Response (200) - **results** (list) - List of network objects containing CIDR, country code, and organization details. ``` -------------------------------- ### Get IPv6 Networks Source: https://context7.com/networksdb/python/llms.txt Retrieves a list of IPv6 networks associated with a given organization. ```APIDOC ## Get IPv6 Networks ### Description Retrieves a list of IPv6 networks associated with a given organization. ### Method GET (Implicit) ### Endpoint `/org_networks` (with `ipv6=True` parameter) ### Parameters #### Query Parameters - **ipv6** (boolean) - Optional - Set to `True` to retrieve IPv6 networks. ### Request Example ```python ipv6_networks = api.org_networks('github-inc', ipv6=True) ``` ### Response #### Success Response (200) - **results** (list) - A list of network objects, each containing `netname` and `cidr`. #### Response Example ```json { "results": [ { "netname": "US-GITHUB-20170419", "cidr": "2a0a:a440::/29" }, { "netname": "GITHUB-NET6-1", "cidr": "2620:112:3000::/44" } ] } ``` ``` -------------------------------- ### IP Information Lookup Source: https://context7.com/networksdb/python/llms.txt Retrieve detailed information about an IP address, including owning organization, network allocation, and domains hosted. Works with both IPv4 and IPv6. Omit the IP parameter to get info about your own IP. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Look up information for a specific IP ip = api.ip_info('8.8.8.8') # Access organization details print(ip.organisation.name) # 'Google LLC' print(ip.organisation.id) # 'google-llc' # Access network information print(ip.network.cidr) # '8.8.8.0/24' print(ip.network.netname) # 'LVLT-GOGL-8-8-8' print(ip.network.first_ip) # '8.8.8.0' print(ip.network.last_ip) # '8.8.8.255' # Number of domains on this IP print(ip.domains_on_ip) # 7243 # Omit parameter to get info about your own IP my_ip = api.ip_info() # Print full JSON response print(ip) # { # "ip": "8.8.8.8", # "domains_on_ip": 7243, # "organisation": { # "name": "Google LLC", # "id": "google-llc" # }, # "network": { # "netname": "LVLT-GOGL-8-8-8", # "cidr": "8.8.8.0/24" # } # } ``` -------------------------------- ### GET /asn_info Source: https://github.com/networksdb/python/blob/master/README.md Retrieves detailed information about a specific Autonomous System Number (ASN). ```APIDOC ## GET /asn_info ### Description Request information about a particular ASN, including its name and description. ### Parameters #### Query Parameters - **asn** (integer) - Required - The Autonomous System Number. ### Response #### Success Response (200) - **as_name** (string) - Name of the ASN. - **description** (string) - Description of the ASN. - **networks_announced** (object) - Information about announced networks. ``` -------------------------------- ### Get ASN Information Source: https://github.com/networksdb/python/blob/master/README.md Request and display information about a specific Autonomous System Number (ASN), including its name, description, and the count of IPv4 networks announced. ```python >>> asn = api.asn_info(19956) >>> asn.as_name, asn.description, asn.networks_announced.ipv4 ('TENNESSEE-NET', 'AT&T Corp.', 18) ``` -------------------------------- ### Get ASN Information Source: https://context7.com/networksdb/python/llms.txt Fetches details about an Autonomous System Number (ASN), including its name, description, and the count of announced IPv4 and IPv6 network prefixes. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get ASN information asn = api.asn_info(19956) print(asn.as_name) print(asn.description) print(asn.networks_announced.ipv4) print(asn.networks_announced.ipv6) ``` -------------------------------- ### Get Organisation Details by ID Source: https://github.com/networksdb/python/blob/master/README.md Retrieve detailed information about an organization using its NetworksDB ID. This includes address, contact information, network counts, and associated ASNs. ```python >>> github = api.org_info('github-inc') >>> print(github) { "organisation": "GitHub, Inc", "id": "github-inc", "address": null, "phone": null, "countries": [ "United States" ], "networks": { "ipv4": 8, "ipv6": 2 }, "networks_by_country": { "United States": 10 }, "url": "https://networksdb.io/ip-addresses-of/github-inc", "asns": [ "36459" ] } ``` -------------------------------- ### GET /mass_reverse_dns Source: https://github.com/networksdb/python/blob/master/README.md Performs reverse DNS lookups for an entire network block or a range of IP addresses. ```APIDOC ## GET /mass_reverse_dns ### Description Performs reverse DNS lookups on a full network block or between two IP addresses. Note: This feature is not available to free API keys. ### Parameters #### Query Parameters - **network** (string) - Optional - CIDR notation of the network block. - **first_ip** (string) - Optional - Starting IP address for range lookup. - **last_ip** (string) - Optional - Ending IP address for range lookup. ### Response #### Success Response (200) - **total** (integer) - Total number of results found. - **results** (list) - List of objects containing IP and associated domains. ``` -------------------------------- ### IP Geolocation Lookup Source: https://context7.com/networksdb/python/llms.txt Get geographic location data for an IP address, including country, state, city, and coordinates. Supports IPv4 and IPv6. Omit the IP parameter to geolocate your own IP. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get geolocation for an IP geo = api.ip_geo('8.8.8.8') print(geo.continent) # 'North America' print(geo.country) # 'United States' print(geo.state) # 'California' print(geo.city) # 'Mountain View' print(geo.latitude) # 37.406 print(geo.longitude) # -122.079 # Omit parameter to geolocate your own IP my_geo = api.ip_geo() ``` -------------------------------- ### Get IP Address Geolocation Source: https://github.com/networksdb/python/blob/master/README.md Request geolocation data for an IP address, including continent, country, state, city, latitude, and longitude. This function supports both IPv4 and IPv6 addresses. ```python >>> geo = api.ip_geo('8.8.8.8') >>> geo.continent, geo.country, geo.state, geo.city, geo.latitude, geo.longitude ('North America', 'United States', 'California', 'Mountain View', 37.406, -122.079) ``` -------------------------------- ### Initialize NetworksDB Client Source: https://context7.com/networksdb/python/llms.txt Create a client instance by providing your API key. All subsequent API calls will use this authenticated client. ```python from networksdb import NetworksDB # Initialize with your API key api = NetworksDB('11111111-2222-3333-4444-555555555555') ``` -------------------------------- ### Initialize NetworksDB API Handler Source: https://github.com/networksdb/python/blob/master/README.md Instantiate the NetworksDB API handler by providing your API key. This is the first step before making any API requests. ```python from networksdb import NetworksDB >>> api = NetworksDB('11111111-2222-3333-4444-555555555555') ``` -------------------------------- ### Find All Domains Hosted by a Company Source: https://github.com/networksdb/python/blob/master/README.md Iterate through an organization's networks and retrieve a list of domain names for each network using mass reverse DNS. ```python >>> for network in api.org_networks('paypal-inc').results: ... mass_reverse = api.mass_reverse_dns(network.first_ip, network.last_ip) ... print([_.domains for _ in mass_reverse.results]) ... [...] [('test-paypal.com',), ('test-paypal.com',), ('paypal-australia.com.au', 'paypal-business.co.uk', 'paypal-business.com.au', 'paypal-businesscenter.com', 'paypal-communications.com', 'paypal-danmark.dk', 'paypal-donations.co.uk', 'paypal-donations.com', 'paypal-globalshops.com', 'paypal-knowledge-test.com', 'paypal-knowledge.com', 'paypal-marketing.ca', 'paypal-marketing.co.uk', 'paypal-media.com', 'paypal-norge.no', 'paypal-optimizer.com', 'paypal-partners.com', 'paypal-passport.com', 'paypal-prepagata.com', 'paypal-promo.es', 'paypal-sverige.se', 'paypal-turkiye.com', 'paypal.com.cn', 'paypalbenefits.com', 'paypalgivingfund.org', 'paypalobjects.com'), ('paypal-australia.com.au', 'paypal-business.co.uk', 'paypal-business.com.au', 'paypal-businesscenter.com', 'paypal-communications.com', 'paypal-danmark.dk', 'paypal-donations.co.uk')] [...] ``` -------------------------------- ### Search for an Organisation by Name Source: https://github.com/networksdb/python/blob/master/README.md Perform an organization search using a keyword to find matching organizations and their NetworksDB IDs. Results are sorted by the number of IPv4 addresses. ```python >>> search = api.org_search('Github') >>> search.total 1 >>> search.results[0].organisation 'GitHub, Inc' >>> search.results[0].id 'github-inc' ``` -------------------------------- ### Perform Reverse DNS Lookup Source: https://context7.com/networksdb/python/llms.txt Finds all domain names that resolve to a specific IP address. Returns the total count and a list of domain names. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get domains resolving to an IP reverse_dns = api.reverse_dns('185.199.108.153') print(reverse_dns.total) print(reverse_dns.results[:5]) ``` -------------------------------- ### Perform Reverse DNS Lookup Source: https://github.com/networksdb/python/blob/master/README.md List domain names resolving to a specific IPv4 or IPv6 address. Access the total count and a list of results. ```python >>> reverse_dns = api.reverse_dns('185.199.108.153') >>> reverse_dns.total 96658 >>> reverse_dns.results[:10] ('0-0.uk', '0000000000000.net', '000fff.design', '001.run', '0061.ru', '00ul.com', '01-partners.com', '01010111.com', '013627.xyz', '01coin.io') ``` -------------------------------- ### Find All Domains Hosted by an Organization Source: https://context7.com/networksdb/python/llms.txt Combines organization network lookup with mass reverse DNS to enumerate all domains hosted by a company across its IP space. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get all networks for an organization networks = api.org_networks('paypal-inc') # Iterate through each network and get domains all_domains = [] for network in networks.results: mass_reverse = api.mass_reverse_dns(network.first_ip, network.last_ip) for result in mass_reverse.results: all_domains.extend(result.domains) print(f"Found {len(all_domains)} domains") ``` -------------------------------- ### API Key Information API Source: https://context7.com/networksdb/python/llms.txt Check your API key status, quota usage, and remaining allowances. ```APIDOC ## API Key Information ### Description Check your API key status, quota usage, and remaining allowances. ### Method GET (Implicit) ### Endpoint `/key_info` ### Parameters None ### Request Example ```python api = NetworksDB('your-api-key') key_info = api.key_info() ``` ### Response #### Success Response (200) - The response contains details about the API key's status, quota, and usage. #### Response Example ```json { "status": "active", "quota": { "limit": 10000, "remaining": 9876 }, "usage": { "today": 124 } } ``` ``` -------------------------------- ### Finding All Domains Hosted by an Organization API Source: https://context7.com/networksdb/python/llms.txt Combine organization network lookup with mass reverse DNS to enumerate all domains hosted by a company across their entire IP space. ```APIDOC ## Finding All Domains Hosted by an Organization ### Description Combine organization network lookup with mass reverse DNS to enumerate all domains hosted by a company across their entire IP space. ### Method GET (Implicit) ### Endpoint `/org_networks` and `/mass_reverse_dns` ### Parameters #### Query Parameters (for `org_networks`) - **organization_name** (string) - Required - The name of the organization. #### Query Parameters (for `mass_reverse_dns`) - **start_ip** (string) - Required - The starting IP address of the network range. - **end_ip** (string) - Required - The ending IP address of the network range. ### Request Example ```python api = NetworksDB('your-api-key') # Get all networks for an organization networks = api.org_networks('paypal-inc') # Iterate through each network and get domains all_domains = [] for network in networks.results: mass_reverse = api.mass_reverse_dns(network.first_ip, network.last_ip) for result in mass_reverse.results: all_domains.extend(result.domains) print(f"Found {len(all_domains)} domains") ``` ### Response #### Success Response (200) - The response from `org_networks` provides a list of network objects, each with `first_ip` and `last_ip`. - The response from `mass_reverse_dns` provides a list of IP addresses and their associated domains. #### Response Example (Illustrative - combining results) ```json { "message": "Found 150 domains", "domains_list": [ "paypal.com.cn", "paypalobjects.com", "paypalbenefits.com" // ... more domains ] } ``` ``` -------------------------------- ### Query DNS Records for a Domain Source: https://context7.com/networksdb/python/llms.txt Retrieves DNS records for a given domain name. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get DNS information for a domain dns_info = api.dns('github.com') print(dns_info) ``` -------------------------------- ### Print Full API Response Source: https://github.com/networksdb/python/blob/master/README.md View the complete raw API response for any Response object by printing it. This is useful for inspecting all available data. ```python >>> print(ip) { "ip": "8.8.8.8", "domains_on_ip": 7243, "url": "https://networksdb.io/ip/8.8.8.8", "organisation": { "name": "Google LLC", "id": "google-llc", "url": "https://networksdb.io/ip-addresses-of/google-llc" }, "network": { "netname": "LVLT-GOGL-8-8-8", "description": "Google LLC", "cidr": "8.8.8.0/24", "first_ip": "8.8.8.0", "last_ip": "8.8.8.255", "url": "https://networksdb.io/ips-in-network/8.8.8.0/8.8.8.255" } } ``` -------------------------------- ### Reverse DNS Lookup API Source: https://context7.com/networksdb/python/llms.txt Find all domain names that resolve to a specific IP address. Returns the total count and a list of domain names. ```APIDOC ## Reverse DNS Lookup ### Description Find all domain names that resolve to a specific IP address. Returns the total count and a list of domain names. ### Method GET (Implicit) ### Endpoint `/reverse_dns/{ip_address}` ### Parameters #### Path Parameters - **ip_address** (string) - Required - The IP address to look up. ### Request Example ```python api = NetworksDB('your-api-key') reverse_dns = api.reverse_dns('185.199.108.153') ``` ### Response #### Success Response (200) - **total** (integer) - The total number of domain names found. - **results** (list) - A list of domain names. #### Response Example ```json { "total": 96658, "results": [ "0-0.uk", "0000000000000.net", "000fff.design", "001.run", "0061.ru" ] } ``` ``` -------------------------------- ### Organization Information by ID Source: https://context7.com/networksdb/python/llms.txt Retrieve detailed information about an organization using its ID, including address, phone, operating countries, network counts, and assigned ASNs. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get organization details by ID github = api.org_info('github-inc') print(github.organisation) # 'GitHub, Inc' print(github.countries) # ['United States'] print(github.networks.ipv4) # 8 print(github.networks.ipv6) # 2 print(github.networks_by_country) # {'United States': 10} print(github.asns) # ['36459'] # Print full response print(github) # { # "organisation": "GitHub, Inc", # "id": "github-inc", # "countries": ["United States"], # "networks": {"ipv4": 8, "ipv6": 2}, # "asns": ["36459"] # } ``` -------------------------------- ### Perform Mass Reverse DNS Lookup Source: https://context7.com/networksdb/python/llms.txt Performs reverse DNS lookups on an entire network range, returning all domain names for each IP address. Accepts CIDR notation or start/end IP addresses. Note: This feature is not available to free API keys. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Mass reverse DNS using CIDR notation mass_reverse = api.mass_reverse_dns('185.199.108.0/22') print(mass_reverse.total) for result in mass_reverse.results[:5]: print(f"{result.ip}: {result.domains}") # Mass reverse DNS using IP range mass_reverse = api.mass_reverse_dns('185.199.108.0', '185.199.111.255') ``` -------------------------------- ### Organization Search by Name Source: https://context7.com/networksdb/python/llms.txt Search for organizations by name to find their NetworksDB ID. Results are sorted by the number of IPv4 addresses. Use the returned ID for subsequent organization-related queries. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Search for an organization search = api.org_search('Github') print(search.total) # 1 print(search.results[0].organisation) # 'GitHub, Inc' print(search.results[0].id) # 'github-inc' # Search with broader terms search = api.org_search('Google') for result in search.results: print(f"{result.organisation}: {result.id}") ``` -------------------------------- ### List Organization Networks Source: https://context7.com/networksdb/python/llms.txt List all IP network ranges owned or operated by an organization. Supports both IPv4 (default) and IPv6 networks with a flag parameter. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get IPv4 networks for an organization github_networks = api.org_networks('github-inc') for network in github_networks.results: print(f"{network.netname}: {network.cidr}") print(f" Description: {network.description}") print(f" Range: {network.first_ip} - {network.last_ip}") # Output: # GITHU: 140.82.112.0/20 # Description: GitHub, Inc # Range: 140.82.112.0 - 140.82.127.255 ``` -------------------------------- ### Mass Reverse DNS Lookup API Source: https://context7.com/networksdb/python/llms.txt Perform reverse DNS lookups on an entire network range, returning all domain names for each IP address in the range. Accepts either CIDR notation or start/end IP addresses. ```APIDOC ## Mass Reverse DNS Lookup ### Description Perform reverse DNS lookups on an entire network range, returning all domain names for each IP address in the range. Accepts either CIDR notation or start/end IP addresses. Note: This feature is not available to free API keys. ### Method GET (Implicit) ### Endpoint `/mass_reverse_dns` ### Parameters #### Query Parameters - **cidr** (string) - Required - The network range in CIDR notation (e.g., '185.199.108.0/22'). OR - **start_ip** (string) - Required - The starting IP address of the range. - **end_ip** (string) - Required - The ending IP address of the range. ### Request Example ```python api = NetworksDB('your-api-key') # Using CIDR notation mass_reverse = api.mass_reverse_dns('185.199.108.0/22') # Using IP range mass_reverse = api.mass_reverse_dns('185.199.108.0', '185.199.111.255') ``` ### Response #### Success Response (200) - **total** (integer) - The total number of IP addresses processed. - **results** (list) - A list of objects, where each object contains an IP address and its associated domains. - **ip** (string) - The IP address. - **domains** (list) - A list of domain names resolving to the IP address. #### Response Example ```json { "total": 359808, "results": [ { "ip": "185.199.108.0", "domains": [ "jidanlee.com", "jitianbo.com", "tessmichi.com" ] }, { "ip": "185.199.108.1", "domains": [ "deepwaves.tech" ] } ] } ``` ``` -------------------------------- ### Retrieve ASN Networks Source: https://context7.com/networksdb/python/llms.txt Retrieves a list of network prefixes announced by a specific ASN. Can fetch both IPv4 and IPv6 networks. Requires an initialized NetworksDB API object. ```python from networksdb import NetworksDB api = NetworksDB('your-api-key') # Get IPv4 networks announced by an ASN as_nets = api.asn_networks(19956) for net in as_nets.results: print(f"{net.cidr} ({net.countrycode}): {net.organisation.name}") # Get IPv6 networks ipv6_nets = api.asn_networks(19956, ipv6=True) ``` -------------------------------- ### DNS Lookup API Source: https://context7.com/networksdb/python/llms.txt Query DNS records for a domain name. ```APIDOC ## DNS Lookup ### Description Query DNS records for a domain name. ### Method GET (Implicit) ### Endpoint `/dns/{domain}` ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to look up. ### Request Example ```python api = NetworksDB('your-api-key') dns_info = api.dns('github.com') ``` ### Response #### Success Response (200) - The response contains DNS records for the domain. The exact structure may vary depending on the DNS record types available. #### Response Example ```json { "github.com": { "A": [ "140.82.112.4" ], "AAAA": [ "2606:50c0:8000::154", "2606:50c0:8001::154", "2606:50c0:8002::154", "2606:50c0:8003::154" ], "MX": [ { "priority": 10, "exchange": "mail.github.com." } ], "TXT": [ "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd96", "globalsign-smime-dv=CDCD88E45793F42813C90A7377A7377C" ] } } ``` ``` -------------------------------- ### List Organisation IPv6 Networks Source: https://github.com/networksdb/python/blob/master/README.md Fetch a list of all IPv6 network ranges owned or operated by a specific organization, identified by its NetworksDB ID. Displays network name, description, and CIDR. ```python >>> github_ipv6_networks = api.org_networks(github.id, ipv6=True) >>> for range in github_ipv6_networks.results: ... print(range.netname, range.description, range.cidr) ... US-GITHUB-20170419 GitHub, Inc 2a0a:a440::/29 GITHUB-NET6-1 GitHub, Inc 2620:112:3000::/44 ``` -------------------------------- ### List Organisation IPv4 Networks Source: https://github.com/networksdb/python/blob/master/README.md Fetch a list of all IPv4 network ranges owned or operated by a specific organization, identified by its NetworksDB ID. Displays network name, description, and CIDR. ```python >>> github_networks = api.org_networks(github.id) >>> for range in github_networks.results: ... print(range.netname, range.description, range.cidr) ... GITHU GitHub, Inc 140.82.112.0/20 US-GITHUB-20170413 GitHub, Inc 185.199.108.0/22 GITHUB-NET4-1 GitHub, Inc 192.30.252.0/22 RSPC-728F4421-0D7C-4F42-BDFD-A6D290538501 GitHub 74.205.116.224/28 ZAYO-IDIA-235983-64-124-138-32-28 GitHub 64.124.138.32/28 RSPC-039EB5D8-39DC-445A-9C23-05529A657DDC GitHub 148.62.46.192/29 RSPC-48B1F3A4-2615-4566-99CD-D126E3C102BB GitHub 174.143.3.100/30 RSPC-CC4A7060-6141-4A22-BD6B-98A2B581247D GitHub 148.62.46.150/31 ``` -------------------------------- ### Retrieve Networks Announced by an ASN Source: https://github.com/networksdb/python/blob/master/README.md Retrieve a list of networks announced by a specific ASN. For each network, display its CIDR notation, country code, and the organization name it's assigned to. Use `ipv6=True` to retrieve IPv6 networks. ```python >>> as_nets = api.asn_networks(19956) >>> for net in as_nets.results: ... print(net.cidr, net.countrycode, net.organisation.name) ... 12.204.201.0/24 US AT&T Services, Inc. 12.204.208.0/24 US State of Tennesse-Nettn 12.204.209.0/24 US AT&T Services, Inc. 64.79.176.0/21 US Southwest Tennessee Community College 64.79.184.0/21 US Southwest Tennessee Community College 66.4.14.0/23 US AT&T Services, Inc. 66.4.27.0/24 US AT&T Services, Inc. 66.4.28.0/22 US AT&T Services, Inc. 70.150.247.0/24 US TNII Networks 72.159.76.0/24 US Tennessee State Govt 170.141.60.0/23 US AT&T Services, Inc. 170.141.62.0/24 US AT&T Services, Inc. 170.178.136.0/22 US Motlow State Community College 192.230.240.0/20 US Chattanooga State Community College 198.146.0.0/16 US Tennessee Board of Regents 206.23.0.0/16 US Tennessee Board of Regents 208.63.129.0/24 US AT&T Services, Inc. 208.182.101.0/24 US AT&T Services, Inc. ``` -------------------------------- ### ASN Information API Source: https://context7.com/networksdb/python/llms.txt Query information about an Autonomous System Number (ASN) including the owner company, description, and count of announced network prefixes. ```APIDOC ## ASN Information ### Description Query information about an Autonomous System Number (ASN) including the owner company, description, and count of announced network prefixes. ### Method GET (Implicit) ### Endpoint `/asn_info/{asn}` ### Parameters #### Path Parameters - **asn** (integer) - Required - The Autonomous System Number. ### Request Example ```python api = NetworksDB('your-api-key') asn = api.asn_info(19956) ``` ### Response #### Success Response (200) - **as_name** (string) - The name of the ASN. - **description** (string) - A description of the ASN. - **networks_announced** (object) - An object containing counts of announced IPv4 and IPv6 prefixes. - **ipv4** (integer) - Number of IPv4 prefixes announced. - **ipv6** (integer) - Number of IPv6 prefixes announced. #### Response Example ```json { "as_name": "TENNESSEE-NET", "description": "AT&T Corp.", "networks_announced": { "ipv4": 18, "ipv6": 0 } } ``` ``` -------------------------------- ### Perform Mass Reverse DNS Lookup on a Network Block Source: https://github.com/networksdb/python/blob/master/README.md Perform reverse DNS lookups on an entire network block. Note: This feature is not available for free API keys. The results include IP addresses and their associated domains. ```python >>> mass_reverse = api.mass_reverse_dns('185.199.108.0/22') >>> mass_reverse.total 359808 >>> for res in mass_reverse.results[:4]: ... print(res.ip, res.domains) ... 185.199.108.0 ('jidanlee.com', 'jitianbo.com', 'tessmichi.com') 185.199.108.1 ('deepwaves.tech',) 185.199.108.15 ('canyourecognize.ga', 'djuric.se', 'glenberis.co.uk', 'hectormanrique.com', 'trustkaro.com') 185.199.108.22 ('jidanlee.com',) ``` -------------------------------- ### ASN Networks API Source: https://context7.com/networksdb/python/llms.txt Retrieve the list of network prefixes announced by an ASN, including details about which organization each prefix is allocated to. ```APIDOC ## ASN Networks ### Description Retrieve the list of network prefixes announced by an ASN, including details about which organization each prefix is allocated to. ### Method GET (Implicit) ### Endpoint `/asn_networks/{asn}` ### Parameters #### Path Parameters - **asn** (integer) - Required - The Autonomous System Number. #### Query Parameters - **ipv6** (boolean) - Optional - Set to `True` to retrieve IPv6 networks. ### Request Example ```python api = NetworksDB('your-api-key') as_nets = api.asn_networks(19956) ``` ### Response #### Success Response (200) - **results** (list) - A list of network objects, each containing CIDR, country code, and organization name. - **cidr** (string) - The network prefix in CIDR notation. - **countrycode** (string) - The two-letter country code. - **organisation.name** (string) - The name of the organization. #### Response Example ```json { "results": [ { "cidr": "12.204.201.0/24", "countrycode": "US", "organisation": { "name": "AT&T Services, Inc." } }, { "cidr": "64.79.176.0/21", "countrycode": "US", "organisation": { "name": "Southwest Tennessee Community College" } } ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.