LogoLogo
Nimble HomeLoginCreate an Account
  • Home
  • Quick Start Tutorials
    • Tutorial Library
      • Track SEO and SEM Ranking
      • Reddit as a Guerilla Marketing Strategy
  • Nimble Platform
    • Nimble Platform Overview
    • Online Pipelines
      • Supermarkets
        • ASDA
        • Tesco Groceries
        • Sainsbury’s
        • Morrisons
      • eCommerce
      • Restaurants
        • Yelp
        • Tabelog
        • Uber Eats Japan
        • Demaecan
        • Uber Eats US
      • Real Estate
        • Zillow
  • Nimble SDK
    • SDK Overview
    • Web API
      • Web API Overview
      • API Product Specs
      • Nimble Web API Quick Start Guide
        • Introduction
        • Nimble APIs Authentication
        • Real-time URL request
        • Delivery methods
        • Batch processing
        • Response codes
        • FAQs
      • Nimble Web API Functions
        • Realtime, Async & Batch Request
        • Geo Location Targeting
        • Javascript Rendering
        • Page Interaction
          • Wait (delay)
          • Wait for Selector
          • Wait and Click
          • Wait and Type
          • Scroll
          • Scroll to
          • Infinite Scrolling
          • Capturing Screenshots
          • Collecting Cookies
          • Executing HTTP Requests
          • Operation Reference
        • Network Capture
          • Filter by URL Matching
          • Filter By Resource Type
            • Real World Demo: Capturing Ajax Requests
          • Wait for Requests
          • Capturing XHR without Rendering
          • Operation Reference
        • Data Parsing
          • Parsing Templates
          • Merge Dynamic Parser
        • Custom Headers & Cookies
        • General Params
      • Vertical Endpoints
        • SERP API
          • Real-time search request
          • Getting local data
          • Browsing SERP pagination
          • Delivery methods
          • Batch Processing
          • Endpoints and Response Codes
        • Maps API
          • Searching for places
          • Getting information about a place
          • Collecting reviews
          • Delivery methods
          • Batch processing
          • Endpoints and Response Codes
    • Web Retrieval API
      • Web Retrieval API Overview
    • Proxy API
      • Nimble IP Overview
      • Nimble IP Quick Start Guide
        • Send a request
        • Nimble IP Autentication
        • Geotargeting and session control
        • Response codes
        • FAQs
      • Nimble IP Functions
        • Country/state/city geotargeting
        • Controlling IP rotation
        • Geo-sessions: longer, stickier, more accurate sessions
        • Using IPv6 Proxies
        • Response Codes
      • Integration Guides
        • Incogniton
        • Kameleo
        • VMLogin
        • AdsPower
        • FoxyProxy
        • Android
        • Multilogin
        • iOS
        • SwitchyOmega
        • Windows
        • macOS
        • Proxifier
        • MuLogin
        • Puppeteer
        • Selenium
        • Scrapy
    • Client Libraries
      • Installation
      • Quick Start
    • LangChain Integration
  • Technologies
    • Browserless Drivers
      • API Driver-Based Pricing
    • IP Optimization Models
    • AI Parsing Skills
  • Management Tools
    • Nimble Dashboard
      • Exploring the User Dashboard
      • Managing Pipelines
      • Reporting and Analytics
      • Account Settings
      • Experimenting with the Playground
      • Billing and history
    • Nimble Admin API
      • Admin API basics
      • Admin API reference
  • General
    • Onboarding Guide
      • Getting started with Nimble's User Dashboard
      • Nimble IP Basics
      • Nimble API Basics
      • Helpful Resources
    • FAQs
      • Account Settings and Security
      • Billing and Pricing
      • Tools and Integrations
      • Nimble API
      • Nimble IP
    • Deprecated APIs
      • E-commerce API
        • E-commerce API Authentication
        • Real-time product request
        • Real-time product search request
        • Delivery methods
        • Batch Processing
        • Endpoints and Response Codes
      • Unlocker Proxy Overview
        • Unlocker Proxy Quick Start Guide
          • Real-time request
          • FAQs
        • Unlocker Proxy FAQ
