Skip to content

Comments

Extract place_id#211

Merged
gosom merged 1 commit intogosom:mainfrom
xavier-villelegier:add-placeId
Jan 5, 2026
Merged

Extract place_id#211
gosom merged 1 commit intogosom:mainfrom
xavier-villelegier:add-placeId

Conversation

@xavier-villelegier
Copy link
Contributor

Fixes #186

Summary

  • Adds extraction of Google's place_id field from scraped place data

Changes

  • Added PlaceID field to the Entry struct with JSON tag place_id
  • Extract the value from darray[78] in EntryFromJSON()
  • Added place_id column to CSV output
  • Updated test fixture with expected place_id value

Why

The place_id is Google's stable unique identifier for a place (e.g., ChIJDdnwdv0y5xQRRytw1ihZQeU). Unlike cid or data_id, the place_id is:

  • Used directly in Google Maps APIs (Places API, Geocoding API)
  • Stable across Google Maps URL formats

This way, we can combine both API and scraper usage

Test plan

  • go build ./... passes
  • go test ./... passes

@gosom gosom merged commit 6bfa025 into gosom:main Jan 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing placeId field in scraped data

2 participants