This describes the resources that make up the official GitBook API. If you have any problems or requests please contact support.
Some official libraries are available to easily get you started:
Name | Language |
---|---|
node-gitbook-api | Node.js |
go-gitbook-api | Go (Golang) |
All API access is over HTTPS, and accessed through https://api.gitbook.com/
. All data is sent and received as JSON.
$ curl -i https://api.gitbook.com/author/gitbookio
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Content-Length: 275
Etag: W/"113-25d22777"
Date: Thu, 11 Jun 2015 14:49:26 GMT
Via: 1.1 vegur
{ ... }
Error are returned as JSON:
{
"error": "Not found",
"code": 404
}
Requests that return multiple items will be paginated to 50 items by default.
You can specify further pages with the ?page
parameter. For some resources, you can also set a custom page size up to 100 with the ?limit
.
Paginated results will be returned with information about the page context:
{
list: [],
page: 0,
limit: 100,
total: 0
}
You can issue a GET request to the root endpoint to get details about the instance:
curl https://api.gitbook.com
{
"type":"public",
"version":"11.7.6",
"urls":{
"main":"https://www.gitbook.com/",
"api":"https://api.gitbook.com/"
}
}