Powered by GitBook
On this page
  • Adding targeting parameters
  • Selecting your target geolocation
  • Using sticky IPs
  • Geo-sessions: longer, more stable, more accurate sessions
  • Combining parameters
  1. Nimble SDK
  2. Proxy API
  3. Nimble IP Quick Start Guide

Geotargeting and session control

PreviousNimble IP AutenticationNextResponse codes

Adding targeting parameters

Connecting to Nimble IP with user:password authentication allows you to control session targeting and behavior by modifying the user portion of the request.

Selecting your target geolocation

To request an IP from a specific country, add country-<country_code> to the user portion:

curl -x http://account-accountName-pipeline-pipelineName-country-countryCode:[email protected]:7000 https://targetpage.com
import requests

proxies = {
    'http': 'http://account-accountName-pipeline-pipelineName-country-countryCode:[email protected]:7000',
    'https': 'https://account-accountName-pipeline-pipelineName-country-countryCode:[email protected]:7000'
}

url = 'https://ipinfo.io'

response = requests.get(url, proxies=proxies)

print(response.status_code)
print(response.text)
const axios = require('axios');

const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
  return {
    proxy: {
      host: "account-accountName-pipeline-pipelineName-country-countryCode:[email protected]",
      port: 7000
    }
  }
}

const run = async () => {
  const res = await axios(targetAddress, getProxy());
  return res.data;
}


(async () => {
  var response = await run()
  console.log(response);
  console.log("DONE!")
})();
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
)

func main() {
	proxyURL, err := url.Parse("http://account-accountName-pipeline-pipelineName-country-countryCode:[email protected]")
	if err != nil {
		fmt.Println(err)
		return
	}

	client := &http.Client{
		Transport: &http.Transport{
			Proxy: http.ProxyURL(proxyURL),
		},
	}

	url := "https://ipinfo.io"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		fmt.Println(err)
		return
	}

	resp, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer resp.Body.Close()

	fmt.Println(resp.StatusCode)

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}

We use (use ALL to randomly select a country).

If you’d like to get even more specific, you can also add state-<state_code> to target a US state. The list of state codes can be found

If no peers are available in a supported country/state/city, Nimble IP will return a 525 response. For more information, see Nimble IP's .

Using sticky IPs

A sticky IP allows you to make multiple requests through the same IP address. This is done by initiating a session, which associates your request with the sticky IP address.

To create a session, add session-<random_string> to the user portion.

Session IDs are limited to 32 alphanumeric characters (no minimum). Session IDs cannot include hyphens "-" as this will act as a separator and end the "username" portion of the connection string.

For example:

curl -x http://account-accountName-pipeline-pipelineName-session-randomString:[email protected]:7000 https://targetpage.com
import requests

proxies = {
    'http': 'http://account-accountName-pipeline-pipelineName-session-randomString:[email protected]:7000',
    'https': 'https://account-accountName-pipeline-pipelineName-session-randomString:[email protected]:7000'
}

url = 'https://ipinfo.io'

response = requests.get(url, proxies=proxies)

print(response.status_code)
print(response.text)
const axios = require('axios');

const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
  return {
    proxy: {
      host: "account-accountName-pipeline-pipelineName-session-randomString:[email protected]",
      port: 7000
    }
  }
}

const run = async () => {
  const res = await axios(targetAddress, getProxy());
  return res.data;
}


(async () => {
  var response = await run()
  console.log(response);
  console.log("DONE!")
})();
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
)

func main() {
	proxyURL, err := url.Parse("http://account-accountName-pipeline-pipelineName-session-randomString:[email protected]:7000")
	if err != nil {
		fmt.Println(err)
		return
	}

	client := &http.Client{
		Transport: &http.Transport{
			Proxy: http.ProxyURL(proxyURL),
		},
	}

	url := "https://ipinfo.io"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		fmt.Println(err)
		return
	}

	resp, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer resp.Body.Close()

	fmt.Println(resp.StatusCode)

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}

