Using File Finder API

Hi. I’m pretty new to GitHub.
Is it possible to get the list of files in the specific branch.
The endpoint I have been using is
The problem with this is that it returns even folders. I only want files, like they appear when using GitHub UI File Finder.
Thanks in advance!