We propose a systematic procedure to directly extract the Eliashberg function for electron-phonon coupling from high-resolution angle-resolved photoemission data. The procedure is successfully applied to the Be(1010) surface, providing new insights to electron-phonon coupling at this surface. The method is shown to be robust against imperfections in experimental data and suitable for wider applications.