# Sticky Sessions > Source: https://scrape.do/documentation/api-response/session-id/ Session based scraping When you want to use the same proxy address for a certain period of time, you can pass the `sessionId=1234` parameter. It can be any integer value. Each unique integer value will be the ID of a session. - SessionId value must be between 0 and 1000000. - If no request is sent within 5 minutes, the session you created will be closed automatically. - If the request sent with SessionId fails, a new proxy address will be provided and the session will be changed. - If you need to use new proxy constantly, you don't need to use session! - If used with **Geo Targeting** or **Regional Geo Targeting**, the session will be created only for the relevant country or region. - Sessions are created only for successful requests! **Example:** **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/?token=YOUR_TOKEN&url=https://httpbin.co/anything&sessionId=1234' ``` **Python (API mode)** ```python import requests import urllib.parse token = "YOUR_TOKEN" targetUrl = urllib.parse.quote( "https://httpbin.co/anything") sessionId = "1234" url = "http://api.scrape.do/?token={}&url={}&sessionId={}".format(token, targetUrl,sessionId) response = requests.request("GET", url) print(response.text) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = encodeURIComponent("https://httpbin.co/anything"); const sessionId = "1234" const config = { 'method': 'GET', 'url': `https://api.scrape.do/?token=${token}&url=${targetUrl}&sessionId=${sessionId}`, 'headers': {} }; axios(config) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); ``` **cURL (Proxy mode)** ```bash curl -k -x "http://YOUR_TOKEN:sessionId=1234@proxy.scrape.do:8080" 'https://httpbin.co/anything' -v ``` **Python (Proxy mode)** ```python import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = "https://httpbin.co/anything" token = "YOUR_TOKEN" proxyModeUrl = "http://{}:sessionId=1234@proxy.scrape.do:8080".format(token) proxies = { "http": proxyModeUrl, "https": proxyModeUrl, } response = requests.request("GET", url, proxies=proxies, verify=False) print(response.text) ``` **Node.js (Proxy mode)** ```javascript const axios = require('axios'); const token = "YOUR_TOKEN"; const targetUrl = "https://httpbin.co/anything"; axios({ method:"GET", url:targetUrl, proxy: { protocol:'http', host: 'proxy.scrape.do', port: 8080, auth: { username: token, password: 'sessionId=1234' } } }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error.message); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)*