Apple Pie is written in the key of D♯ Minor.
According to the Theorytab database, it is the 10th most popular key among Minor keys and the 22nd most popular among all keys. Minor keys, along with major keys, are a common choice for popular music. The three most important chords, built off the 1st, 4th and 5th scale degrees are all minor chords (D♯ minor, G♯ minor, and A♯ minor).
See the D♯ Minor Cheat Sheet for popular chords, chord progressions, downloadable midi files and more!