Why the photos in a Foursquare Swarm export have no date or place, and how to put them back
You asked Foursquare for a copy of your Swarm data, opened the ZIP, and found a folder of photos with names nobody can read. Which trip was this? Which bar? The answers are in the same export, in two other files.
Why the photos have no date or place
A photo app decides where a picture goes on your timeline by reading a field inside the file: the EXIF tag DateTimeOriginal, shown as “Date Taken”. When a file has none, the app falls back to the file’s own date, which is the day the ZIP was built or extracted.
- The file names say nothing. In the real export we tested, every photo is in
pix/with a name like15234_86lNtfs9z3m9eYD_t5_uBRRQARTWs_Y73PQEOridfh4.jpg(older ones likeBMGMLXNIP44I0WPVA2LOPEMOYCFXBGQ1ZFTY1IILIQXJP3WA.jpg). - The photos are separate from the check-ins. The check-in they were attached to, with its time and venue, is in a different file. We have tested one real export; yours may differ in details, and CheckinRedate leaves any photo that already has a date inside as it is.
Where the date and the venue are
checkins1.json 1,000 check-ins per file, newest first
checkins2.json …
photos.json one entry per photo
pix/ the photos
15234_86lNtfs9z3m9….jpg
comments.json, tips.json, visits.json … not needed for thisEach entry in photos.json names its file in suffix and its check-in in relatedItemUrl:
{
"id": "67242bf0f6298b181b50a0e3",
"createdAt": "2024-11-01 01:16:32.000000",
"suffix": "/15234_86lNtfs9z3m9eYD_t5_uBRRQARTWs_Y73PQEOridfh4.jpg",
"relatedItemUrl": "https://www.swarmapp.com/checkin/6724199292a6b3053cbcc145"
}And each check-in, in one of the checkinsN.json files, has the time, the time zone and the venue:
{
"id": "674bd52e6ab4ef6954399a9a",
"createdAt": "2024-12-01 03:17:02.000000",
"timeZoneOffset": -300,
"venue": { "id": "5bd7a5561c675b0039be9acc", "name": "HALL", "url": "https://foursquare.com/v/hall/5bd7a5561c675b0039be9acc" }
}So the chain is: file name in pix/ → suffix in photos.json → check-in ID in relatedItemUrl → the check-in’s createdAt, timeZoneOffset and venue.name. In the export we tested, 737 of 778 photos linked to a check-in. The rest linked to a venue page (https://foursquare.com/v/…) or a tip, and have only the photo’s own createdAt.
Which date, and which time zone
createdAt is in UTC. timeZoneOffset is the check-in’s offset from UTC in minutes: -300 is UTC−5. The check-in above happened at 03:17 UTC on December 1, which was 10:17 PM on November 30 where it was made. That local time is the one you want in the photo, or a night out lands on the next day. CheckinRedate writes the local time as DateTimeOriginal and the offset as OffsetTimeOriginal.
Photos without a check-in have no offset in the export, so they get the photo’s createdAt as it is, in UTC.
What about GPS?
The check-ins in the export carry no coordinates. A venue has an ID, a name and a link, and nothing else. So the export alone cannot put your photos on a map, and CheckinRedate writes no GPS tags. The venue name goes into the EXIF ImageDescription and the file name instead.
How to request your Swarm export
- Sign in to your Foursquare account and open your privacy settings.
- Choose Export my data (Foursquare also calls it a data download request) and confirm.
- Foursquare emails you a link when the ZIP is ready. Download it.
Foursquare moves these menus from time to time. If yours look different, search Foursquare’s help pages for “export my data”.
Put the dates back in your browser
Add the ZIP of your Swarm export. CheckinRedate matches each photo to its check-in, writes the date, time zone and venue name into the file and sorts everything into a folder per year. Nothing is uploaded. Free for 25 photos.
Redate my Swarm photosOther ways to do it
- By hand. For a handful of photos: search
photos.jsonfor the file name, copy the check-in ID, find it in thecheckinsN.jsonfiles, and set the date in your photo app. - ExifTool and a script. ExifTool can write any date into a photo from the command line, for example
exiftool "-DateTimeOriginal=2024:11:30 22:17:02" "-OffsetTimeOriginal=-05:00" "-ImageDescription=HALL" photo.jpg. It does not read the Swarm export: you write the script, usually in Python, that joinsphotos.jsonwith the check-ins and calls it for every file. It is free and flexible, and it is the route to take if you want something this tool does not do. - Swarm-Checkins-Import. aaronpk/Swarm-Checkins-Import imports the check-ins of an export into your own website through Micropub. It is a good way to own your check-in history; it does not change the photo files.
FAQ
Is the date the moment the photo was taken?
It is the time of the check-in the photo was attached to. For a photo taken at the venue that is the same occasion, usually within minutes.
Will my photos show on the map?
No. The export has no coordinates, so no GPS is written. They show on the right day, with the venue name.
What happens to photos that match nothing?
A file in pix/ that photos.json does not list is copied untouched into a folder named unmatched, and manifest.csv lists it.
Sources
- aaronpk/Swarm-Checkins-Import
- ExifTool by Phil Harvey
- A real Swarm export of 2024 (778 photos), used to test the tool