Require jq command
For anonymous user
$ curl --head -H "Authorization: Bearer $(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest 2>&1 | grep RateLimit
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4369 0 4369 0 0 5412 0 --:--:-- --:--:-- --:--:-- 5407
RateLimit-Limit: 2500;w=21600
RateLimit-Remaining: 2500;w=21600
For docker hub user account
$ curl --head -H "Authorization: Bearer $(curl --user '<User Name>:<Password>' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest 2>&1 | grep RateLimit
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4464 0 4464 0 0 4710 0 --:--:-- --:--:-- --:--:-- 4713
RateLimit-Limit: 2500;w=21600
RateLimit-Remaining: 2496;w=21600
Thanks for sharing! Please make sure you are using --head in the curl request. We've updated the registry so that HEAD requests won't count against the limits: https://docs.docker.com/docker-hub/download-rate-limit/#how-can-i-check-my-current-rate