IPCook

API Documentation

API Access

API Base URL:

https://www.ipcook.com/

Authentication

All requests require authentication using an API key passed in the HTTP headers.

Use the jwt_token obtained from the Login API.

Data Format

All request and response payloads are in JSON format.


Headers

Header NameTypeValue/Description
jwt_tokenstringjwt_token obtained at login API
Content-Typestringapplication/json

Response

paramtyperemark
codenumberResult code
msgstringStatus message
dataobjectResponse data payload

Account Information

Login

API

  • Address: /api/account/login
  • Method: POST

Success Response

{
    "code": 0,
    "msg": "success",
    "data": {
    "uid": 10086,
    "jwt_token": "ey06eXAi01JKV10i1C1hb6c101JIUzI1N19.ey9pG3M101JodHRw01BvYxBplnJIZ6hhdGlwLmWvb581LC1hdNQ101JodHRwczovL31JZ6hhdGlwLmWvb581LC1pYXQ10jE3MzK30TEx0DIsImV4CC16MTcz0TC50MMMiuXZGF8YS16eyJ1aMQ10jEMWBg2LC1hY2WvdW501joIZmFu23FqQ6tvb21ZXkuY29tIn19.3-bTMmzqjFg0t_sHzlftRwRxMrlv-zb96NFro0qxaHU",
    "expire_at": 1739798382
  }
}

Request Parameters

Parameter NameTypeRequiredExampleRemark
accountstringYes[email protected]Login account
passwordstringYes123456Login password, must be MD5 hashed for backend
remember_meintNo07-day auto-login: 1=Yes, 0=No
auth_keystringNohdskhasdaKey for quick login from activation email

Response Data

NameTypeDescriptionExample
uidintUser ID10086
jwt_tokenstringLogin success tokeney.0eXAiOiJKV1QiLCJhbGciOiJIUz1fNiJ9.eyJpc3MiOi...
expire_atintExpiration time1739798382

User Info

API

  • Address: /api/user/info
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "uid": 123456,
    "account": "raymond083",
    "email": "[email protected]",
    "token": "aaabbbccc", // api_token
    "balance": 92499, // Unit: US Cents
    "traffic_left": 8080, // Unit: MB
    "trial_status": 1, // Trial eligibility: 1: Eligible; 0: Not eligible
    "commission_rate": 0.03 // Cryptocurrency fee rate
  }
}

Response Data

NameTypeDescriptionExample
uidintUser ID123456
accountstringUsernameray1234
emailstringUser email[email protected]
tokenstringUser tokenaaabbbccc
balanceintBalance, Unit: US Cents92499
traffic_leftintTraffic remaining, Unit: MB (divide by 1000 for GB)8080
trial_statusstringTrial eligibility: 1: Eligible; 0: Not eligible1
commission_ratestringCryptocurrency fee rate0.03

Traffic Data API

Dashboard Traffic Usage

API

  • Address: /api/traffic/usage
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "x": [
      "2025-04-21",
      "2025-04-22",
      "2025-04-23",
      "2025-04-24",
      "2025-04-25",
      "2025-04-26",
      "2025-04-27",
      "2025-04-28"
    ],
    "y": [
      15.05, // Unit: Mb
      0,
      95.78,
      14.42,
      0,
      0,
      0,
      0
    ]
  }
}

Request Parameters

Parameter NameTypeRequiredExampleDescription
sdatestringYes2025-04-21Start date
edatestringYes2025-04-28End date

Response Data

NameTypeExampleDescription
xarray["2025-04-01"]X-axis scale - Time
yarray[15.05]Y-axis scale - Usage (Unit: Mb)

Traffic Change Log

API

  • Address: /api/traffic/changelog
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "list": [
      {
        "type": "Allocation", // Value range: ['Used', 'Add', 'Allocation', 'Recycle']
        "amount": 80000,
        "after": 142230,
        "remark": "FromUidHaiadqa5iaw",
        "date_time": "2025-07-24 04:01:09"
      },
      {
        "type": "Allocation",
        "amount": 20000,
        "after": 62230,
        "remark": "FromUidHaiadqa5iaw",
        "date_time": "2025-07-24 04:01:09"
      }
    ],
    "total": 56
  }
}

