API Reference
1. Info
- Title: gRPC API
- Version: 1.0.0
- Description: This documentation is generated from protobuf files using protoc-gen-doc.
2. Paths
IPLocation
IP 地址定位服务
GetIPInfo
- Summary: 获取 IP 的基础国家/地理等信息
- Method:
GetIPInfo - Endpoint:
ip_location.IPLocation/GetIPInfo - Request:
- Content-Type:
application/grpc - Schema: GetIPInfoRequest
- Content-Type:
- Response:
- Content-Type:
application/grpc - Schema: GetIPInfoResponse
- Content-Type:
GetIPInsights
- Summary: 获取 IP 的匿名代理相关洞察信息
- Method:
GetIPInsights - Endpoint:
ip_location.IPLocation/GetIPInsights - Request:
- Content-Type:
application/grpc - Schema: GetIPInsightsRequest
- Content-Type:
- Response:
- Content-Type:
application/grpc - Schema: GetIPInsightsResponse
- Content-Type:
CheckIP
- Summary: 检查 IP 和国家是否可用
- Method:
CheckIP - Endpoint:
ip_location.IPLocation/CheckIP - Request:
- Content-Type:
application/grpc - Schema: CheckIPRequest
- Content-Type:
- Response:
- Content-Type:
application/grpc - Schema: CheckIPResponse
- Content-Type:
3. Components
3.1 Schemas
CheckIPRequest
请求:检查 IP 可用性
| Field | Type | Description |
|---|---|---|
| ipAddress | string | 要检查的 IP 地址,不能为空 |
CheckIPResponse
响应:IP 和国家可用性状态
| Field | Type | Description |
|---|---|---|
| ipIsAvailable | string | IP 是否可用("true"/"false") |
| countryIsAvailable | string | 国家是否可用("true"/"false") |
GetIPInfoRequest
请求:获取 IP 信息
| Field | Type | Description |
|---|---|---|
| ipAddress | string | 目标 IP 地址,不能为空 |
GetIPInfoResponse
响应:返回 IP 信息
| Field | Type | Description |
|---|---|---|
| ipCountry | IPCountryInfo | IP 所属国家信息 |
| ipContinent | IPCountryInfo | IP 所属大陆信息 |
| ipRegisteredCountry | IPCountryInfo | IP 注册地信息(注册国家) |
GetIPInsightsRequest
请求:获取 IP 匿名代理洞察信息
| Field | Type | Description |
|---|---|---|
| ipAddress | string | 要查询的 IP 地址,不能为空 |
GetIPInsightsResponse
响应:IP 洞察信息(匿名代理/代理类型等)
| Field | Type | Description |
|---|---|---|
| isAnonymous | string | 是否为匿名用户 |
| isAnonymousProxy | string | 是否为匿名代理 |
| isAnonymousVpn | string | 是否为匿名 VPN |
| isTorExitNode | string | 是否为 Tor 出口节点 |
| isPublicProxy | string | 是否为公共代理 |
| isResidentialProxy | string | 是否为住宅代理 |
| userType | string | 用户类型(如:business、residential、isp 等) |
| ipInfo | GetIPInfoResponse | IP 的基础信息(嵌套) |
IPCountryInfo
国家/地区信息
| Field | Type | Description |
|---|---|---|
| ipAddress | string | IP 地址 |
| isoCode | string | ISO 国家代码(如:CN、US) |
3.2 Enums
4. Scalar Value Types
| Proto Type | Go Type | C++ Type | Java Type | Python Type | Notes |
|---|---|---|---|---|---|
| double | float64 | double | double | float | |
| float | float32 | float | float | float | |
| int32 | int32 | int32 | int | int | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
| int64 | int64 | int64 | long | int/long | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
| uint32 | uint32 | uint32 | int | int/long | Uses variable-length encoding. |
| uint64 | uint64 | uint64 | long | int/long | Uses variable-length encoding. |
| sint32 | int32 | int32 | int | int | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
| sint64 | int64 | int64 | long | int/long | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
| fixed32 | uint32 | uint32 | int | int | Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
| fixed64 | uint64 | uint64 | long | int/long | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
| sfixed32 | int32 | int32 | int | int | Always four bytes. |
| sfixed64 | int64 | int64 | long | int/long | Always eight bytes. |
| bool | bool | bool | boolean | boolean | |
| string | string | string | String | str/unicode | A string must always contain UTF-8 encoded or 7-bit ASCII text. |
| bytes | []byte | string | ByteString | str | May contain any arbitrary sequence of bytes. |
