Tell the person getting you the gift exactly what you want. Be as specific as possible to avoid mistake.
For example, if you want a book, give them the amazon link to the book.
Have you actually tried that in real life? It certainly never worked for me. I've been so specific as to provide the exact part number, at the exact store, with a link if it is online, with the price, and if there is a deal with details on how to get it for a low price. After ~25 years of being that specific, I have yet to ever receive ANYTHING on my list*. All I hear from friends and family is that they don't know what to get me. Or that they want to surprise me by not getting anything I want. The best I've gotten is the item on the shelf next to the item I actually asked for.
I've also tried the opposite, giving little or even no details in hopes that they can surprise me with a good gift and the result is the same, that I don't get anything I want.
With my family, I've resorted to asking for shopping days where they drive into town, go out with me, spend a day doing things, eating meals, and going shopping so I can have them buy the item that was on my list already.
With my wife, she's been buying herself gifts for years and selling them to her family so that she gets what she wants. I'm fairly certain that I'm going to have to stoop to that level if I ever want to enjoy one of my gifts that I get.
I know that it is the thought that counts. But why does the thought have to be "I'll get what Dullard doesn't want!"?
*There was one exception when someone bought something on my list without knowing it was on my list (a bag of Doritos chips).