Request Parameters

Parameter NameTypeRequiredExampleDescription
sdatestringYes2025-04-01Start date for query
edatestringYes2025-04-02End date for query
typestringNousedRecord type: Empty value queries all. Value range: ['used', 'add', 'allocation', 'recycle']
pageintNo1Pagination parameter (Page number)
sizeintNo20Pagination parameter (Page size)
exportintNo0Whether to export data (1=Export)

Response Data

NameTypeExampleDescription
listobject[]List of changes
typestringAllocationChange type
amountint142230Change amount
afterint62230Remaining after change
remarkstringFromUidHaiadqa5iawChange remark
date_timestring2025-07-24 04:01:09Change date and time
totalint56Total list count

Traffic Details

API

  • Address: /api/traffic/details
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "total": 1,
    "list": [
      {
        "time": "2025-04-21",
        "uid": 8561510800,
        "geo": "US",
        "region": "",
        "count": "15.05 MB",
        "username": "[email protected]"
      }
    ]
  }
}

Request Parameters

Parameter NameTypeRequiredExampleDescription
sdatestringYes2023-01-01Start time
edatestringYes2023-01-01End time
pageintNo1Pagination parameter (Page number)
psizeintNo10Pagination parameter (Page size)
gbstringNodTime aggregation type: d=day, h=hour
gbgintNo1Show detailed region:
1=show country;
2=show secondary region (state/province)
subidintNo-1Account ID: Sub-account;
-1: All;
0:Whitelisted IPs;
exportintNo0Whether to export (1=Export)

Response Data

NameTypeExampleDescription
totalint10Total count of data list
listobject[]List of details
timestring2025-04-01Time
uidnumber123456User ID
geostringUSCountry/Region code
regionstringRegion name (if detailed)
countstring15.05 MBUsage amount
usernamestring[email protected]Username

Traffic Package List

API

  • Address: /api/order/pricemenu
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "Success",
  "data": [
    {
      "id": 101,
      "title": "1GB",
      "traffic_gb": 1,
      "per_gb_price": 320,
      "price": 320,
      "recommend_tips": "",
      "default_checked": 0,
      "is_top": 1 // Whether pinned: 1=Yes; 0=No
    }
  ]
}

Response Data

NameTypeExampleDescription
idint101Package ID
titlestring1GBPackage name
traffic_gbint1Traffic amount (GB)
per_gb_priceint320Price per GB
priceint320Total price
recommend_tipsstringSave 37%Discount tips
default_checkedint0Wether selected by default
is_topint1Whether pinned

Traffic Order List(Paginated)

API

  • Address: /api/order/packages
  • Method: GET

Request Parameters

Parameter NameTypeRequiredExampleRemarks
old*stringNo1235666Order ID (Assuming 'old' is a typo for 'oid' or 'order_id')
pay_typestringNobalancePayment method.
Value range:
["alipay", "balance", "cryptomus", "hexaone", "ainvallex/card", "ainvallex/alipay-hk", "ainvallex/goodje-pay", "dukpay/sheer-pay", "dukpay/bank-card", "dukpay/yoomoney", "dukpay/tinkoff-pay", "dukpay/sbp"]
sdatestringYes2025-01-01Order start time
edatestringYes2025-02-01Order end time
pageintNo1Pagination parameter (Page number)
sizeintNo10Pagination parameter (Page size)

Note: old likely intended to be order_id or oid.

Response Data

NameTypeExampleDescription
totalint22Total list count
listobject[]List of changes
idint302392746Order ID
priceint2500Payment amount, Unit: US Cents
pay_typestringbalancePayment method
add_timeint1739870415Order creation time (timestamp)
quantityint1Traffic amount, Unit: GB

