A molecule which exerts the same effects on the body as those found in opium (morphine and codeine). On this site, I am usually referring to the endogenous opioids (e.g. endorphins), which are chemicals made and released by the body as natural painkillers following injury and exercise, as part of the reward system following nourishing acts, and which promote good mood.
I could just say “endorphins”, but the problem there is that that phrase has become a blanket term in the general populace for “neurotransmitters”. For example, I once watched a video someone had made which said the drug MDMA releases “endorphins”. It doesn’t. It releases dopamine, serotonin and norepinephrine. So I will say “opioid” to be very clear about the type of molecule I am talking about.
An example of an artificial opioid drug is tramadol.