I deleted some data accidentally on my Macbook a while ago, and then a couple weeks later the hard drive failed. Now my Macbook can't start normally. I took it to an Apple store and they told me they could replace the hard drive but I need to go somewhere else to extract the data. Is it possible for me to recover the data I deleted? Thank you in advance!
Sorry to say this but not very likely.
Especially if the HDD was used after the deletion for any period of time. The problem is that once files and directories are deleted there locations are removed from a table that maintains where they're located on the HDD. When these items are deleted, it's often the case that the data will remain on the HDD but just the location information is deleted, but the space they were using is released back into the available pool for reuse.
As new files are written to the HDD, this space, or portions of it, will get reused by the system with newly written files and directories.
So even if someone were able to recover these files & directories, they'd be only able to recover portions of them if anything.