Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewcopeland/ipdetective-client-python
IPDetective client allows you to easily get information about an IP address like if type (bot, datacenter, vpn), country of origin and ASN number.
https://github.com/andrewcopeland/ipdetective-client-python
address asn bot detection geolocation ip
Last synced: about 1 month ago
JSON representation
IPDetective client allows you to easily get information about an IP address like if type (bot, datacenter, vpn), country of origin and ASN number.
- Host: GitHub
- URL: https://github.com/andrewcopeland/ipdetective-client-python
- Owner: AndrewCopeland
- License: mit
- Created: 2024-03-23T02:13:19.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-23T03:17:44.000Z (8 months ago)
- Last Synced: 2024-04-24T21:43:11.707Z (7 months ago)
- Topics: address, asn, bot, detection, geolocation, ip
- Language: Python
- Homepage: https://ipdetective.io
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IPDetective Client
[IPDetective](https://ipdetective.io) is an API that focuses on bot and non-human IP detection to quickly identify if an IP address comes from a datacenter, VPN or proxy. You can signup to the free API by simply signing in to access your API key. IPDetective tracks over 1000 ASNs and detects over 250 million IP addresses as non-human users from +100 different origins, ranging from data centers, botnets, proxies and vpns.## Features
- IP Bot Detection
- IP Geolocation
- IP ASN## Usage
```python3
import os
from ipdetective import IPDetectivedef main():
api_key = os.getenv('IPDETECTIVE_API_KEY')
ip_client = IPDetective(api_key)
# Get information about a singular IP address
ip_info = ip_client.GetIpInfo('8.8.8.8')
print(ip_info)
# {'ip': '8.8.8.8', 'bot': True, 'type': 'bot', 'asn': 15169, 'asn_description': 'GOOGLE', 'country_code': 'US', 'country_name': 'United States of America'}# Get information about build IP addresses
bulk_ip_info = ip_client.GetBulkIpInfo(['8.8.8.8', '1.1.1.1'])
print(bulk_ip_info)
# [{'ip': '1.1.1.1', 'bot': True, 'type': 'bot', 'asn': 13335, 'asn_description': 'CLOUDFLARENET', 'country_code': 'US', 'country_name': 'United States of America'}, {'ip': '8.8.8.8', 'bot': True, 'type': 'bot', 'asn': 15169, 'asn_description': 'GOOGLE', 'country_code': 'US', 'country_name': 'United States of America'}]if __name__ == "__main__":
main()
```[Check out our website](https://ipdetective.io)