Help with querying the remaining rate limit with curl

Ah, I figured it out. It is actually embedded in the response header, as the doc mentioned (and I misunderstood). So I only need to use -v for curl and then parse the header.