Skip to main content

GEO IP

Best Free Rest API for IP-based user location detection.

97.5% IPv4 and IPv6 address coverage in our database with daily updates. Median data retrieval from the DB is 0.002 seconds.

More info and an absolutely free API Key: https://surfy.one/geoip

Installation

pip install Surfy.GeoIP

Usage

from geoip import GeoIP

lookup = GeoIP("email@example.com", "YOUR_FREE_API_KEY")
# Get a Free API Key > https://surfy.one/geoip

testIPs = ["8.8.8.8", "2a01:e35:8bd9:8bb0:92b:8628:5ca5:5f2b"];

results = []
for IP in testIPs:
	result = lookup.get(IP)
	results.append(result)

print(results)

'''

Results [
	{
		ip: '8.8.8.8',
		code: 'US',
		country: 'United States of America',
		region: 'California',
		city: 'Mountain View',
		latitude: 37.405992,
		longitude: -122.078515,
		zip: '94043',
		timezone: {
			id: "America/Los_Angeles",
			name: "Pacific Standard Time",
			gmt: "GMT-08:00","offset":-480,
			localTime: "11/12/2022, 10:02:08 AM GMT-08:00"
		},
		state: true
	},
	{
		ip: '2a01:e35:8bd9:8bb0:92b:8628:5ca5:5f2b',
		code: 'FR',
		country: 'France',
		region: 'Ile-de-France',
		city: 'Paris',
		latitude: 48.858365,
		longitude: 2.294532,
		zip: '75000',
		timezone: {
			id: "Europe/Paris",
			name: "Central European Standard Time",
			gmt: "GMT+01:00",
			offset: 60,
			localTime: "11/12/2022, 6:55:50 PM GMT+01:00"
		},
		state: true
	}
]

'''


MIT License

Copyright (c) Alexander Yermolenko • surfy.one

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for Surfy.GeoIP 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Surfy.GeoIP 1.0.2
File Size Uploaded Provenance Actions
Surfy.GeoIP-1.0.2.tar.gz 3.0 kB Without provenance Details for Surfy.GeoIP-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Surfy.GeoIP 1.0.2
File Interpreter ABI Platform Actions
Surfy.GeoIP-1.0.2-py3-none-any.whl Python 3 none any Details for Surfy.GeoIP-1.0.2-py3-none-any.whl

Total release size: 7.1 kB

Release files / Surfy.GeoIP-1.0.2.tar.gz

Download URL Surfy.GeoIP-1.0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ec199e7e2ddcbfd278d18ded54c366c1bc979c72d921303ec2326fbd77a6dcc3
BLAKE2b-256 checksum
How to use checksums
3c0b89035ee3ad39c0a9d849c5190d1b4f442f1da4506016e673cfdf9da640ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release files / Surfy.GeoIP-1.0.2-py3-none-any.whl

Download URL Surfy.GeoIP-1.0.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea28636dcd6a1262ecd42923e46eed2325073f7118861005b2cdf8404b4dcfbb
BLAKE2b-256 checksum
How to use checksums
7bd06a4ce8759b4db43f30201a61e241b9ba47b2c22b90c871dbdfd4f0c6e441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Security for Surfy.GeoIP 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page