This is largely up to the DM and depends on a lot of variables.
Picking up items that the character has out and are obvious (if he have the spell book in hand and was reading from it) should be a free interaction, as it is now just lying on the ground next to them. Some DMs might say they fell on top of it and it would take an action to search under their body.
Other items, like a pearl that is tucked away, would require rifling through their bags and pockets to find (unless for some odd reason you had the exact knowledge of where they keep every item). If you think of turns as six second windows, and imagine looking for a pearl in a bag full of stuff without knowing whether or not it is even in there, you could see how this might take several turns.
As a DM, I call this "quick looting" and have the player roll an investigation check to rifle through. The higher the roll, the more they get, but it takes their entire turn. The only way it wouldn't is if they had specific knowledge of exactly where something was, or if it was really obvious (like a large potion that took up 1/3 of the bag), in which case they would just get the item but still take their turn doing so.
This has usually been used for taking potions of healing from allies and enemies that they have seen using them. It has, in my experience, provided an adequate amount of cost for the reward. Skip your turn but get an item that you want for next turn (or bonus action chug that potion).