If you’re worried about cash advances, call your card issuer and try these strategies:
Ask if your gift-card purchase will code as a purchase or cash advance.
Your issuer may be able to tell you outright if you’ll need to worry about cash advances.
Turn off cash advances for your credit card.
If your issuer allows this, any cash advances will simply be declined when you use your credit card for them.