How I Built “Search Like Local” – A Step-by-Step Technical Implementation for SEO Professionals
As an SEO professional, seeing Google search results exactly as they appear in a specific city or country is crucial. The same keyword can produce vastly different results in New York versus Sydney, impacting your campaigns, reporting, and local SEO audits.
VPNs or location-spoofing tools can sometimes work, but they are often slow, unreliable, or expensive. I wanted a fast, accurate, and browser-based solution — so I built Search Like Local, a Chrome extension that lets you perform searches from any city or country, instantly.
In this post, I’ll share the step-by-step technical implementation, including how I handled Google’s uule
parameter, which is the core of location-specific Google searches.
Step 1: Understanding Google’s uule
Parameter
When you inspect Google search URLs for different locations, you’ll notice a mysterious parameter called uule
. For example:
https://www.google.com/search?q=carpet&hl=en&gl=au&uule=w+CAIQICIGc3lkbmV5
Here’s what each part means:
q
– the search queryhl
– the language (e.g.,en
for English)gl
– the country (e.g.,au
for Australia)uule
– encodes the specific location (city, region, or area)
What is uule
?
uule
is a Base64-like encoded string that tells Google to return results as if the user is physically in that location. It allows precise local SERP simulations.
Without uule
, Google may only consider your country (gl
) but not the exact city. For SEO professionals, this distinction is critical: a keyword might rank #1 in one city and #10 in another.
By generating uule
dynamically, you can simulate searches from any city in the world, instantly, without VPNs or proxies.
Step 2: Populating Dropdowns for Countries, Languages, and Google Domains
To let users select exactly where and how to search, I created dropdowns for:
- Countries – all ISO country codes
- Languages – Google-supported languages
- Domains – all Google TLDs (google.com, google.co.uk, google.com.au, etc.)
Example for countries:
const countries = { "US": "United States", "AU": "Australia", "GB": "United Kingdom" };
const countrySelect = $("#countrySelect");
Object.keys(countries)
.sort((a, b) => countries[a].localeCompare(countries[b]))
.forEach(code => {
countrySelect.append(`<option value="${code.toLowerCase()}">${countries[code]}</option>`);
});
The languages and domains dropdowns are populated similarly. Sorting alphabetically ensures the UI is user-friendly and easy to navigate.
Step 3: Handling Keyword Modes
The extension supports two keyword modes:
- Single keyword – simple, fast searches for one keyword at a time
- Multi-keyword – enter multiple keywords at once, ideal for bulk audits
The multi-keyword input box auto-resizes dynamically:
$('#multiKeywordInput').on('input', function() {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});
This ensures that all keywords are visible and prevents scroll overflow, which improves usability for bulk testing.
Step 4: Saving User Preferences
SEO professionals often perform repetitive searches. To streamline workflow, I implemented Chrome storage to save user settings:
$("#saveSettings").on("click", function() {
const settings = {
keywordMode: $('input[name="keyword-mode"]:checked').val(),
selectedCountry: $('#countrySelect').val(),
selectedLanguage: $('#languageSelect').val(),
selectedLocation: $("#locationInput").val().trim(),
selectedDomain: $('#domainSelect').val()
};
chrome.storage.local.set(settings, () => {
$('#save-feedback').text("Settings saved!").css('opacity', 1);
setTimeout(() => { $('#save-feedback').css('opacity', 0); }, 2500);
});
});
This makes the extension ready for repeatable searches without re-entering details every time.
Step 5: Generating the uule
Parameter
The most important technical component is generating the uule
code:
function generateUULE(canonicalName) {
if (!canonicalName) return "";
try {
const key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
const encodedName = btoa(unescape(encodeURIComponent(canonicalName)));
return 'w+CAIQICI' + key[canonicalName.length] + encodedName.replace(/=/g, '');
} catch (e) {
console.error("UULE generation failed:", e);
return "";
}
}
Input: the location name (e.g., "Sydney, Australia")
Output: uule
string to append to the Google search URL
This allows precise location-based SERP simulation, even down to individual cities.
Step 6: Constructing Search URLs
When a user clicks the Search button, the extension builds URLs dynamically for each keyword:
const searchUrl = `https://www.${selectedDomain}/search?q=${encodeURIComponent(query)}&hl=${language}&gl=${country}&uule=${uuleCode}&num=10&sourceid=chrome&ie=UTF-8`;
chrome.tabs.create({ url: searchUrl });
hl
– languagegl
– countryuule
– exact locationnum=10
– top 10 results
Each keyword opens in a new tab, providing instant, location-specific SERPs.
Step 7: Handling Technical Challenges
- Encoding
uule
for special characters: Cities like "São Paulo" or "München" requireencodeURIComponent
+btoa
to avoid errors. - Multi-keyword input handling: Each keyword generates a separate URL, filtering out empty lines and trimming whitespace.
- Compatibility across Google domains: Some TLDs behave differently; tested extensively on
google.com.au
,google.co.uk
, etc. - Performance optimization: Opening too many tabs at once can crash the browser; implemented limits and feedback.
Step 8: Examples of uule
Here are a few examples:
Location | Generated uule |
---|---|
Sydney, Australia | w+CAIQICIRU3lkbmV5LCBBdXN0cmFsaWE |
New York, USA | w+CAIQICINTmV3IFlvcmssIFVTQQ |
London, UK | w+CAIQICIKTG9uZG9uLCBVSw |
These codes allow exact SERP simulation for that city, invaluable for local SEO audits.
Step 9: Real-World SEO Application
Example use case:
- Keyword: "coffee shop"
- Locations: Sydney, Melbourne, Brisbane
- Multi-keyword search opened separate tabs with
uule
codes automatically
Result: Instantly see how rankings differ city by city, helping clients optimize local SEO campaigns effectively.
Step 10: Key Takeaways
uule
is the game-changer for local SEO testing- Chrome extensions can combine UI controls, saved preferences, and dynamic URL generation
- Multi-keyword and multi-location support makes bulk auditing fast and efficient
- Handling encoding, dropdowns, and Google domains correctly is critical for robustness
Step 11: Conclusion
With Search Like Local, SEO professionals can finally see true location-specific SERPs without VPNs.
By combining:
- Country, language, and domain selection
- Multi-keyword search
- Dynamic
uule
generation
I built a tool that’s fast, reliable, and highly practical for real-world SEO.
If you’re curious how your keywords rank in different cities, give it a try: Search Like Local on Chrome Web Store.