Vicodin can be detected in the urine for 3-4 days. A blood test can detect Vicodin for up to 6-48 hours. A saliva test can detect Vicodin for up to 3-4 days. Vicodin, like many other drugs, can be detected with a hair follicle drug test for up to 90 days. Vicodin contains hydrocodone, an opiate analgesic, used to treat moderate to severe pain.