Skip to content

Commit 98788d0

Browse files
committed
Read an AS's rank, neighbors and hosted domains, and the plan's name
Re-pins the spec to 2026.11.15. A paid AS answer now carries rank, tier1, num_upstreams, upstreams, num_peers, peers, num_downstreams, downstreams and hosted_domains (a total and up to 10 domains), each absent on a plan without it, as the AS answer's other paid members are, and refused as a server error when served as the wrong type. The entitlement's plan carries name, the name to show (Unlimited on the free plan), beside key, the identifier to compare against. The download docs now say in plain words that the link only has to be valid when a transfer starts.
1 parent b29d860 commit 98788d0

79 files changed

Lines changed: 885 additions & 102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎scripts/generate.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ MODELS="${MODELS}:OauthMetadata:DeviceAuthorization:TokenResponse:ClientRegistra
5858
MODELS="${MODELS}:LookupResponse:ClassDetail:ProxyDetail:PubproxyDetail:CarrierDetail:SatelliteDetail"
5959
MODELS="${MODELS}:SshDetail:SmtpDetail:WebDetail:DnsResolverDetail:BitTorrentDetail"
6060
MODELS="${MODELS}:Location:Asn:Company:AbuseContact:Whois:Rwhois:HostedDomains"
61-
MODELS="${MODELS}:AsnLookupResponse:AsnPrefix"
61+
MODELS="${MODELS}:AsnLookupResponse:AsnPrefix:AsnHostedDomains"
6262
MODELS="${MODELS}:DomainLookupResponse:DomainDns:DnsAddressRecord:DnsMxRecord:DnsNsRecord:DnsCnameRecord"
6363
MODELS="${MODELS}:DomainIpRanges:DomainIpRange:DisposableDetail"
6464
MODELS="${MODELS}:BatchLookupRequest:BatchLookupResponse:BatchLookupResponse_results_value:BatchLookupError"

‎spec/openapi.yaml‎

Lines changed: 98 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ info:
1313
email: support@internetdata.io
1414
url: https://internetdata.io
1515
termsOfService: https://internetdata.io/terms
16-
version: 2026.11.14
16+
version: 2026.11.15
1717
servers:
1818
- url: https://internetdata.io
1919
tags:
@@ -1747,13 +1747,16 @@ paths:
17471747
description: >
17481748
Answers what InternetData knows about one autonomous system: its registration on every plan,
17491749
1750-
and on a paid one its ASN Whois record and every prefix it announces in global BGP, with
1751-
RPKI status,
1750+
and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI
1751+
status,
17521752
1753-
up to 20000 per address family (the counts beside them are always whole). An AS no database
1754-
knows answers
1753+
up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from
1754+
ASN
17551755
1756-
its number with empty values.
1756+
Extended, up to 20000 each (the counts beside them are always whole), and the domains it
1757+
hosts. An AS no
1758+
1759+
database knows answers its number with empty values.
17571760
parameters:
17581761
- in: path
17591762
name: asn
@@ -1784,7 +1787,7 @@ paths:
17841787
allocated: '2005-06-06'
17851788
domain: m247global.com
17861789
paid:
1787-
summary: A paid plan, two of its prefixes shown
1790+
summary: A paid plan, two of each list shown
17881791
value:
17891792
asn: 9009
17901793
name: M247 Europe SRL
@@ -1856,6 +1859,25 @@ paths:
18561859
country: US
18571860
size: 0
18581861
other_origins: []
1862+
rank: 341
1863+
tier1: false
1864+
num_upstreams: 18
1865+
upstreams:
1866+
- 174
1867+
- 260
1868+
num_peers: 1018
1869+
peers:
1870+
- 42
1871+
- 286
1872+
num_downstreams: 146
1873+
downstreams:
1874+
- 3210
1875+
- 3503
1876+
hosted_domains:
1877+
total: 51759
1878+
domains:
1879+
- fotopedia.com
1880+
- kissfm.ro
18591881
'400':
18601882
description: Not an address, an AS number or a domain.
18611883
content:
@@ -2443,6 +2465,7 @@ paths:
24432465
allowed_cidrs: []
24442466
plan:
24452467
key: max
2468+
name: Max
24462469
tier: max
24472470
usage:
24482471
requests: 580
@@ -2464,6 +2487,7 @@ paths:
24642487
allowed_cidrs: []
24652488
plan:
24662489
key: free
2490+
name: Unlimited
24672491
tier: free
24682492
usage:
24692493
requests: 37
@@ -4104,6 +4128,22 @@ components:
41044128
description: >-
41054129
From IP Hosted Domains: how many registered domains resolve to the address, and the 10 most
41064130
popular. Its database lists up to 1,000 an address. Paid plans and the trial.
4131+
AsnHostedDomains:
4132+
type: object
4133+
properties:
4134+
total:
4135+
type: integer
4136+
description: How many registered domains resolve to an address the AS announces.
4137+
domains:
4138+
type: array
4139+
items:
4140+
type: string
4141+
description: Up to 10 of them, the most popular first; `[]` when none does.
4142+
required:
4143+
- total
4144+
description: >-
4145+
From ASN Hosted Domains: how many registered domains the AS hosts, and the 10 most popular.
4146+
Its database lists up to 1,000 an AS. Paid plans and the trial.
41074147
AsnLookupResponse:
41084148
type: object
41094149
properties:
@@ -4158,6 +4198,44 @@ components:
41584198
items:
41594199
$ref: '#/components/schemas/AsnPrefix'
41604200
description: What it announces, IPv4 then IPv6, up to 20000 a family. Paid plans and the trial.
4201+
rank:
4202+
type: integer
4203+
description: >-
4204+
Its rank in ASN Extended, by customer cone, 1 the largest; `0` for an AS seen in no AS
4205+
path. Paid plans and the trial.
4206+
tier1:
4207+
type: boolean
4208+
description: >-
4209+
Whether it is one of the transit-free networks at the top of the hierarchy, which get
4210+
transit from no one and peer with each other. Paid plans and the trial.
4211+
num_upstreams:
4212+
type: integer
4213+
description: How many AS numbers it gets transit from. Paid plans and the trial.
4214+
upstreams:
4215+
type: array
4216+
items:
4217+
type: integer
4218+
description: Those AS numbers, ascending, up to 20000. Paid plans and the trial.
4219+
num_peers:
4220+
type: integer
4221+
description: >-
4222+
How many AS numbers it exchanges its own and its customers' routes with. Paid plans and
4223+
the trial.
4224+
peers:
4225+
type: array
4226+
items:
4227+
type: integer
4228+
description: Those AS numbers, ascending, up to 20000. Paid plans and the trial.
4229+
num_downstreams:
4230+
type: integer
4231+
description: How many AS numbers it provides transit to. Paid plans and the trial.
4232+
downstreams:
4233+
type: array
4234+
items:
4235+
type: integer
4236+
description: Those AS numbers, ascending, up to 20000. Paid plans and the trial.
4237+
hosted_domains:
4238+
$ref: '#/components/schemas/AsnHostedDomains'
41614239
trial_expired:
41624240
type: boolean
41634241
description: >-
@@ -4501,15 +4579,24 @@ components:
45014579
type: object
45024580
required:
45034581
- key
4582+
- name
45044583
- tier
45054584
properties:
45064585
key:
45074586
type: string
45084587
description: |
4509-
The plan the organization is on: `free` for the free plan,
4510-
Unlimited, or a paid plan's key. On `free`, usage counts the
4588+
The plan the organization is on, as an identifier that is never
4589+
renamed or reused: `free` for the free plan, or a paid plan's key.
4590+
Compare against it and show `name`. On `free`, usage counts the
45114591
day's lookups answered with every field, its daily trial.
45124592
example: max
4593+
name:
4594+
type: string
4595+
description: |
4596+
The plan's name, as the site and console show it: `Unlimited` for
4597+
the free plan. Show this rather than a name built from `key`: a
4598+
plan's name can change, and its key never does.
4599+
example: Max
45134600
tier:
45144601
type: string
45154602
enum:
@@ -4519,7 +4606,8 @@ components:
45194606
- max
45204607
description: |
45214608
The field tier, which decides how much of a lookup answer comes
4522-
back; `free` is the free plan's. What each tier includes is documented
4609+
back; `free` is the free plan's. This list never gains a value: a
4610+
new plan reports one of these. What each tier includes is documented
45234611
on the lookup endpoint rather than repeated here, so there is one
45244612
place it can be wrong.
45254613
EntitlementUsage:

‎src/main/java/io/internetdata/AsnResult.java‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.internetdata;
22

3+
import io.internetdata.model.AsnHostedDomains;
34
import io.internetdata.model.AsnLookupResponse;
45
import io.internetdata.model.AsnPrefix;
56

@@ -95,6 +96,51 @@ public Optional<List<AsnPrefix>> prefixes() {
9596
return Optional.ofNullable(raw.getPrefixes());
9697
}
9798

99+
/** Its rank in ASN Extended by customer cone, 1 the largest; 0 for an AS seen in no AS path. Paid plans. */
100+
public Optional<Integer> rank() {
101+
return Optional.ofNullable(raw.getRank());
102+
}
103+
104+
/** Whether it is one of the transit-free networks at the top of the hierarchy. Paid plans. */
105+
public Optional<Boolean> tier1() {
106+
return Optional.ofNullable(raw.getTier1());
107+
}
108+
109+
/** How many AS numbers it gets transit from. Paid plans. */
110+
public Optional<Integer> numUpstreams() {
111+
return Optional.ofNullable(raw.getNumUpstreams());
112+
}
113+
114+
/** Those AS numbers, ascending, up to 20000. Paid plans. */
115+
public Optional<List<Integer>> upstreams() {
116+
return Optional.ofNullable(raw.getUpstreams());
117+
}
118+
119+
/** How many AS numbers it exchanges its own and its customers' routes with. Paid plans. */
120+
public Optional<Integer> numPeers() {
121+
return Optional.ofNullable(raw.getNumPeers());
122+
}
123+
124+
/** Those AS numbers, ascending, up to 20000. Paid plans. */
125+
public Optional<List<Integer>> peers() {
126+
return Optional.ofNullable(raw.getPeers());
127+
}
128+
129+
/** How many AS numbers it provides transit to. Paid plans. */
130+
public Optional<Integer> numDownstreams() {
131+
return Optional.ofNullable(raw.getNumDownstreams());
132+
}
133+
134+
/** Those AS numbers, ascending, up to 20000. Paid plans. */
135+
public Optional<List<Integer>> downstreams() {
136+
return Optional.ofNullable(raw.getDownstreams());
137+
}
138+
139+
/** How many registered domains it hosts, and the 10 most popular. Paid plans. */
140+
public Optional<AsnHostedDomains> hostedDomains() {
141+
return Optional.ofNullable(raw.getHostedDomains());
142+
}
143+
98144
/**
99145
* On answers to a key on the free plan only: {@code false} while its organization's daily
100146
* trial lasts, {@code true} once the answer has Unlimited's.

‎src/main/java/io/internetdata/RequiredMembers.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import io.internetdata.model.AbuseContact;
2222
import io.internetdata.model.Asn;
23+
import io.internetdata.model.AsnHostedDomains;
2324
import io.internetdata.model.AsnLookupResponse;
2425
import io.internetdata.model.AsnPrefix;
2526
import io.internetdata.model.BatchLookupError;
@@ -108,6 +109,7 @@ final class RequiredMembers extends BeanDeserializerModifier {
108109
"abuse_email", "asn")),
109110
Map.entry(Rwhois.class, List.of("id", "name", "country", "source", "domain", "abuse_email")),
110111
Map.entry(HostedDomains.class, List.of("total")),
112+
Map.entry(AsnHostedDomains.class, List.of("total")),
111113
Map.entry(AsnLookupResponse.class, List.of("asn", "name", "country", "registry", "allocated", "domain")),
112114
Map.entry(AsnPrefix.class, List.of("prefix", "peer_count", "rpki_status", "first_seen", "country", "size",
113115
"other_origins")),
@@ -122,7 +124,7 @@ final class RequiredMembers extends BeanDeserializerModifier {
122124
Map.entry(DomainIpRange.class, List.of("range", "name", "country")),
123125
Map.entry(Entitlement.class, List.of("org_id", "apikey", "plan", "usage")),
124126
Map.entry(EntitlementApikey.class, List.of("id", "allowed_cidrs")),
125-
Map.entry(EntitlementPlan.class, List.of("key", "tier")),
127+
Map.entry(EntitlementPlan.class, List.of("key", "name", "tier")),
126128
Map.entry(EntitlementUsage.class, List.of("requests", "quota", "window_start", "window_end")),
127129
Map.entry(DatabaseList.class, List.of("databases")),
128130
Map.entry(DownloadList.class, List.of("downloads")),

‎src/main/java/io/internetdata/api/DatabaseV2Api.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

‎src/main/java/io/internetdata/api/EntitlementApi.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

‎src/main/java/io/internetdata/api/LookupApi.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -169,7 +169,7 @@ private File prepareDownloadFile(HttpResponse<InputStream> response) throws IOEx
169169

170170
/**
171171
* ASN lookup
172-
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record and every prefix it announces in global BGP, with RPKI status, up to 20000 per address family (the counts beside them are always whole). An AS no database knows answers its number with empty values.
172+
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.
173173
* @param asn The AS number, as &#x60;AS15169&#x60; in any case, or the bare number. (required)
174174
* @return AsnLookupResponse
175175
* @throws ApiException if fails to make API call
@@ -180,7 +180,7 @@ public AsnLookupResponse lookupAsn(@javax.annotation.Nonnull String asn) throws
180180

181181
/**
182182
* ASN lookup
183-
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record and every prefix it announces in global BGP, with RPKI status, up to 20000 per address family (the counts beside them are always whole). An AS no database knows answers its number with empty values.
183+
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.
184184
* @param asn The AS number, as &#x60;AS15169&#x60; in any case, or the bare number. (required)
185185
* @param headers Optional headers to include in the request
186186
* @return AsnLookupResponse
@@ -193,7 +193,7 @@ public AsnLookupResponse lookupAsn(@javax.annotation.Nonnull String asn, Map<Str
193193

194194
/**
195195
* ASN lookup
196-
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record and every prefix it announces in global BGP, with RPKI status, up to 20000 per address family (the counts beside them are always whole). An AS no database knows answers its number with empty values.
196+
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.
197197
* @param asn The AS number, as &#x60;AS15169&#x60; in any case, or the bare number. (required)
198198
* @return ApiResponse&lt;AsnLookupResponse&gt;
199199
* @throws ApiException if fails to make API call
@@ -204,7 +204,7 @@ public ApiResponse<AsnLookupResponse> lookupAsnWithHttpInfo(@javax.annotation.No
204204

205205
/**
206206
* ASN lookup
207-
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record and every prefix it announces in global BGP, with RPKI status, up to 20000 per address family (the counts beside them are always whole). An AS no database knows answers its number with empty values.
207+
* Answers what InternetData knows about one autonomous system: its registration on every plan, and on a paid one its ASN Whois record, every prefix it announces in global BGP, with RPKI status, up to 20000 per address family, its rank, Tier 1 flag, upstreams, peers and downstreams from ASN Extended, up to 20000 each (the counts beside them are always whole), and the domains it hosts. An AS no database knows answers its number with empty values.
208208
* @param asn The AS number, as &#x60;AS15169&#x60; in any case, or the bare number. (required)
209209
* @param headers Optional headers to include in the request
210210
* @return ApiResponse&lt;AsnLookupResponse&gt;

‎src/main/java/io/internetdata/internal/ApiClient.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

‎src/main/java/io/internetdata/internal/ApiException.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

‎src/main/java/io/internetdata/internal/ApiResponse.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* InternetData API
33
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
44
*
5-
* The version of the OpenAPI document: 2026.11.14
5+
* The version of the OpenAPI document: 2026.11.15
66
* Contact: support@internetdata.io
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)