Skip to content

Commit cbd33d4

Browse files
Merge pull request #2 from IPGeolocation/1-initial-suggestions-for-plugin-release
fix: docs + tables fields, update: made the ip field required for all…
2 parents b6bbd5f + da4c707 commit cbd33d4

14 files changed

Lines changed: 109 additions & 181 deletions

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
## v0.1.0 [2025-04-21]
1+
## v0.1.1 [2026-04-24]
2+
_Minor bug fixes + suggestions by Steampipe reviewer_
3+
4+
- Fixed bug in `ipgeolocation_asn` table where `as_number` is being written as `asn_number`
5+
- Fixed return values of `ipgeolocation_ip` where some of fields are pointing to non-existent fields of API
6+
- Removed `raw` field from all tables
7+
- Fixed typos in table documentation
8+
- Made the `ip` field required in all tables
9+
10+
## v0.1.0 [2026-04-21]
211

312
_Initial release_
413

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ select
77
ip,
88
country_name,
99
city,
10-
isp,
1110
timezone_name
1211
from
1312
ipgeolocation_ip
@@ -46,7 +45,7 @@ steampipe query "select ip, country_name, city from ipgeolocation_ip where ip =
4645
Prerequisites:
4746

4847
- [Steampipe](https://steampipe.io/downloads) ≥ 0.20
49-
- [Go](https://golang.org/dl/) 1.26+
48+
- [Go](https://golang.org/dl/) 1.24+
5049

5150
Clone the repo, build, and install:
5251

config/ipgeolocation.spc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
connection "ipgeolocation" {
22
plugin = "ipgeolocation/ipgeolocation"
33

4-
# API key from https://app.ipgeolocation.io/dashboard
5-
# Free tier works without a key for basic geolocation.
6-
# Paid plans unlock hostname, security, company, abuse, and user-agent modules.
4+
# API key from https://app.ipgeolocation.io/dashboard (Required)
75
# Can also be set with the IPGEOLOCATION_API_KEY environment variable.
86
api_key = "YOUR_API_KEY_HERE"
97
}

docs/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ select
2424
ip,
2525
country_name,
2626
city,
27-
isp,
2827
timezone_name
2928
from
3029
ipgeolocation_ip
@@ -47,28 +46,22 @@ where
4746
- **[Table: ipgeolocation_abuse](https://hub.steampipe.io/plugins/ipgeolocation/ipgeolocation/tables/ipgeolocation_abuse)** — abuse contact emails, phone numbers, and responsible organisation
4847
- **[Table: ipgeolocation_asn](https://hub.steampipe.io/plugins/ipgeolocation/ipgeolocation/tables/ipgeolocation_asn)** — ASN details, announced routes, peers, upstreams, downstreams, and WHOIS
4948

50-
## Get Started
51-
52-
### Install the plugin
49+
## Installation
5350

5451
```sh
5552
steampipe plugin install ipgeolocation/ipgeolocation
5653
```
5754

58-
### Configure credentials
55+
## Credentials
5956

60-
```sh
61-
steampipe plugin configure ipgeolocation
62-
```
63-
64-
Or create `~/.steampipe/config/ipgeolocation.spc` manually:
57+
Edit `~/.steampipe/config/ipgeolocation.spc`
6558

6659
```hcl
6760
connection "ipgeolocation" {
6861
plugin = "ipgeolocation/ipgeolocation"
6962
7063
# Get your API key at https://app.ipgeolocation.io/dashboard
71-
# Free tier works without a key for basic geolocation.
64+
# Can also be set with the IPGEOLOCATION_API_KEY environment variable
7265
# api_key = "YOUR_API_KEY_HERE"
7366
}
7467
```
@@ -79,12 +72,19 @@ You can also set the key via environment variable:
7972
export IPGEOLOCATION_API_KEY="YOUR_API_KEY_HERE"
8073
```
8174

82-
### Run your first query
75+
## Multiple Connections
8376

84-
```sh
85-
steampipe query "select ip, country_name, city from ipgeolocation_ip where ip = '1.1.1.1'"
77+
You can create multiple connections and combine them using an [aggregator connection](https://steampipe.io/docs/managing/connections#using-aggregators):
78+
79+
```hcl
80+
connection "ipgeolocation_all" {
81+
plugin = "ipgeolocation/ipgeolocation"
82+
type = "aggregator"
83+
connections = ["ipgeolocation_*"]
84+
}
8685
```
8786

87+
8888
## Example Queries
8989

9090
### Geolocate an IP

docs/tables/ipgeolocation_abuse.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,6 @@ where
3939
ip = '8.8.8.8';
4040
```
4141

42-
### Get role and handle information
43-
44-
```sql
45-
select
46-
ip,
47-
handle,
48-
role,
49-
kind,
50-
address
51-
from
52-
ipgeolocation_abuse
53-
where
54-
ip = '91.128.103.196';
55-
```
56-
57-
### Inspect the full raw response
58-
59-
```sql
60-
select
61-
ip,
62-
raw
63-
from
64-
ipgeolocation_abuse
65-
where
66-
ip = '1.1.1.1';
67-
```
68-
6942
---
7043

7144
## Column Reference
@@ -75,12 +48,9 @@ where
7548
| ip | text | Queried IP address |
7649
| route | text | CIDR block covering the IP |
7750
| country | text | ISO alpha-2 country of registrant |
78-
| handle | text | Registry NIC handle |
7951
| name | text | Abuse contact or IRT name |
8052
| organization | text | Responsible organisation |
81-
| role | text | Contact role (e.g. "abuse") |
8253
| kind | text | Contact kind (e.g. "group") |
8354
| address | text | Postal address |
8455
| emails | jsonb | Array of abuse email addresses |
85-
| phone_numbers | jsonb | Array of abuse phone numbers |
86-
| raw | jsonb | Full raw API response |
56+
| phone_numbers | jsonb | Array of abuse phone numbers |

docs/tables/ipgeolocation_asn.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ASN lookup using the [IPGeolocation.io](https://ipgeolocation.io) `/v3/asn` endp
44

55
Look up by IP address **or** ASN number. Returns the owning organisation, registration metadata (RIR, allocation date, status), announced route counts, and optionally the full list of routes, peers, upstreams, downstreams, and raw WHOIS text.
66

7-
> **Note:** Costs **1 credit** per request.
7+
> **Note:** This endpoint requires a **paid plan** API key and costs **1 credits per request**.
88
99
---
1010

@@ -15,7 +15,7 @@ Look up by IP address **or** ASN number. Returns the owning organisation, regist
1515
```sql
1616
select
1717
ip,
18-
asn_number,
18+
as_number,
1919
asn_name,
2020
organization,
2121
country,
@@ -31,7 +31,7 @@ where
3131

3232
```sql
3333
select
34-
asn_number,
34+
as_number,
3535
asn_name,
3636
organization,
3737
country,
@@ -42,54 +42,54 @@ select
4242
from
4343
ipgeolocation_asn
4444
where
45-
asn_number = 'AS15169';
45+
asn = 'AS15169';
4646
```
4747

4848
### Check how many routes an ASN announces
4949

5050
```sql
5151
select
52-
asn_number,
52+
as_number,
5353
organization,
5454
num_of_ipv4_routes,
5555
num_of_ipv6_routes
5656
from
5757
ipgeolocation_asn
5858
where
59-
asn_number = 'AS13335';
59+
asn = 'AS13335';
6060
```
6161

6262
### List all announced IP prefixes (routes)
6363

6464
```sql
6565
select
66-
asn_number,
66+
as_number,
6767
organization,
6868
jsonb_array_elements_text(routes) as prefix
6969
from
7070
ipgeolocation_asn
7171
where
72-
asn_number = 'AS15169';
72+
asn = 'AS15169';
7373
```
7474

7575
### Explore peering relationships
7676

7777
```sql
7878
select
79-
asn_number,
79+
as_number,
8080
organization,
8181
peers
8282
from
8383
ipgeolocation_asn
8484
where
85-
asn_number = 'AS12';
85+
asn = 'AS12';
8686
```
8787

8888
### Expand peers into individual rows
8989

9090
```sql
9191
select
92-
asn_number,
92+
as_number,
9393
organization,
9494
peer ->> 'as_number' as peer_asn,
9595
peer ->> 'description' as peer_name,
@@ -98,14 +98,14 @@ from
9898
ipgeolocation_asn,
9999
jsonb_array_elements(peers) as peer
100100
where
101-
asn_number = 'AS12';
101+
asn = 'AS12';
102102
```
103103

104104
### Show upstream transit providers
105105

106106
```sql
107107
select
108-
asn_number,
108+
as_number,
109109
organization,
110110
upstream ->> 'as_number' as upstream_asn,
111111
upstream ->> 'description' as upstream_name,
@@ -114,19 +114,19 @@ from
114114
ipgeolocation_asn,
115115
jsonb_array_elements(upstreams) as upstream
116116
where
117-
asn_number = 'AS12';
117+
asn = 'AS12';
118118
```
119119

120120
### Get raw WHOIS text
121121

122122
```sql
123123
select
124-
asn_number,
124+
as_number,
125125
whois_response
126126
from
127127
ipgeolocation_asn
128128
where
129-
asn_number = 'AS15169';
129+
asn = 'AS15169';
130130
```
131131

132132
---
@@ -136,7 +136,8 @@ where
136136
| Column | Type | Description |
137137
|---|---|---|
138138
| ip | text | IP used for lookup (when queried by IP) |
139-
| asn_number | text | AS number e.g. "AS15169" |
139+
| asn | text | ASN used for lookup (when queried by ASN) |
140+
| as_number | text | AS number e.g. "AS15169" |
140141
| asn_name | text | Short registered ASN name |
141142
| organization | text | Organisation owning the ASN |
142143
| country | text | ISO alpha-2 country of registration |
@@ -152,4 +153,3 @@ where
152153
| upstreams | jsonb | Array of upstream/transit ASNs |
153154
| downstreams | jsonb | Array of downstream customer ASNs |
154155
| whois_response | text | Raw WHOIS text |
155-
| raw | jsonb | Full raw API response |

docs/tables/ipgeolocation_ip.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Table: ipgeolocation_ip
22

3-
Look up geolocation, network, timezone, security, company, abuse, and hostname data for any IPv4, IPv6, or domain using the [IPGeolocation.io](https://ipgeolocation.io) v3 API.
3+
Look up geolocation, network, timezone, security, company, abuse, and hostname data for any IPv4, IPv6, or domain (paid only) using the [IPGeolocation.io](https://ipgeolocation.io) v3 API.
44

55
## Configuration
66

77
Configure your API key in `~/.steampipe/config/ipgeolocation.spc`:
88

99
```hcl
1010
connection "ipgeolocation" {
11-
plugin = "ipgeolocation"
11+
plugin = "ipgeolocation/ipgeolocation"
12+
13+
# API key from https://app.ipgeolocation.io/dashboard (Required)
1214
api_key = "YOUR_API_KEY_HERE"
1315
}
1416
```
1517

16-
A free-tier key from [ipgeolocation.io](https://app.ipgeolocation.io/dashboard) covers basic location data. Paid plans unlock security, hostname, company, and abuse modules.
18+
A free-tier key from [ipgeolocation.io](https://app.ipgeolocation.io/dashboard) covers basic location data. Paid plans unlock security, hostname, company, abuse data.
1719

1820
---
1921

@@ -48,7 +50,7 @@ from
4850
ipgeolocation_ip;
4951
```
5052

51-
### Check security signals for a suspicious IP
53+
### Check security signals for a suspicious IP (paid plan)
5254

5355
```sql
5456
select
@@ -71,7 +73,6 @@ where
7173
select
7274
ip,
7375
asn,
74-
isp,
7576
organization,
7677
connection_type
7778
from
@@ -111,18 +112,6 @@ where
111112
ip = '104.21.0.1';
112113
```
113114

114-
### Inspect the full raw JSON response
115-
116-
```sql
117-
select
118-
ip,
119-
raw
120-
from
121-
ipgeolocation_ip
122-
where
123-
ip = '8.8.4.4';
124-
```
125-
126115
---
127116

128117
## Column Reference
@@ -142,19 +131,19 @@ where
142131
| state_code | text | ISO 3166-2 state code |
143132
| district | text | District / county |
144133
| city | text | City |
145-
| locality | text | Locality |
134+
| locality | text | Locality (Paid) |
146135
| zipcode | text | ZIP / postal code |
147136
| latitude | text | Latitude |
148137
| longitude | text | Longitude |
149-
| accuracy_radius | text | Accuracy radius (km) |
138+
| accuracy_radius | text | Accuracy radius (km) (Paid) |
139+
| confidence | text | Confidence level (low, medium, high) (Paid) |
150140
| is_eu | bool | True if EU member state |
151141
| country_flag | text | Country flag image URL |
152142
| country_emoji | text | Country flag emoji |
153143
| geoname_id | text | GeoNames ID |
154-
| dma_code | text | DMA code (US only) |
144+
| dma_code | text | DMA code (US only) (Paid) |
155145
| asn | text | Autonomous System Number |
156-
| isp | text | ISP name |
157-
| organization | text | Network organization |
146+
| organization | text | ASN organization |
158147
| connection_type | text | Connection type |
159148
| timezone_name | text | IANA timezone name |
160149
| timezone_offset | bigint | UTC offset (seconds) |
@@ -179,4 +168,3 @@ where
179168
| abuse_address | text | Abuse postal address (paid) |
180169
| abuse_phone | text | Abuse phone (paid) |
181170
| abuse_network | text | Abuse CIDR block (paid) |
182-
| raw | jsonb | Full raw API response |

0 commit comments

Comments
 (0)