Reputation: 49817
i was wondering if github search API has limit on number of requests, and also i would like to know if is possible to save the retrieved data in my own databse, or there is some policy between.
Thank you.
Upvotes: 1
Views: 1016
Reputation: 1323953
Adding to the previous answer, you now (2d July 2013) can know precisely when the rate limit reset time will be effective.
That information is now available in the new
X-RateLimit-Reset
response header.
$ curl -I https://api.github.com/orgs/octokit
HTTP/1.1 200 OK
Status: 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1372700873
...
The X-RateLimit-Reset header provides a Unix UTC timestamp, letting you know the exact time that your fresh new rate limit kicks in.
The reset timestamp is also available as part of the
/rate_limit
resource.
$ curl https://api.github.com/rate_limit
{
"rate": {
"limit": 60,
"remaining": 42,
"reset": 1372700873
}
}
Upvotes: 0
Reputation: 2309
Adding to the answer given by @CharlesB, unauthenticated requests can also enjoy higher rate limits given they include client ID and secret in the query string
$ curl -i https://api.github.com/users/whatever?client_id=xxxxxxxxxxxxxx&client_secret=yyyyyyyyyyyyyyyyyyyyy
HTTP/1.1 200 OK
Status: 200 OK
X-RateLimit-Limit: 12500
X-RateLimit-Remaining: 11966
Upvotes: 2
Reputation: 90316
http://developer.github.com/v3/#rate-limiting says the following
We limit requests to 60 per hour for unauthenticated requests. For requests using Basic Authentication or OAuth, we limit requests to 5,000 per hour. You can check the returned HTTP headers of any API request to see your current status:
$ curl -i https://api.github.com/users/whatever
As for saving the data, if it's yours it's OK, if it's other's it might also be OK but I'm not a lawyer:
Section F.1 of GitHub terms of services:
We claim no intellectual property rights over the material you provide to the Service. Your profile and materials uploaded remain yours. However, by setting your pages to be viewed publicly, you agree to allow others to view your Content. By setting your repositories to be viewed publicly, you agree to allow others to view and fork your repositories.
Upvotes: 3