Endoscopy plays an important role in both diagnosing and treating achalasia and GERD. It can be used to diagnose achalasia by identifying food retention, esophageal dilation, and lack of peristalsis. Endoscopic treatments for achalasia include pneumatic balloon dilation, Botox injection, and per oral endoscopic myotomy (POEM). For GERD, endoscopy is used to grade esophagitis and identify complications like Barrett's esophagus. It can also assess for hiatal hernia and guide treatments like Stretta procedure or transoral incisionless fundoplication (TIF). Endoscopy after anti-reflux surgery helps evaluate for issues like disrupted or slipped