Preheat the air fryer to 400°F (200°C) for about 5 minutes.
In a mixing bowl, combine the olive oil, garlic powder, paprika, salt, black pepper, cayenne pepper (if using), and lemon juice. Mix well to form a marinade.
Add the shrimp to the bowl and toss until all the shrimp are evenly coated with the marinade.
Lightly spray the air fryer basket with cooking spray to prevent sticking.
Arrange the shrimp in a single layer in the air fryer basket. Do not overcrowd; cook in batches if necessary.
Cook the shrimp at 400°F (200°C) for 6-8 minutes, shaking the basket halfway through the cooking time to ensure even cooking. The shrimp should be pink and opaque when done.
Remove the shrimp from the air fryer and transfer them to a serving plate. Garnish with fresh parsley if desired.
For best results, choose shrimp that are uniform in size to ensure even cooking.
You can serve the shrimp with a dipping sauce, over rice, or in tacos for a complete meal.
Make sure to check the shrimp frequently towards the end of cooking to avoid overcooking.