Clean the chicken. Mix all the spices up in a small bowl and set aside.
Heat the olive oil on the stove until warm and add the spices. Cook for 5 minutes to bloom the spices. Rub the spice paste on the chicken, top and bottom. Put the lemon halves and as many of the onion quarters as you can into the chicken cavity.
Put the chicken in a large plastic bag, or wrap it in plastic wrap and refrigerate it for at least 4 hours or overnight if possible.
If using the oven, preheat to 400 degrees. If using a crockpot, ball up 4 pieces of foil and place them in a square in the bottom of the crockpot for the chicken to rest on.
Oven directions: Place the chicken on a rack in a roasting pan and cook at 400 degrees for 20 minutes. Reduce heat to 350 degrees and continue cooking until the thigh temperature is 165 degrees. If the skin gets too dark, cover it with foil. Put chicken broth in the bottom of the pan if the drippings start to burn.
Crockpot directions: Place the chicken on the foil balls. Add 1/2 cup chicken broth to the bottom. Cover and cook on low for 6-8 hours or high for 3-4 hours. The chicken will fall off the bone and the house will smell amazing! If you'd like a crispy skin, place the chicken on an oven safe pan and broil for 5-10 minutes until the skin gets crispy.
Instant Pot directions: Turn on IP to saute. Add 1 TB olive oil, heat until oil shimmers. Add chicken, breast side down. Cook 6-7 minutes. Turn chicken over and add 1 1/2 cups chicken broth and 2TB lemon juice. Insert lemon halves in the cavity if they've fallen out.
Put the lid on the IP and lock it. Set it to high pressure for 25 minutes (6 minutes per pound). After the time is up, let the IP release naturally. The skin will not be crisp. If you want to crisp it, put the chicken under the broiler for a few minutes.