2 tbsp Old Bay seasoning
1 lb (26–30 count) medium shrimp, peeled and deveined
1/2 tsp celery seeds
1/4 tsp allspice berries
1 cup extra-virgin olive oil
1/3 cup fresh lemon juice
1/4 cup packed flat-leaf parsley leaves, finely chopped
1 tbsp kosher salt
1/2 tsp crushed red chile flakes
2 cloves garlic, finely chopped
12 dried bay leaves
1/2 medium yellow onion, thinly sliced lengthwise
Bring Old Bay and 8 cups water to a boil in a 4-qt. saucepan; add shrimp, reduce heat to low, and cook until shrimp are pink, about 2 minutes. Drain and transfer to bowl of ice water to chill; drain again.
Finely grind celery seeds and allspice in a spice grinder; transfer to a bowl and stir in oil, juice, parsley, salt, chile flakes, garlic, and bay leaves. In a 1-qt. glass jar, layer shrimp and onions; pour over oil mixture. Cover with lid; chill overnight before serving.