Get profile cookies
Read saved cookies for a profile as an array of cookie objects.
Definition: ApiFox GET · Checked on 2026-10-21.
Request
GET /api/getCookieUse the base URL and api-key shown on the client API screen. All examples use 9000 only as a placeholder port; see Overview for authentication.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Existing positive profile ID, Query example ?id=1; obtain it from the profile list |
cURL example
curl --request GET 'http://127.0.0.1:9000/api/getCookie?id=1' \
--header 'api-key: YOUR_API_KEY'Response example
{
"success": true,
"data": [
{
"domain": ".example.com",
"expirationDate": 4102444800,
"hostOnly": false,
"httpOnly": true,
"name": "AEC",
"path": "/",
"sameSite": "lax",
"secure": true,
"session": false,
"storeId": null,
"value": "EXAMPLE_COOKIE_VALUE"
},
{
"domain": ".example.com",
"expirationDate": 4102444800,
"hostOnly": false,
"httpOnly": false,
"name": "BAIDUID",
"path": "/",
"sameSite": "lax",
"secure": false,
"session": false,
"storeId": null,
"value": "EXAMPLE_COOKIE_VALUE"
}
]
}Current client response fields
| Field | Type | Usage |
|---|---|---|
success | boolean | Request processing succeeded; not a guarantee that every item was written |
data | object[] / omitted | Cookie array; may be omitted after internal export failure; validate before use |
Field reference
| Field | Type | Description |
|---|---|---|
domain | string | Cookie domain |
name | string | Cookie name |
value | string | Cookie value |
path | string | Cookie path |
expirationDate | number | Expiration in Unix seconds |
hostOnly / httpOnly / secure / session | boolean | Cookie attributes |
sameSite | string / null | Current client exports a string or null; see below |
storeId | null | null in the Apifox example |
Usage notes
- Close the profile before calling this endpoint.
- Apifox marks the id query parameter as optional, but current clients validate it. Always provide it when reading a specific profile.
- data is the cookie array itself, not a profile object containing cookie.jsonStr. expirationDate is a Unix timestamp in seconds.
For failed requests, check both HTTP status and the error body. See Errors & troubleshooting.
Current export behavior
The current client maps database sameSite numbers to strings: 0 → unspecified, 1 → lax, 2 → strict, 3 → none, and unknown values → an empty string; a missing field can be null. Export sets session to false. Results can contain real login credentials and must never be published.
An exported result is not guaranteed to round-trip losslessly: the update API writes none / no_restriction as 0, which is exported as unspecified. See Update cookies for replacement risks and import rules.
A missing Cookie database can return HTTP 500 with COOKIE_FILE_NOT_EXIST. Some internal export errors are caught and may yield success: true with data absent; confirm data is an array before using it.
A Cookie entry that cannot be decrypted or fails validation may be omitted from export; an empty list does not prove the database had no records.



