purchases will be available in the cloud to re-download at no cost to all devices signed in with the same Apple-ID.
Yet there is a big IF : if your country is supported. It is not up to Apple alone to allow for this feature, the Music Industry wants its copyright issues and license fees.. Apple is hard at work to get this in all countries, but for some it looks not good if the MusicIndustry wants Apple to pay extra license fees like in germany for example.
Once this feature is available you can check in the itunes store in your iOS device, look for "purchased items". A small cloud logo next to each item lets you download at no cost.
For apps and books this already works ( everywhere ) - see AppStore -> Updates -> purchased items and also in ibooks.app -> store -> purchased books ..
I lost almost all my music too, but I don't see anywhere to get those back in iTunes... the bottom of my "purchased" are only says "Configure Automatic Downloads" and "Download Previous Purchases", there are several CDs on myiPad, but not nearly all the ones I imported, and there is NO music at all on my iPhone. I lost everything from Godsmack to Carmina Burana. Very upset and no idea what to do.
Step 1. Open iTunes on the computer.
Step 2. Click Store and choose Authorize This Computer… from its drop-down menu.
Step 3. Enter the Apple ID and password that you have used to purchase the music.
Step 4. Connect your iPad air to the computer.
Step 5. Go to DEVICES and right click your iPad air. In the drop-down menu, click Transfer Purchases.
Step 6. Wait until the transfer is complete.
You can follow this link or the guide below:
If you purchased music with multiple Apple IDs, you have to authorize the computer for all of them. However, you're allowed to authorize up to 5 computers with one Apple ID. That means you have to look for other methods when you have already authorized 5 computers.