Dynamic IP API

Dynamic Gateway List

API

  • Address: /api/dynamic/gateways
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "host": "geo.redhatip.com",
      "port": 32345
    }
  ]
}

Response Data

NameTypeExampleDescription
hoststringgeo.ipcook.comGateway domain
portint32345Gateway port

Dynamic Geo List

API

  • Address: /api/dynamic/stock
  • Method: GET

Success Response

{
    "code": 0,
    "msg": "success",
    "data": {
    "uid": 10086,
    "jwt_token": "ey06eXAi01JKV10i1C1hb6c101JIUzI1N19.ey9pG3M101JodHRw01BvYxBplnJIZ6hhdGlwLmWvb581LC1hdNQ101JodHRwczovL31JZ6hhdGlwLmWvb581LC1pYXQ10jE3MzK30TEx0DIsImV4CC16MTcz0TC50MMMiuXZGF8YS16eyJ1aMQ10jEMWBg2LC1hY2WvdW501joIZmFu23FqQ6tvb21ZXkuY29tIn19.3-bTMmzqjFg0t_sHzlftRwRxMrlv-zb96NFro0qxaHU",
    "expire_at": 1739798382
  }
}

Request Parameters

Parameter NameTypeRequiredExampleDescription
cintYes1Whether to return child list

Response Data

NameTypeExampleDescription
idint1Country ID
namestringUSCountry code
stockbooleantrueWhether in stock
childobject[]Child list (regions/states)

Dynamic Geo-City List

API

  • Address: /api/dynamic/citys
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 80804,
      "name": "Dallas",
      "enname": "Dallas"
    },
    {
      "id": 80805,
      "name": "Houston",
      "enname": "Houston"
    }
  ]
}

Request Parameters

Parameter NameTypeRequiredDescription
gintYesgeo_id

Response Data

NameTypeExampleDescription
idint80004Region/City ID
namestringDallasRegion/City name
ennamestringDallasRegion/City name (English)

Dynamic Username/Password List

API

  • Address: /api/auth/sub_list
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 123456,
      "username": "1",
      "password": "1",
      "traffic_left": 12120, // Remaining traffic Unit: MB, divide by 1000 for GB
      "traffic_used": 0,     // Used traffic Unit: MB, divide by 1000 for GB
      "remark": "",
      "add_time": 1741148830,
    },
    {
      "id": "a1adqa5iks",
      "username": "12345678891111126",
      "password": "12345678891111135",
      "traffic_left": 20,
      "traffic_used": 0,
      "remark": "111",
      "add_time": 1741160175,
    }
  ]
}

Response Data

NameTypeExampleDescription
idint123456Sub-account ID
usernamestringaa41160175Sub-account username
passwordstringaa41160175Sub-account password
traffic_leftint20Remaining traffic (MB)
traffic_usedint10Used traffic (MB)
remarkstring111Remark
add_timeint1741160175Addition time (timestamp)

Auth API

Add Auth

API

  • Address: /api/auth/passadd
  • Method: POST

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "id": "aiadqa5i5d"
  }
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
usernamestringYessuhkhnkjCV1WS2Username, 12-24 characters, case-sensitive
passwordstringYesUSUUV882sxxaPassword, 12-24 characters, case-sensitive
traffic_gbfloatYes0.01Initially allocated traffic, Unit: GB, range 0.01 - 10000
remarkstringYeshelloAuth remark

Response Data

NameTypeExampleDescription
idstringaiadqa5i5dAuth ID

Delete Auth

API

  • Address: /api/auth/passdelete
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {}
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
account_idstringYessuhkhnkjAuth ID

Update Auth

API

  • Address: /api/auth/passupdate
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {}
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
usernamestringYessuhkhnkjCV1WS2Username, 12-24 characters, case-sensitive
passwordstringYesUSUUv882sxxaPassword, 12-24 characters, case-sensitive
account_idstringYesaiadqa5lknSub-auth ID

