How to Build a Local SEO Chrome Extension with the uule Parameter

As an SEO practitioner, I know that viewing search results exactly as they appear in a specific city or country is a constant requirement. Do you know that the same keyword can produce vastly different results in New York compared to Sydney? This variance directly impacts your campaigns, reporting, and local SEO audits.

I have found that 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. To solve this, I built Search Like Local. This Chrome extension lets you perform searches from any city or country instantly.

In this post, I will share the step-by-step technical implementation. We will talk about how I handled Google’s uule parameter, which is the core of location-specific Google searches.

Step 1: Understanding Google’s uule Parameter

Why it matters: When you inspect Google search URLs for different locations, you will notice a mysterious parameter called uule. For example, consider this URL: https://www.google.com/search?q=carpet&hl=en&gl=au&uule=w+CAIQICIGc3lkbmV5.

Here is what each part represents:

  • q: the search query
  • hl: the language, such as en for English
  • gl: the country, such as au for Australia
  • uule: encodes the specific location, including the city or region

What is uule?

In practice, uule is a Base64-like encoded string that tells Google to return results as if the user is physically in that location. It allows for 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 because a keyword might rank first in one city and tenth in another. By generating uule dynamically, you can simulate searches from any city in the world instantly without VPNs or proxies.

Pro Tip: Always verify your location string matches Google's canonical names. If the name is off by a single character, the uule parameter will fail to trigger the local SERP.

Step 2: Populating Dropdowns for Countries, Languages, and Google Domains

To let users select exactly where and how to search, I created dropdowns for several key metrics. These include ISO country codes, Google-supported languages, and all Google TLDs (Top-Level Domains) like google.com or google.com.au.

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 for the practitioner.

Step 3: Handling Keyword Modes

The extension supports two distinct keyword modes. Single keyword mode is for simple, fast searches, while multi-keyword mode allows you to enter multiple queries at once for bulk audits.

I ensured the multi-keyword input box auto-resizes dynamically to improve usability:

$('#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. This small adjustment significantly improves the experience during extensive bulk testing.

Step 4: Saving User Preferences

I know that SEO professionals often perform repetitive searches. To streamline this workflow, I implemented Chrome storage to save user settings. This allows you to leverage your previous configurations without starting from scratch.

$("#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. You can get straight to the analysis without re-entering details every time.

Step 5: Generating the uule Parameter

The most important technical component is the logic that generates the uule code. This is where we model the string that Google understands.

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 ""; } }

The process takes the location name, such as "Sydney, Australia," and outputs the uule string. This string is then appended to the Google search URL to facilitate precise location-based SERP simulation.

Step 6: Constructing Search URLs

When a user clicks the Search button, the extension builds the URLs dynamically. I usually automate this so each keyword opens in a new tab.

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 });

The URL includes the language, the country, and the exact location. I also add num=10 to ensure we capture the top 10 results for a clean audit view.

Step 7: Handling Technical Challenges

During development, I encountered several technical hurdles. I prefer to be transparent about these because they often impact tool reliability.

  • Encoding uule for special characters: Cities like "São Paulo" require encodeURIComponent combined with btoa to avoid parsing errors.
  • Multi-keyword input handling: Each keyword generates a separate URL, so I had to filter out empty lines and whitespace.
  • Compatibility across Google domains: I tested extensively on google.com.au and google.co.uk to ensure consistent behavior across different TLDs.
  • Performance optimization: Opening too many tabs simultaneously can crash a browser, so I implemented limits to protect the user's workspace.

Step 8: Examples of uule

Here are a few examples of how these strings appear after processing:

LocationGenerated uule
Sydney, Australiaw+CAIQICIRU3lkbmV5LCBBdXN0cmFsaWE
New York, USAw+CAIQICINTmV3IFlvcmssIFVTQQ
London, UKw+CAIQICIKTG9uZG9uLCBVSw

These codes allow for exact SERP simulation for those specific cities. This is invaluable data for any local SEO audit.

Step 9: Real-World SEO Application

Let us talk about a typical use case. Suppose you are auditing the keyword "coffee shop" across Sydney, Melbourne, and Brisbane. Using the multi-keyword search, the extension opens separate tabs with the correct uule codes automatically.

In practice, you can instantly see how rankings differ city by city. This allows you to help your clients optimize their local SEO campaigns with actual localized data rather than generic national averages.

Step 10: Key Takeaways

  • uule is the game-changer for local SEO testing and precise audits.
  • Chrome extensions can effectively combine UI controls with dynamic URL generation to save time.
  • Multi-keyword and multi-location support makes bulk auditing fast and efficient for the practitioner.
  • Handling encoding and Google domains correctly is critical for tool robustness.

Step 11: Conclusion

With Search Like Local, SEO professionals can finally see true location-specific SERPs without relying on expensive VPNs. By combining country selection, multi-keyword search, and dynamic uule generation, I built a tool that is fast, reliable, and highly practical.

Consistent execution of local SEO audits requires reliable data. If you are curious about how your keywords rank in different cities, give it a try: Search Like Local on Chrome Web Store.

Tags: Chrome Code SEO

About