Custom Cookies
cookiesstring""
You can pass custom cookies to the target webpages.
To do this you must pass a cookie string in the cookies parameter.
If you want to set multiple cookies, separate them with ;.
Foxscrape currently supports cookies with the following attributes:
- name (required)
- value (required)
- domain (optional)
- path (optional)
- expires (optional)
You need to separate each attribute with , and each cookie with ;.
Cookie syntax is as follows:
TEXT
1name=value,other_attributes=other_attribues_value;
Example:
TEXT
1cookie_name_1=cookie_value1,domain=foxscrape.com;cookie_name_2=cookie_value_2;cookie_name_3=cookie_value_3,path=/
Example with cookie_name_1=cookie_value1;cookie_name_2=cookie_value_2:
1curl "https://www.foxscrape.com/api/v1/?api_key=YOUR_API_KEY&url=http%3A%2F%2Fhttpbin.org%2Fcookies%3Fjson&cookies=cookie_name_1%3Dcookie_value1%3Bcookie_name_2%3Dcookie_value_2"
In the above example, Foxscrape is set to scrape httpbin.org/cookies?json, a page that displays the cookies it received.
The following will be returned by the above request:
JSON
1{2"cookies": {3"cookie_name_1": "cookie_value1",4"cookie_name_2": "cookie_value_2"5}6}