Legacy API reference
This reference is for existing integrations using the legacy service. The examples use the legacy API host. For the new site, see the signed extraction reference on this page.
- Legacy API host
https://api.98ip.com
List countries, regions and provinces
/region/getList
Look up available locations. Specify a parent location to retrieve its children.
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Parent region code, such as AL. |
pid | integer | No | Parent location ID. A nonzero ID takes precedence over region. Omit both parameters to list countries. |
Example request
curl --request GET 'https://api.98ip.com/region/getList?pid=0'
Response examples
{"code":0,"msg":"success","data":[]}
List proxy accounts
/authAccount/getList
List proxy accounts for the current account with pagination.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
pageNum | integer | No | Page number. Defaults to 1. |
pageSize | integer | No | Number of items per page. Defaults to 10. |
Example request
curl --request GET 'https://api.98ip.com/authAccount/getList?appKey=YOUR_APP_KEY&pageNum=1&pageSize=10'
Response examples
{"code":0,"msg":"请求成功","data":{"Rows":[{"user":"Bexample","traffic_M":100,"isPrimary":false}],"total":1}}
Create a proxy account
/authAccount/add
Create a proxy subaccount and optionally assign initial traffic from the primary proxy account.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
userSuffix | string | Yes | Use 3 to 8 ASCII letters, digits or underscores for the account suffix. |
pass | string | Yes | Use 6 to 12 ASCII letters, digits or underscores for the new account password. |
traffic | number | No | Initial traffic allocation as a nonnegative number. |
trafficType | integer | No | Traffic unit: 2 for MB, 3 for GB, 4 for TB. Specify a unit when passing a traffic amount. |
Example request
curl --request GET 'https://api.98ip.com/authAccount/add?appKey=YOUR_APP_KEY&userSuffix=demo01&pass=DemoPass01'
Response examples
{"code":0,"msg":"创建成功"}
Update a proxy account
/authAccount/update
Change the password or activation status of a proxy subaccount on a supported resource.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
user | string | Yes | The proxy account username. |
pass | string | No | New password of 3 to 8 ASCII letters, digits or underscores. |
status | integer | No | Account status: 0 disables it and 1 enables it. |
Example request
curl --request GET 'https://api.98ip.com/authAccount/update?appKey=YOUR_APP_KEY&user=Bexample&pass=Demo123'
Response examples
{"code":0,"msg":"修改认证账号信息成功"}
Delete a proxy account
/authAccount/delete
Delete a proxy subaccount on a supported resource. The legacy handler reads multipart/form-data fields from the GET request body.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
user | string | Yes | The proxy account username. |
Example request
curl --request GET 'https://api.98ip.com/authAccount/delete' \
--form-string 'appKey=YOUR_APP_KEY' \
--form-string 'user=Bexample'
Response examples
{"code":0,"msg":"删除成功"}
Retrieve password-authenticated proxies
/get_proxy_ip
Retrieve endpoints using a proxy username and password. JSON results include the host, port and connection credentials. The port format depends on the resource.
| Parameter | Type | Required | Description |
|---|---|---|---|
user | string | Yes | The proxy account username. |
pass | string | Yes | The proxy account password. |
region | string | No | Country code. |
area | string | No | Region identifier. |
time | integer | No | Rotation interval. Interpretation depends on the active resource. |
count | integer | Yes | Number of proxy endpoints to retrieve. |
protocol | string | No | Proxy protocol, such as http or socks5. |
format | string | Yes | Output format, either json or txt. |
split | integer | No | Delimiter code for txt output. |
splice | string | No | Formatting template for each proxy address in txt output. |
session | string | No | Session identifier for the old resource. |
proxyType | integer | No | Transfer resource server type: 1 for outside Asia, 2 for Asia. |
Example request
curl --request GET 'https://api.98ip.com/get_proxy_ip?user=YOUR_PROXY_USER&pass=YOUR_PROXY_PASSWORD&count=1&format=json'
Response examples
{"code":0,"msg":"操作成功","data":[{"ip":"192.0.2.10","port":"2000","user":"EXAMPLE_PROXY_USER","pass":"EXAMPLE_PROXY_PASSWORD"}]}
Retrieve allowlist-authenticated proxies
/get_whitelist_ip
Request endpoints using a proxy username and password. The returned endpoints authenticate connections through the IP allowlist.
| Parameter | Type | Required | Description |
|---|---|---|---|
user | string | Yes | The proxy account username. |
pass | string | Yes | The proxy account password. |
region | string | No | Country code. |
area | string | No | Region identifier. |
time | integer | No | Rotation interval. Interpretation depends on the active resource. |
count | integer | Yes | Number of proxy endpoints to retrieve. |
protocol | string | No | Proxy protocol, such as http or socks5. |
format | string | Yes | Output format, either json or txt. |
split | integer | No | Delimiter code for txt output. |
splice | string | No | Formatting template for each proxy address in txt output. |
session | string | No | Session identifier for the old resource. |
retentionTime | integer | No | Retention time for the transfer whitelist resource. |
Example request
curl --request GET 'https://api.98ip.com/get_whitelist_ip?user=YOUR_PROXY_USER&pass=YOUR_PROXY_PASSWORD&count=1&protocol=socks5&format=json'
Response examples
{"code":0,"msg":"操作成功","data":[{"ip":"192.0.2.10","port":12345}]}
List allowlisted IP addresses
/whitelist/getList
List IP allowlist entries for the active resource, optionally filtered by proxy username.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
user | string | No | Proxy account username. Omit to list all entries under your account. |
Example request
curl --request GET 'https://api.98ip.com/whitelist/getList?appKey=YOUR_APP_KEY'
Response examples
{"code":0,"msg":"success","data":[{"ip":"192.0.2.10","remark":"Example","status":1,"user":"Bexample"}]}
Add an IP address to the allowlist
/whitelist/add
Allowlist an IP address for a proxy account. Omitting the username uses the primary proxy account.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
ip | string | Yes | The IPv4 address to manage. |
user | string | No | Proxy account username for the new allowlist entry. |
remark | string | No | Note for the allowlist entry. |
Example request
curl --request GET 'https://api.98ip.com/whitelist/add?appKey=YOUR_APP_KEY&ip=192.0.2.10'
Response examples
{"code":0,"msg":"success"}
Remove an IP address from the allowlist
/whitelist/delete
Remove an IP address from a proxy account allowlist. Omitting the username uses the primary proxy account.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
ip | string | Yes | The IPv4 address to manage. |
user | string | No | Proxy account username for the allowlist entry to remove. |
Example request
curl --request GET 'https://api.98ip.com/whitelist/delete?appKey=YOUR_APP_KEY&ip=192.0.2.10'
Response examples
{"code":0,"msg":"success"}
List remaining traffic by proxy account
/traffic/getList
Get the remaining traffic in MB for active proxy accounts. This endpoint uses the lowercase query parameter appkey.
| Parameter | Type | Required | Description |
|---|---|---|---|
appkey | string | Yes | Your account AppKey. |
Example request
curl --request GET 'https://api.98ip.com/traffic/getList?appkey=YOUR_APP_KEY'
Response examples
{"code":0,"msg":"Traffic query successfully","data":[{"user":"Bexample","traffic_M":100}]}
Allocate traffic to a proxy account
/traffic/allotTraffic
Transfer traffic between the primary proxy account and a specified proxy subaccount.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
user | string | Yes | The proxy account username. |
traffic | number | Yes | Use a positive amount to allocate traffic or a negative amount to reclaim it. |
trafficType | integer | No | Traffic unit: 2 for MB, 3 for GB, 4 for TB. Specify a unit when passing a traffic amount. |
Example request
curl --request GET 'https://api.98ip.com/traffic/allotTraffic?appKey=YOUR_APP_KEY&user=Bexample&traffic=100&trafficType=2'
Response examples
{"code":0,"msg":"请求成功"}
Get traffic usage
/traffic/getConsume
Get traffic usage with pagination, time grouping and an optional proxy account filter.
| Parameter | Type | Required | Description |
|---|---|---|---|
appKey | string | Yes | Your account AppKey. |
pageNum | integer | No | Page number. Defaults to 1. |
pageSize | integer | No | Number of items per page. Defaults to 10. |
statistics | string | No | Grouping: hour by hour (default), date by day, or month by month. The old resource also accepts min for five-minute intervals. |
user | string | No | Filter by proxy account username. |
Example request
curl --request GET 'https://api.98ip.com/traffic/getConsume?appKey=YOUR_APP_KEY&statistics=hour'
Response examples
{"code":0,"msg":"查询成功","data":{"rows":[{"user":"Bexample","consumeTraffic":0.004,"consumeData":"2024-11-30"}],"total":1}}
Residential proxy API
Generate an extraction link
- Sign in to the console and open My dynamic IPs → API extraction.
- Select an active proxy account, then set the region, protocol, count (1–3000) and JSON or TXT format.
- Generate an API link, then use the complete URL for a GET request.
Treat the full extraction link as a credential. Generate a new link after changing the proxy authentication password.
Request parameters
GET https://www.98ip.com/api/proxy/transfer?ticket=YOUR_TICKET&signature=YOUR_SIGNATURE
The signed link fixes the region, protocol, count and response format. Generate a new link in the console to change these options. The endpoint does not require a login cookie or AppKey.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticket | string | Yes | The console-generated extraction ticket containing the selected options. |
signature | string | Yes | The signature generated alongside the ticket. |
Response examples
JSON includes the proxy address, port and credentials. The address may be a gateway hostname and the port is a string. TXT returns plain text using the connection format and separator selected in the console. The count refers to connection entries.
JSON
{
"code": 0,
"msg": "success",
"data": [{
"ip": "proxy.example.com",
"port": "8080",
"user": "EXAMPLE_USER",
"pass": "EXAMPLE_PASSWORD"
}]
}
TXT
http://EXAMPLE_USER:EXAMPLE_PASSWORD@proxy.example.com:8080
Errors
| Status | Description |
|---|---|
HTTP 400 · code -1 | The extraction link is invalid or no longer valid. Check the full URL and generate a new link. |
HTTP 400 · code -1 | Request validation or extraction failed. Check the JSON msg field, proxy account and selected options. |