There is the GitHub WSAPI but that is, of course, proprietary to GitHub and can't be used to access repositories on GitLab or elsewhere.