Getting data from pull request

Hi, is there some functionality I can access the pull request data, like for example getting a label to switch, for example, between publishing new major release or minor version using

One can access those data (JSON) from this url, but how can I access it from the GitHub Action? Is there some package on that?

curl -s