## Sending Cookies with Requests
The requestCookies feature allows you to send specific cookies along with your web scraping requests, enabling greater control and customization. This can be useful for maintaining session information, accessing personalized content, or interacting with websites that require cookies for proper functionality.
**Supported Request Types:**
- [[httpResponseBody]]
- [[browserHtml]]
**Limitations:**
- Maximum of 100 cookies per request.
- Maximum size of each cookie object is 2048 characters (combined length of name, value, and attributes).
### Using requestCookies
To utilize this feature, include the requestCookies field in your request body with an array of cookie objects. Each cookie object should contain the following properties:
|Property|Required|Type|Description|
|---|---|---|---|
|name|Yes|string|The name of the cookie (max 256 characters).|
|value|Yes|string|The value of the cookie (max 2100 characters).|
|domain|Yes|string|The domain the cookie belongs to (max 500 characters).|
|path|No|string|The path the cookie belongs to.|
|expires|No|integer|Unix timestamp in seconds indicating the cookie's expiration.|
|httpOnly|No|boolean|Whether the cookie is accessible only through HTTP requests.|
|secure|No|boolean|Whether the cookie should only be transmitted over HTTPS.|
|sameSite|No|string|The SameSite attribute of the cookie (Strict, Lax, Extended, None).|
**Example Request:**
```markdown
POST https://api.proxyscrape.com/v3/accounts/freebies/scraperapi/request HTTP/1.1
Request headers:
Content-Type: application/json
X-Api-Key: <your api key>
Request body:
{
"url": "https://www.example.com/",
"browserHtml": true,
"requestCookies": [
{
"name": "session_id",
"value": "1234567890",
"domain": "www.example.com",
"path": "/",
"httpOnly": true
},
{
"name": "preference",
"value": "dark_mode",
"domain": "www.example.com"
}
]
}
```
### Utilizing responseCookies
You can use the [[responseCookies]] field during your request to get back the cookies that were set during your request. You can use this information to populate the requestCookies field in subsequent requests, allowing you to maintain session continuity or leverage specific cookie values for further interaction.