Allocate Traffic to Auth

API

  • Address: /api/auth/trafficupdate
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": []
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
account_idstringYesaiadqa5l5d2Auth ID
traffic_gbfloatYes0.01Traffic to allocate, Unit: GB, range 0.01 - 10000
typestringYesaddAllocation type: add/minus => add/subtract

Fetch Dynamic IPs (Link/Auth)

API

  • Address: /api/dynamic/genips
  • Method: GET

Request Parameters

Parameter NameTypeRequiredExampleRemarks
authstringYesipAuthentication mode:
pwd -> Username/Password auth,
ip -> Whitelist IP auth
gstringYesUSCountry ISO code.
Example: g=GB or g=GB_city_Barnes (for city)
protocolstringNohttpProtocol: socks5/http
nintYes1Quantity
signstringYes12sad54dsaMD5 hash of user token
accessid*intYes123456User ID
rstringNorandomizeRequired when auth is pwd. Values: randomize/sticky
istringNo12mIP rotation interval. Required when auth is pwd and mode (r) is sticky
fintNo1Required when auth is pwd. Values: 1/2/3/4 (Meaning likely documented elsewhere)
sub_uidintNo123456Sub-auth ID (Required when auth is pwd)
hstringNogeo.ipcook.comHostname (Required when auth is pwd)
pintNo32156Port (Required when auth is pwd)

Update Auth Remark

API

  • Address: /api/auth/remarkupdate
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {}
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
usernamestringYessuhkhnkjCV1WS2Username, 12-24 characters, case-sensitive
passwordstringYesUSUUv882sxxaPassword, 12-24 characters, case-sensitive
account_idstringYesaiadqa5lknSub-auth ID

Whitelist API

Fetch Dynamic IPs

API

  • Address: /api/dynamic/whiteipget
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": [
    "127.0.0.1:1111",
    "127.0.0.1:1122",
    "127.0.0.1:1133",
    "127.0.0.1:1144",
    "127.0.0.1:1155"
  ]
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
gintYes1Region ID
nintYes1Quantity

Response Data

NameTypeExampleDescription
datastring[]IP:Port array

Add Whitelist IP

API

  • Address: /api/auth/whiteipadd
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": []
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
ipstringYes1.2.3.45IPv4 address
remarkstringNohelloIP remark

Update Whitelist IP Remark

API

  • Address: /api/auth/whiteipupdate
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {}
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
ipstringYes1.2.3.4IP address to update
remarkstringYessuhkhnkjCV1WS2Remark, max 500 characters, single/double quotes not allowed

Whitelist IP List

API

  • Address: /api/auth/whiteipget
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": {
    "total": 13,
    "list": [
      {
        "ip": "127.0.0.1:1111",
        "remark": "hello",
        "add_time": 1740139633
      },
      {
        "ip": "127.0.0.1:1122",
        "remark": "hello",
        "add_time": 1740139836
      },
      {
        "ip": "127.0.0.1:1133",
        "remark": "hello",
        "add_time": 1740139886
      },
      {
        "ip": "127.0.0.1:1144",
        "remark": "hello",
        "add_time": 1740139788
      }
    ]
  }
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
keywordstringNosuhkhnkjCV1WS2Search keyword
orderstringNoipSort field: 'ip', 'add_time'
orderedstringNoascSort direction: asc/desc
pageintNo1Page number, default 1
sizeintNo10Page size, default 10

Response Data

NameTypeExampleDescription
totalnumber10Total list count
listobject[]List of whitelisted IPs
ipstring127.0.0.1:1111IP address
remarkstring11Remark
add_timenumber1740139788Addition time (timestamp)

Delete Whitelist IP

API

  • Address: /api/auth/whiteipdelete
  • Method: GET

Success Response

{
  "code": 0,
  "msg": "success",
  "data": []
}

Request Parameters

Parameter NameTypeRequiredExampleRemarks
ipstringYes127.0.0.1:1111IPv4 address