콘텐츠로 이동
로그인 가입하기

지오 타겟팅

지오 타겟팅은 사용자 이름에 플래그를 추가하는 방식으로 요청 단위로 설정됩니다. 대시보드 변경도, 별도의 엔드포인트도 필요 없으며 모든 요청은 동일한 게이트웨이를 통과합니다.

플래그는 대시로 사용자 이름에 추가됩니다:

customer-USERNAME-country-<code>-region-<name>-city-<name>-asn-<number>

값은 소문자로 작성합니다. 지역명과 도시명은 공백 대신 언더스코어를 사용합니다. 국가 코드는 ISO 3166-1 alpha-2 형식입니다.

플래그예시
countryISO 국가 코드country-us, country-gb, country-de
region소문자 지역/주 슬러그region-california, region-new_south_wales
city소문자 도시 슬러그city-new_york, city-los_angeles
asnASN 번호asn-7922 (Comcast), asn-701 (Verizon)
stricttruestrict-true (대체 동작 참조)

플래그는 순서에 상관없이 조합할 수 있습니다:

customer-USERNAME-country-us-region-california-city-los_angeles
customer-USERNAME-country-gb-asn-2856
customer-USERNAME-city-berlin
Terminal window
curl -x customer-USERNAME-country-de-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \
https://ipinfo.io/json

기본적으로 요청 시점에 전체 필터와 일치하는 IP가 없는 경우(예를 들어 잘 알려지지 않은 도시의 풀이 일시적으로 비어 있는 경우), 게이트웨이는 더 넓은 풀로 대체하여 요청이 정상적으로 완료되도록 합니다.

대체 동작을 사용하지 않고 대신 HTTP 502를 받으려면 strict-true를 추가하십시오. 정확한 지오 매칭이 요청 성공보다 중요한 경우 strict 매칭을 사용하십시오:

Terminal window
curl -x customer-USERNAME-country-us-city-new_york-strict-true-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \
https://ipinfo.io/json

모든 플래그를 생략하면 전체 글로벌 풀에서 가져옵니다:

USERNAME

이 경우에도 모든 요청은 다른 IP로 로테이션되며, 다만 지리적 제약이 없을 뿐입니다.

  • 세션, 여러 요청에 걸쳐 타겟팅된 IP를 유지합니다.
  • 통합, 지오 플래그를 Scrapy, Puppeteer, Playwright에 적용합니다.