How to programmatically get Mac's current street address?

I’m working on replacing Day One with Bear, and to that end I want to insert my current location into the Bear Journal note .

I installed an application call “Location Helper”, and I can get my lat/long/elevation coordinates using some simple applescript

tell application “Location Helper”
set clocation_description to get location string
log ("Current address is " & clocation_description)
end tell

But what a really want is and address like

1 Microsoft Way
Redmond, WA 12345

It looks like I can do a reverse address request using Google Geocoding API, but since my Mac knows it’s location, is there a way ask it for its street address? .

For curious, I’m making an Keyboard Maestro macro that opens a Bear note and populates with Journal template text, include things like date, weather, and ( soon ) location.

Not always. I don’t check the address of every building I go into, especially restaurants/coffee shops, etc. I know how to get there, but I don’t know the address.

And besides, that the antithesis to automation.

On a good note, I have it working with the google api. I press a hotkey and KM creates a Bear note pre-populated with the date, location, weather, and my journalling template based on the time of day. It also automatically tags the note “journal/yyyy/MM/dd” for organizational purposes.

Google does charge a very small fee for each use of the API key, but the amount is negligible.

Sounds like you have it under control. If things go sideways, you could look into this. It has options for lat, long, address, place name, etc.

1 Like