In iPhoto, there was an AlbumData.xml file with information about all the photos like title, filename, etcetera. I was planning to use it from within a Python program to automatically export photos in certain albums to my website.

With the new OSX Photos app, I cannot find an AlbumData.xml or a plist file with the same information. The ~/Pictures/Photos Library.photoslibrary/Database/apdb/ directory contains serveral .apdb files, which are sqlite databases. I inspected the schema in two of them but didn't find any list of photos. (Note: "apdb" stands for "aperture db", so it seems Apple re-used quite a bit of aperture in the new Photos app.)

So... I want to get my hand on the filenames of my photos, their titles, which albums they're in. Where is this data stored?

(Googling is very hard because of the generic 'photos' search term...)

  • Note: I found that opening them with sqlite 3.6 did not work, 3.12 did. And you might first need to copy them somewhere else to avoid a 'database is locked' error.
    – konrad
    May 21, 2016 at 11:12

1 Answer 1


The "list of photos" is in the RKMaster table.

cd ~/Pictures/Photos Library.photoslibrary/Database/apdb
sqlite3 Library.apdb
select modelId,fileName,imagePath from RKMaster;

Do .schema RKMaster to see the other fields of the table.

  • You're right, this is a list of files. It didn't contain titles, though. Apparently that's in the RKVersion table: select name from RKVersion where name <> ''; See also discussions.apple.com/message/27873467#27873467 . So... your answer gave me a good search term to investigate further. I'll need to dig deeper. May 26, 2015 at 8:46
  • @ivan98 Do you by any chance know how to get a list of all photos (file names) in an album. How are RKAlbum and RKMaster linked?
    – A j
    Jan 20, 2020 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .