Add the chopped onion and garlic cloves to a food processor and pulse until finely minced. Add the parsley, cilantro, and all dry spices (cumin, coriander, salt, black pepper, red pepper flakes, and cayenne pepper), then pulse until everything is well combined and fragrant. This method keeps the herbs bright and prevents them from becoming a paste. I prefer pulsing rather than continuous blending because it gives you better control over the texture—you want roughly chopped herbs, not a puree.
Add the drained and rinsed chickpeas to the food processor with the herb and spice mixture, then pulse 2-3 times until the chickpeas are broken down but still retain some texture—you're aiming for a coarse, chunky mixture, not a smooth paste. Transfer to a mixing bowl and fold in the flour until just combined. The texture should be crumbly and hold together when squeezed, similar to wet sand.
Cover the mixing bowl and refrigerate for at least 2 hours, or place in the freezer for 25 minutes if you're short on time. This chilling step is crucial because it allows the starches to absorb moisture and helps the mixture hold its shape when formed. I always chill mine because cold falafel is much easier to shape and won't fall apart during air frying.
Remove the chilled mixture from the refrigerator and gently stir in the baking powder until evenly distributed throughout—avoid overmixing, which can activate the baking powder prematurely. Using your hands or a small ice cream scoop, shape the mixture into 12 equal balls or slightly flattened discs (discs cook a bit more evenly). Work quickly so the mixture doesn't warm up too much.
Preheat your air fryer to 350°F. Arrange the shaped falafel in a single layer in the air fryer basket without crowding (work in batches if needed), then lightly spray with olive oil on all sides. Air fry for 15 minutes total, flipping each falafel halfway through at the 8-minute mark to ensure even browning on all sides. The falafel is done when golden brown and crispy on the outside.