For anyone having private space under docker hub, use Bearer Token with your PAT. It returns json data from API.
i.e. curl --header "Authorization:bearer {your_PAT}" https://hub.docker.com/v2/namespaces/library/repositories/nginx/tags