Self-hosted API for Google Maps, News, Trends, Autocomplete and YouTube transcripts.
1.0K
One self-hosted API for Google Maps, News, Trends and Autocomplete, plus YouTube transcripts. Normalised JSON, no per-call vendor pricing.
Source: https://github.com/rainmanjam/headwater · License: MIT
docker run -d --name headwater -p 8000:8000 \
-e API_KEY=choose-a-long-random-string \
rainmanjam/headwater:latest
curl -H "X-API-Key: choose-a-long-random-string" \
"http://localhost:8000/api/v1/google-autocomplete/autocomplete?q=n8n"
{"suggestions":["n8n","n8n workflows","n8n ai","n8n pricing","n8n github"]}
Interactive docs are at /api/docs once it is running. That list is generated
from the code, so it is always the authoritative one.
| Tag | Architectures |
|---|---|
latest, 2.1.0 | linux/amd64, linux/arm64 |
2.0.0 | linux/amd64, linux/arm64 |
1.5.1, 1.5.0, 1.4.1 | linux/amd64, linux/arm64 |
1.6.0 | linux/arm64 only |
1.x tags predate the rename from social-flood and are kept so older deploys
stay reproducible. They are byte-identical to the originals.
These five sources have no single official API between them. Getting search interest, a place's reviews, a news feed and a video transcript into one pipeline normally means four vendors, four auth schemes, four response shapes and four invoices that scale per call.
Headwater is one service in front of all of them — 67 operations behind one key and one base URL, running on your own infrastructure with your own IP and your own rate limits.
It is not a Google Cloud wrapper. Nothing here needs a Google API key, and nothing here is an officially supported Google interface.
Redis is not optional in production. Without it, Maps jobs, monitors and
webhooks fall back to in-memory storage that is lost on restart and invisible to
sibling workers. /health/detailed reports record_storage_durable so you can
assert on it rather than hope.
services:
headwater:
image: rainmanjam/headwater:latest
ports: ["8000:8000"]
environment:
API_KEY: choose-a-long-random-string
REDIS_URL: redis://redis:6379/0
depends_on: [redis]
redis:
image: redis:7-alpine
| Variable | Purpose |
|---|---|
API_KEY | Required. Sent as X-API-Key on every request |
REDIS_URL | Cache and durable record storage |
ENABLE_PROXY / PROXY_URLS | Outbound proxying, comma-separated, round-robin |
NO_PROXY_HOSTS | Hosts that bypass the proxy. Suffix match on a dot boundary |
NEWS_ARTICLE_ALLOWED_HOSTS | Hosts /article-details/ may fetch |
RATE_LIMIT_ENABLED / _REQUESTS / _TIMEFRAME | Request throttling |
CORS_ORIGINS | Explicit allow-list; a wildcard disables credentialed requests |
Proxying is per host rather than all-or-nothing, because the upstreams disagree:
Reddit answers 429 to datacentre IPs and needs a proxy, some providers refuse
youtube.com at the tunnel, and Google Maps loads fine through a plain GET
but a full browser navigation through a datacentre proxy never settles.
| Surface | Operations |
|---|---|
| Google Maps | 36 — search, nearby, grid and bounding-box, place details, reviews, photos, Q&A, popular times, async jobs, monitors, webhooks |
| Google Trends | 10 — interest over time and by region, related queries and topics, trending now, geo and category reference data |
| Google News | 9 — search, top, by topic, by source, by location, full-article extraction |
| YouTube transcripts | 5 — fetch, list, format, translate, batch |
| Google Autocomplete | 1 |
selectors_stale when extraction
stops matching, so breakage surfaces as a signal rather than as silently empty
results.summary and keywords on /article-details/ return null. They needed
nltk, which carries an unfixed advisory (PYSEC-2026-3740) with no patched
release, so the dependency was dropped. Everything else — title, authors,
publish date, full text, images — is unaffected.Multi-stage build on python:3.14-slim-trixie, pinned by digest, running as a
non-root user, with Debian security updates applied at build time. Carries
standard org.opencontainers.image.* labels, so docker inspect tells you the
source, revision, version and license of whatever you pulled.
Full documentation, including deployment, performance tuning and troubleshooting guides: https://github.com/rainmanjam/headwater
Content type
Image
Digest
sha256:ab46c57ed…
Size
887.6 MB
Last updated
3 days ago
docker pull rainmanjam/headwater