A UULE code makes Google show results as if you were searching from a given place. Below are the v1 codes for 5 cities in Lebanon with at least 15,000 people, largest first. Copy one, or open the search on Google to check it.
5 cities
| City | Region | Population | UULE (v1) | Use |
|---|---|---|---|---|
| Beirut | Beirut Governorate | 1,916,100 | w+CAIQICIoQmVpcnV0LEJlaXJ1dCxCZWlydXQgR292ZXJub3JhdGUsTGViYW5vbg== | |
| Tripoli | North Governorate | 229,398 | w+CAIQICIpVHJpcG9saSxUcmlwb2xpLE5vcnRoIEdvdmVybm9yYXRlLExlYmFub24= | |
| Aley | Mount Lebanon Governorate | 130,000 | w+CAIQICImQWxleSxNb3VudCBMZWJhbm9uIEdvdmVybm9yYXRlLExlYmFub24= | |
| Zahle | Beqaa Governorate | 78,145 | w+CAIQICIlWmFobGUsWmFobGUsQmVxYWEgR292ZXJub3JhdGUsTGViYW5vbg== | |
| Aarsal | Baalbek-Hermel Governorate | 50,000 | w+CAIQICIpQWFyc2FsLEJhYWxiZWstSGVybWVsIEdvdmVybm9yYXRlLExlYmFub24= |
Send the code to /v1/google/search and you get structured results for that city. This example searches “pharmacy” from Beirut, the largest city in the list, with gl=lb and hl=ar.
Request for Beirut, Beirut Governorate
curl -G "https://api.justserp.com/v1/google/search" \ -H "X-API-Key: YOUR_API_KEY" \ --data-urlencode "q=pharmacy" \ --data-urlencode "uule=w+CAIQICIoQmVpcnV0LEJlaXJ1dCxCZWlydXQgR292ZXJub3JhdGUsTGViYW5vbg==" \ --data-urlencode "gl=lb" \ --data-urlencode "hl=ar"
You do not have to encode anything. The location parameter takes the canonical name and JustSERP does the rest.
Request with location
curl -G "https://api.justserp.com/v1/google/search" \ -H "X-API-Key: YOUR_API_KEY" \ --data-urlencode "q=dentist" \ --data-urlencode "location=Beirut,Beirut,Beirut Governorate,Lebanon" \ --data-urlencode "gl=lb" \ --data-urlencode "hl=ar"
Replace YOUR_API_KEY with your key. See the API docs for every parameter.
These are v1 codes, built from Google's canonical city name. A v2 code uses coordinates instead, so it can point at a street or a neighbourhood. The UULE generator and decoder creates one for any coordinates.
Canonical names from Google's public geo targets list. City list and population from GeoNames (CC BY 4.0). Only cities that match one Google location exactly are listed. Results can still differ from what a person in the city sees, because Google also personalises.
JustSERP was born out of our own need to scrape google search results to parse data for analytical and processing needs. We have gone through the excruciating process of running automated web search queries by bypassing bot filters, solving captchas and parsing convoluted HTML. It is our pleasure to share our expertise with others through this affordable, fast and reliable SERP API. Don't hesitate to contact us with any questions at [email protected].