IPinfo on Google Cloud Platform
This document explores how to use our IP database within the Google Cloud Platform (GCP)'s data warehouse platform, BigQuery, delivered through GCP BigQuery - Analytics Hub.
IPinfo BigQuery Datasets available on BigQuery Analytics Hub
Compared to pushing our IP data to Google Cloud Storage (GCS), delivering it through Google Cloud Marketplace offers:
- Automatic loading into BigQuery — no custom scripts needed.
- Built-in metadata to track updates, and freshness.
- Ready-to-use query functions and clear documentation for easy use.
- Centralized data in BigQuery, making it simple to enrich IP data across other datasets and logs.
Just like our Cloud Data Push and Snowflake datasets, we keep your Analytics Hub datasets on your BigQuery environment up to date with regular updates — you don’t need to do anything after the initial subscription.
Available Datasets
IP Database | Region | Access | Features |
---|---|---|---|
IPinfo Lite | US / Default | Self Serve – Free | Accurate country and ASN info for free—no fees, no credit card, and unlimited usage. |
EU | |||
IPinfo Core | US / Default | On Request – Readily Available | Provides city-level accuracy along with key IP privacy details, such as VPN, hosting, satellite, and carrier detection. |
EU | |||
IPinfo Plus | US / Default | Comprehensive IP data with detailed context, including service classifications, confidence scores, and stability metrics. | |
EU | |||
Any IP database | Any Region | On Request | Any and all IP data available to be offered by IPinfo. Reach out to our sales team. |
Features
IPinfo BigQuery Datasets
Customers can access IPinfo IP data in BigQuery in these ways:
- Use the free IPinfo Lite dataset directly through GCP Analytics Hub.
- Request access to full IPinfo datasets through GCP Data Marketplace.
- Contact our sales team for a custom solution.
IP Lookup mechanism
IP datasets require specialized solutions to look up IP addresses. We recommend using our lookup method instead of building your own, as it’s optimized for the best performance. Our query functions support both IPv4 and IPv6 and offer an extremely efficient and easy-to-use solution.
Bringing log data from Cloud Logging
As the IPinfo data resides in BigQuery, you can bring in log data from GCP Cloud Logging and perform IP metadata enrichment (geolocation, privacy, ASN, etc.) inside BigQuery. We recommend checking the documentation provided by Google. Visit View logs routed to BigQuery.
We recommend ensuring that only distinct IP addresses are enriched instead of all the IP addresses in a log.
SELECT ip, ipinfo_lite.lite(ip)
FROM (SELECT DISTINCT ip FROM my_ips)
As Cloud Logging supports many different sources, IPinfo's data inside BigQuery acts as a powerful data enrichment and analytics platform.
IPinfo Lite database on GCP BigQuery Analytics Hub
IPinfo's Lite data is available on Google Cloud Analytics Hub:
Resources included
The IPinfo Lite BigQuery Dataset contains the following resources:
Resources | Type | Description |
---|---|---|
lite | TABLE | The main IPinfo Lite Dataset. Full accuracy and daily updated (from our end). |
ip_sample | TABLE | Sample of IP addresses to test out queries and learn. |
lite (available in routines) | FUNCTION | Query function, lookup IP address against the IP table |
gen_ranges (available in routines) | FUNCTION | Helper function used to support the Query function |
Using the lite
query function
We include a IP lookup function with our BigQuery datasets. It’s located in the dataset’s routine directory and shares the same name as the IP data table. No custom code is needed to start using it.
Example:
SELECT
ip,
ipinfo_lite.lite(ip) as lite
FROM
ipinfo_lite.ip_sample;
Code notes:
- ip_sample holds some random IP addresses.
lite()
is the UDF packaged with the dataset. The UDF name matches the dataset name, with () indicating it's a function.
Besides getting all the data at once, you can also specify individual columns of data that you need.
SELECT
ip,
ipinfo_lite.lite(ip).country as lite
FROM
ipinfo_lite.ip_sample;
IPinfo Core, IPinfo Plus, and other data on GCP Analytics Hub
Similar to IPinfo Lite on GCP, we are offering our IPinfo Core, IPinfo Plus, and any database on Analytics Hub available upon request. As usual, the data along with the query function will be delivered.
We welcome your feedback and if you have any feature requests or need support using the BQ IPinfo dataset, please create a post in our IPinfo Community.