fsq2anchor#
Import Foursquare/Swarm checkin history to Anchor on AT Protocol.
Features#
- Parses Foursquare data export (checkins, photos)
- Preserves original timestamps
- Geocodes addresses via LocationIQ (street, city, region, postal code, country)
- Uploads photos from local
pix/directory - Stores Foursquare venue IDs for reference
- Respects AT Protocol rate limits
- Auto-resolves PDS from handle
Installation#
go install github.com/tijs/fsq2anchor@latest
Or build from source:
git clone git@tangled.sh:tijs.org/fsq2anchor
cd fsq2anchor
go build -o fsq2anchor .
Usage#
1. Get your Foursquare data export#
Request your data at foursquare.com/settings. You'll receive a zip containing:
checkins1.json,checkins2.json, etc.photos1.jsonpix/directory with photo files
2. Set up credentials#
Create a .env file or export environment variables:
# Required
ATP_HANDLE=your.handle.here
ATP_PASSWORD=xxxx-xxxx-xxxx-xxxx # App password from bsky.app/settings/app-passwords
# Optional (recommended for better address data)
LOCATIONIQ_TOKEN=pk.xxx # Free at locationiq.com
3. Run the import#
# Dry run to validate data
fsq2anchor --dir /path/to/foursquare-export --dry-run
# Import first 5 checkins (test)
fsq2anchor --dir /path/to/foursquare-export --limit 5
# Full import
fsq2anchor --dir /path/to/foursquare-export
# Resume from checkin 100 (if interrupted)
fsq2anchor --dir /path/to/foursquare-export --offset 100
Options#
| Flag | Description |
|---|---|
--dir |
Path to Foursquare export directory (required) |
--limit N |
Import only N checkins |
--offset N |
Skip first N checkins (for resuming) |
--dry-run |
Validate without importing |
--skip-photos |
Skip photo uploads |
--skip-geocode |
Skip LocationIQ geocoding |
--pds URL |
Custom PDS URL (auto-resolved by default) |
Output Format#
Each checkin is stored as an app.dropanchor.checkin record:
{
"text": "Great coffee!",
"createdAt": "2023-01-15T10:30:00Z",
"address": {
"name": "Coffee Shop",
"street": "123 Main St",
"locality": "Amsterdam",
"region": "North Holland",
"postalCode": "1012 AB",
"country": "nl"
},
"geo": {
"latitude": "52.3676",
"longitude": "4.9041"
},
"fsq": {
"fsqPlaceId": "4b123abc...",
"name": "Coffee Shop",
"latitude": "52.3676",
"longitude": "4.9041"
}
}
Rate Limits#
The tool respects AT Protocol rate limits:
- ~3 seconds between checkin creates
- ~0.5 seconds between photo uploads
- Estimated time: ~3 seconds per checkin
License#
MIT