• The EdTech Books User Guide
  • Introduction
  • Essential Concepts
  • Basic Features
  • Advanced Features
  • Add-on Services
  • Appendix
  • Deprecations
  • API (V2)
  • Download
  • Translations
  • API

    Web ScrapingAPI

    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.

    Usage

    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.

    Data Structure

    The API uses three main data object entity types: Author, Book, Chapter, and Keyword. Other objects are also sometimes used, such as glossary terms.

    Endpoints

    There are two main endpoints for accessing content: search and get_entity.

    Search

    The search endpoint allows you to retrieve a list of objects that match a keyword term.

    https://edtechbooks.org/api.v2.php?action=search

    Variables

    VariableTypeStatusDefaultDescription
    termstringrequired-Specify a url-encoded search term or phrase.
    entity_typestringrequired-Specify the entity type.
    limitintegeroptional10Specify a limit. Maximum: 200
    offsetintegeroptional0Specify an offset for pagination purposes.
    keystringunused-The Reading API currently does not require a key.

    Examples

    Return all books that match the term "technology:"

    https://edtechbooks.org/api.v2.php?action=search&entity_type=Book&term=technology

    Return all authors with the name "Royce:" 

    https://edtechbooks.org/api.v2.php?action=search&entity_type=Author&term=Royce

    Get Entity

    The get_entity endpoint allows you to retrieve a structured object for the entity.

    https://edtechbooks.org/api.v2.php?action=get_entity

    Variables

    VariableTypeStatusDefaultDescription
    termstringrequired-Specify a url-encoded search term or phrase.
    entity_typestringrequired-Specify the entity type.
    idintegerrequired-Specify the unique identifier of the entity.
    keystringunused-The Reading API currently does not require a key.

    Examples

    Return the book with the identifier 3:

    https://edtechbooks.org/api.v2.php?action=get_entity&entity_type=Book&id=3

    Authentication

    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.

    This content is provided to you freely by BYU Open Learning Network.

    Access it online or download it at https://open.byu.edu/userguide/reading_api.