Welcome to Healthcare magic!
can occur during endoscopy
But cough does not occur after endoscopy and last for one month.
For cough persistent for more than a month, chest xray should be taken.
Further evaluation depends on the xray findings.
If xray is normal, then it can be due to allergy
or gastroesophageal reflux disease