Geo-sessions: longer, more stable, more accurate sessions

Nimble Geo-sessions are a next-gen session solution that provides a variety of upgrades, including:

Geo-sessions are incredibly easy to use; simply pass the parameter geosession along with a random string of your choosing that will serve as the Geo-session ID.

Geosession IDs are limited to between 16 to 32 alphanumeric characters (16 characters minimum).

For example:

curl -x http://account-accountName-pipeline-pipelineName-geosession-randomGeoSessionString:[email protected]:7000 https://targetpage.com
import requests

proxies = {
    'http': 'http://account-accountName-pipeline-pipelineName-geosession-randomGeoSessionString:[email protected]:7000',
    'https': 'https://account-accountName-pipeline-pipelineName-geosession-randomGeoSessionString:[email protected]:7000'
}

url = 'https://ipinfo.io'

response = requests.get(url, proxies=proxies)

print(response.status_code)
print(response.text)
const axios = require('axios');

const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
  return {
    proxy: {
      host: "account-accountName-pipeline-pipelineName-geosession-randomGeoSessionString:[email protected]",
      port: 7000
    }
  }
}

const run = async () => {
  const res = await axios(targetAddress, getProxy());
  return res.data;
}


(async () => {
  var response = await run()
  console.log(response);
  console.log("DONE!")
})();
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
)

func main() {
	proxyURL, err := url.Parse("http://account-accountName-pipeline-pipelineName-geosession-randomGeoSessionString:[email protected]:7000")
	if err != nil {
		fmt.Println(err)
		return
	}

	client := &http.Client{
		Transport: &http.Transport{
			Proxy: http.ProxyURL(proxyURL),
		},
	}

	url := "https://ipinfo.io"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		fmt.Println(err)
		return
	}

	resp, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer resp.Body.Close()

	fmt.Println(resp.StatusCode)

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}

Be sure to use the same parameters across requests that share the same Geo-session. If the location targeting is changed, but the Geo-session ID remains the same, a new session will still be initiated.

Geo-sessions are currently only supported within the US. Support for additional countries is coming soon.

Combining parameters

All of the parameters we’ve covered before can be used together in a single request. This is done by chaining them together, like in this example:

curl -x http://account-MyCompany-pipeline-residential-country-US-state-NY-session-sess1:[email protected]:7000 https://ipinfo.io
import requests

proxies = {
    'http': 'http://account-MyCompany-pipeline-residential-country-US-state-NY-session-sess1:[email protected]:7000',
    'https': 'https://account-MyCompany-pipeline-residential-country-US-state-NY-session-sess1:[email protected]:7000'
}

url = 'https://ipinfo.io'

response = requests.get(url, proxies=proxies)

print(response.status_code)
print(response.text)
const axios = require('axios');

const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
  return {
    proxy: {
      host: "account-MyCompany-pipeline-residential-country-US-state-NY-session-sess1:[email protected]",
      port: 7000
    }
  }
}

const run = async () => {
  const res = await axios(targetAddress, getProxy());
  return res.data;
}


(async () => {
  var response = await run()
  console.log(response);
  console.log("DONE!")
})();
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
)

func main() {
	proxyURL, err := url.Parse("http://account-MyCompany-pipeline-residential-country-US-state-NY-session-sess1:[email protected]:7000")
	if err != nil {
		fmt.Println(err)
		return
	}

	client := &http.Client{
		Transport: &http.Transport{
			Proxy: http.ProxyURL(proxyURL),
		},
	}

	url := "https://ipinfo.io"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		fmt.Println(err)
		return
	}

	resp, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer resp.Body.Close()

	fmt.Println(resp.StatusCode)

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}

Learn more about .

ISO 3166 alpha-2 Country Codes
here.
Response Codes
how Geo-sessions work and how to use them