trap has 18 distinct synonyms spread across 7 of its 12 senses. Each sense below keeps its own list, because a synonym belongs to a meaning and not to a word: swapping one sense's substitute into another sense's sentence is how a thesaurus makes writing worse. WordNet records no antonym for it — antonymy is a relation between word forms rather than concepts, so it is deliberately sparse.
Counts are distinct word forms across every sense. A synonym that appears under three senses is counted once here and shown three times below, under each sense it belongs to.
drain consisting of a U-shaped section of drainpipe that holds liquid and so prevents a return flow of sewer gas
something (often something deceptively attractive) that catches you unawares
“the exam was full of trap questions”
a device to hurl clay pigeons into the air for trapshooters
the act of concealing yourself and lying in wait to attack by surprise
hold or catch as if in a trap
“The gaps between the teeth trap food particles”
to hold fast or prevent from moving
“The child was pinned under the fallen tree”
Synonyms, antonyms and the broader and narrower relations for trap come from Princeton University’s WordNet. Full sources and licences.