The Reading API for this site allows users and apps to access book and chapter objects in JSON format. The url for the Read API is the site's base url plus "api.php" (e.g., https://edtechbooks.org/api.php).
Two types of objects may be requested via the Read API: (a) a book or (b) a chapter. Book calls require the book variable, which will look up the book based upon the unique "short name" provided. Chapter calls require both the book variable and the chapter variable, which will look up the chapter based upon the unique "short name" for each.
The API may be used to display content in your own site or app provided that you include proper attribution for the content and the hosting site. This can easily be done by displaying the suggested citation for the book or chapter.
The platform uses three main data object types: authors, books, and chapters. Other objects are also sometimes used, such as glossary terms.
|action||string||optional||read||Specify the action to be performed. If no action is specified, the API will attempt to return a book or chapter.|
|book||string||optional||-||The short name of the book, which is the path of the book's base or cover url. For example: http://edtechbooks.org/qualitativeinquiry|
|chapter||string||optional||-||The short name of the chapter, which is the last part of the chapter's url. For example: http://edtechbooks.org/qualitativeinquiry/storyanalysis|
|glossary_term||string||optional||-||The anchor name of the glossary term.|
|glossary_term_id||int||optional||-||The term_id of the glossary term.|
|term||string||optional||-||Specify a search term for some actions.|
|limit||integer||optional||10||Specify a limit. Maximum: 200|
|offset||integer||optional||0||Specify an offset for pagination purposes.|
|key||string||unused||-||The Reading API currently does not require a key.|
Options for the action variable include the following:
To request reference information for all books in the site, the API call would be:
To request the book object for https://edtechbooks.org/k12handbook, the API call would be:
To request the chapter object for https://edtechbooks.org/k12handbook/connectivism, the API call would be:
To request the glossary term "constructivism" in https://edtechbooks.org/k12handbook, the API call would be:
To search for books with the term "education" in the title, the API call would be:
To request the analytics for the chapter https://edtechbooks.org/k12handbook/connectivism, the API call would be:
To get more than the default referer limit (10), add a referer_limit variable to the url.https://edtechbooks.org/api.php?book=k12handbook&chapter=connectivism&action=analytics&referer_limit=20
To search for an author with the name "Royce," the API call would be:
An example of a simple app that accessed books on this site might follow this structure:
An example of an app that could download the entire available database might follow this structure:
An example of an app that could search for an author and return author information might follow this structure:
The API currently does not require a key, but that could change as the site and its services develop. For more information on future plans for the API or to request a key, please contact the site administrator.
CC BY: This work is released under a CC BY license, which means that you are free to do with it as you please as long as you properly attribute it.