> ## Documentation Index
> Fetch the complete documentation index at: https://help.ip2up.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CURL Request

<Tip>All proxy products of the platform need to be used in an overseas network environment, which requires customers to configure themselves.</Tip>

This article demonstrates how to use `curl` to initiate requests through Ip2up dynamic residential proxy IPs, suitable for direct proxy connection calls in terminals or scripts.

## V2 Dynamic Proxy Parameters

**Parameter Format**

```yaml theme={null}
<account>-<proxy_type>-<location>[-sid-<session_id>]
```

**Parameter Description**

|      Parameter     |     Description     | Required | Notes                                                                                                              |
| :----------------: | :-----------------: | :------: | :----------------------------------------------------------------------------------------------------------------- |
|       Account      |  Assigned username  |   ✅ Yes  | —                                                                                                                  |
|     Proxy Type     |       IP type       |   ✅ Yes  | Fixed value: `res`                                                                                                 |
|      Location      | Geographic location |   ✅ Yes  | See “Location Format” below                                                                                        |
| `sid-<session_id>` |    Sticky session   |   ❌ No   | Session ID supports up to 9 digits; if the node drops during the session, the system will automatically replace it |

**Location Format**

|          Level         |           Format           | Proxy Type | Example                                   |
| :--------------------: | :------------------------: | :--------: | :---------------------------------------- |
|       No location      |            `any`           |    `res`   | `account-res-any`                         |
|         Country        |         `<country>`        |    `res`   | `account-res-us`                          |
|     Country + State    |     `<country>_<state>`    |  `res_sc`  | `account-res_sc-us_california`            |
| Country + State + City | `<country>_<state>_<city>` |  `res_sc`  | `account-res_sc-us_california_losangeles` |

> **Notes:**
>
> * When specifying state or city, proxy type must include sc suffix (e.g., res\_sc)
> * All location names must be lowercase and contain no spaces (e.g., us, california, losangeles, newsouthwales)

**Examples**

```shell theme={null}
# Random, non-sticky
curl -x http://account-res-any:password@[ip]:[port] http://httpbin.org/ip

# Random, sticky
curl -x http://account-res-any-sid-295592634:password@[ip]:[port] http://httpbin.org/ip

# Country specified, non-sticky
curl -x http://account-res-us:password@[ip]:[port] http://httpbin.org/ip

# Country specified, sticky
curl -x http://account-res-us-sid-295592634:password@[ip]:[port] http://httpbin.org/ip

# Country + state, non-sticky
curl -x socks5://account-res_sc-us_california:password@[ip]:[port] http://httpbin.org/ip

# Country + state, sticky
curl -x socks5://account-res_sc-us_california-sid-295592634:password@[ip]:[port] http://httpbin.org/ip

# Country + state + city, non-sticky
curl -x http://account-res_sc-us_california_losangeles:password@[ip]:[port] http://httpbin.org/ip

# Country + state + city, sticky
curl -x http://account-res_sc-us_california_losangeles-sid-295592634:password@[ip]:[port] http://httpbin.org/ip
```

## V1 Dynamic Proxy Parameters

**Parameter Explanation**

|     Name    |  Type  | Required | Remarks                                                                                                                                |
| :---------: | :----: | :------: | :------------------------------------------------------------------------------------------------------------------------------------- |
|   account   | string |    Yes   | Account: **Authentication account from the backend**                                                                                   |
|   country   |   int  |    Yes   | Country ID: 0 represents mixed broadcast **\[Current mixed broadcast only works globally; for non-global, please specify country ID]** |
|   province  |   int  |    Yes   | Region / State ID: 0 represents mixed broadcast                                                                                        |
|     city    |   int  |    Yes   | City ID: 0 represents mixed broadcast                                                                                                  |
|   session   | string |    Yes   | Session identifier: Generated by the backend                                                                                           |
| sessionTime |   int  |    Yes   | Session duration (minutes) **0 represents non-fixed session**                                                                          |
|     flag    |   Int  |    Yes   | Automatically supplement nodes during session (1-yes 0-no) \| **Only effective when session time is not 0**                            |

**Case Examples**

```shell theme={null}

# Protocol example
Rule: curl -x [protocol]://[ip]:[port] -U "[userName]:[password]" ipinfo.io
Example: curl -x http://192.168.46.222:12347 -U "op1233_0_0_0_rr123_1_1:hello123" ipinfo.io

# Case examples

# Global mixed broadcast & no specified duration & no supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_0_0_0_[session]_0_0:[password]" ipinfo.io

# Global mixed broadcast & specified duration & automatic supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_0_0_0_[session]_[sessionTime]_1:[password]" ipinfo.io

# Global mixed broadcast & specified duration & no automatic supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_0_0_0_[session]_[sessionTime]_0:[password]" ipinfo.io

# Specified country & no specified duration & no supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_[country]_0_0_[session]_0_0:[password]" ipinfo.io

# Specified country and state & no specified duration & no supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_[country]_[province]_0_[session]_0_0:[password]" ipinfo.io

# Specified country, state, and city & no specified duration & no supplementation
curl -x [protocol]://[ip]:[port] -U "[account]_[country]_[province]_[city]_[session]_0_0:[password]" ipinfo.io
```
