The project is in a healthy, maintained state
A Ruby library for encoding and decoding UULE parameters in Google search URLs using coordinates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

SerpApi UULE Converter Light

A Ruby library for encoding and decoding UULE parameters in Google search URLs using coordinates


Gem Version Contributors Forks Stargazers Issues Issues MIT License

serpapi-uule-converter


A Blog Post with example usecase: Real World Example of GPS Targeted Local SERP

This gem is served under two names:

You can also find the original version at SerpApi UULE Converter Light.


Installation

gem install serpapi-uule-converter-light

Example

require 'serpapi-uule-converter-light'

latitude = 30.266666
longitude = -97.733330

# Encode coordinates to UULE
uule_encoded = UuleConverter.encode(latitude, longitude)
puts "Encoded UULE: #{uule_encoded}"

# Decode UULE to coordinates
uule_decoded = UuleConverter.decode(uule_encoded)
puts "Decoded UULE: #{uule_decoded}"

Output

Encoded UULE: a+cm9sZToxCnByb2R1Y2VyOjEyCnByb3ZlbmFuY2U6MAp0aW1lc3RhbXA6MTY4MDg3NzkwNjIzNjczNgpsYXRsbmd7CmxhdGl0dWRlX2U3OjMwMjY2NjY2MApsb25naXR1ZGVfZTc6LTk3NzMzMzMwMAp9CnJhZGl1czotMQo

Decoded UULE: {:role=>"1", :producer=>"12", :provenance=>"0", :timestamp=>"1680877906236736", :"latlng{"=>nil, :"}"=>nil, :radius=>"-1", :latitude=>30.266666, :longitude=>-97.73333}

Result

serpapi-uule-converter-light