Creators, labels and marketers use proxies for YouTube to answer one question: what does a viewer in another country actually see? Is my video blocked in Germany? Where do I rank for my keyword in the UK? Which pre-roll ads run on my niche in Canada? Some of this is available through the official API, and some only appears when you browse from a local IP. This guide shows which is which.
One boundary up front: proxies are not for inflating views, likes or subscribers. YouTube filters artificial traffic and its policies prohibit it. Everything here is about observing, not manipulating.
Start with the API: Region Restrictions Without a Proxy
If you only need to know whether a video is region-blocked, the YouTube Data API v3 tells you directly. The videos endpoint returns contentDetails.regionRestriction with an allowed or blocked list of country codes. You need a free API key from Google Cloud:
import requests
API_KEY = 'YOUR_API_KEY'
video_id = 'dQw4w9WgXcQ'
r = requests.get(
'https://www.googleapis.com/youtube/v3/videos',
params={'part': 'contentDetails', 'id': video_id, 'key': API_KEY},
timeout=15,
)
items = r.json().get('items', [])
if not items:
print('Video not found or private')
else:
rr = items[0]['contentDetails'].get('regionRestriction')
if not rr:
print('No region restriction listed')
elif 'blocked' in rr:
print('Blocked in:', ', '.join(rr['blocked']))
else:
print('Only allowed in:', ', '.join(rr['allowed']))The API has a daily quota, but for checking your own catalogue it is plenty. It does not, however, show you localized search rankings, home page recommendations or ads. That is where proxies come in.
Checking YouTube Search Rankings by Country
YouTube search results differ by country and language. To see where your video ranks for a keyword in a given market, load the search page through a proxy in that country with a matching browser locale. Because YouTube pages pull in lots of thumbnails and video, block heavy resources to keep bandwidth small:
from playwright.sync_api import sync_playwright
KEYWORD = 'sourdough starter'
MY_VIDEO = 'dQw4w9WgXcQ'
MARKETS = {'us': 'en-US', 'gb': 'en-GB', 'ca': 'en-CA'}
def block_heavy(route):
if route.request.resource_type in ('image', 'media', 'font'):
return route.abort()
return route.continue_()
with sync_playwright() as p:
browser = p.chromium.launch()
for cc, lang in MARKETS.items():
ctx = browser.new_context(
proxy={'server': 'http://global.nodeproxies.xyz:8080',
'username': f'USERNAME-country-{cc}-session-yt{cc}-time-10',
'password': 'PASSWORD'},
locale=lang,
)
page = ctx.new_page()
page.route('**/*', block_heavy)
page.goto('https://www.youtube.com/results?search_query=' + KEYWORD.replace(' ', '+'))
page.wait_for_selector('a#video-title', timeout=20000)
links = page.eval_on_selector_all('a#video-title', 'els => els.map(e => e.href)')
ids = [l.split('v=')[1].split('&')[0] for l in links if 'v=' in l]
rank = ids.index(MY_VIDEO) + 1 if MY_VIDEO in ids else None
print(cc, 'rank:', rank, 'of', len(ids))
ctx.close()
browser.close()You may see a cookie consent screen first in European markets; handle it by clicking the accept or reject button before reading results. YouTube's markup changes from time to time, so if the selector stops matching, inspect the page and update it. Keep checks to a handful of keywords a day - this is rank tracking for your own content, not bulk collection. The same approach is used for web search in our guide to proxies for Google SERP scraping.
Reviewing Regional Ads
Advertisers and agencies want to confirm that a campaign targeted at one country is actually serving there, and see what competitors run. Ads only appear when you load and play videos, so this costs more bandwidth than search checks. Keep media unblocked only for these sessions, use a sticky session per market so the ad system sees one consistent viewer, and screenshot the ad with the country and time recorded. Our article on proxies for ad verification covers evidence capture in more detail.
Which Proxy Type Fits YouTube
- Residential proxies - home IPs that look like normal viewers; the default for ranking and ad checks. Country targeting with -country-xx.
- Datacenter proxies - cheaper and fast, fine for light page loads, but more likely to hit consent walls or bot checks.
- Unlimited residential - if you play a lot of video for ad review, hourly billing avoids per-GB surprises.
Doing It with NodeProxies
Sign up, add balance from $3 (card or crypto), and pick a residential plan; small plans start at 100 MB, which is enough to test a ranking script with media blocked. Set the country in the username and use a session ID per market. No subscription, no ID verification, and the balance never expires. Rates are on the pricing page.
FAQ
How do I check if a YouTube video is blocked in a country?
Call the YouTube Data API videos endpoint with part=contentDetails and read regionRestriction. To see the viewer experience, open the video through a proxy in that country.
Do YouTube search results change by country?
Yes, results and ordering vary by country and language. Use a country-matched proxy and the matching browser locale to see local results.
Why is YouTube using so much proxy bandwidth?
Thumbnails and video segments are large. Block images and media in your browser automation unless you specifically need them, such as for ad review.
