
Geohash
Under maintenance
Pricing
$0.02 / 1,000 results

Geohash
Under maintenance
Convert latitude and longitude into geohash strings with this Apify Actor. Input coordinates and optional precision; get accurate geohash output for spatial indexing and location queries. Can be used to obtain geohashes for the Apify Actor lhotanova/ticketmaster-scraper.
0.0 (0)
Pricing
$0.02 / 1,000 results
0
Total users
1
Monthly users
1
Last modified
16 days ago
🚀 Getting Started with the Geohash Encoding Actor (JavaScript Edition)
A simple Actor built with the Apify SDK that converts geographic coordinates (latitude and longitude) into a geohash string using the ngeohash
library.
It accepts JSON input with latitude, longitude, and an optional precision, encodes the coordinates, and stores the geohash along with the original coordinates in a dataset.
🔥 Included Features
- Built with Apify SDK for building Actors
- Input validation and parsing for latitude, longitude, and precision
- Geohash encoding using the
ngeohash
library - Storing results automatically in the Apify dataset
⚙️ How It Works
-
The Actor reads input JSON, which must contain:
latitude
longitude
- Optional
precision
(defaults to 9 if omitted)
-
Coordinates are parsed and passed to
ngeohash.encode()
with the given precision. -
The resulting geohash string is pushed to the dataset along with the original coordinates.
-
Actor then cleanly exits.
📝 Usage Example
Pass input JSON like this:
{"latitude": 37.7749,"longitude": -122.4194,"precision": 7}
💻 Local Development & Setup
Want to develop or debug locally? Here’s how to get started:
Step 1 — Install Apify CLI
- Using Homebrew (macOS/Linux):
$brew install apify-cli
- Using npm (any platform):
$npm install -g apify-cli
Step 2 — Pull the Actor from Apify Console
Use the CLI to pull the Actor by its unique identifier or name:
$apify pull <actor-id-or-name>
📚 Resources
- Apify SDK Documentation
- ngeohash npm package
- For the full details and walkthrough, check out the original article on this Actor
🎯 TL;DR
- Feed it latitude and longitude (plus optional precision)
- Get back a geohash string representing that location
- Results stored automatically in Apify Dataset
- Simple, reliable, and quick geo encoding in JavaScript
Ready to geohash your world? Let’s roll! 🌍✨