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.
You may use either POST or GET requests. A POST request is prioritized, but if it is not provided, then the GET request will be interpreted as a POST.
The API uses three main data object entity types: Author, Book, Chapter, and Keyword. Other objects are also sometimes used, such as glossary terms.
There are two main endpoints for accessing content: search and get_entity.
The search endpoint allows you to retrieve a list of objects that match a keyword term.
https://edtechbooks.org/api.v2.php?action=search
Variable | Type | Status | Default | Description |
---|---|---|---|---|
term | string | required | - | Specify a url-encoded search term or phrase. |
entity_type | string | required | - | Specify the entity type. |
limit | integer | optional | 10 | Specify a limit. Maximum: 200 |
offset | integer | optional | 0 | Specify an offset for pagination purposes. |
api_key | string | optional | - | Some functions require an API key, while others do not. |
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
The get_entity endpoint allows you to retrieve a structured object for the entity.
https://edtechbooks.org/api.v2.php?action=get_entity
Variable | Type | Status | Default | Description |
---|---|---|---|---|
term | string | required | - | Specify a url-encoded search term or phrase. |
entity_type | string | required | - | Specify the entity type. |
id | integer | required | - | Specify the unique identifier of the entity. |
key | string | optional | - | Some functions require an API key, while others do not. |
Return the book with the identifier 3:
https://edtechbooks.org/api.v2.php?action=get_entity&entity_type=Book&entity_id=3
Return a chapter with the identifier 155:
https://edtechbooks.org/api.v2.php?action=get_entity&entity_type=Chapter&entity_id=155
Get a glossary term either from its unique identifier or a text string.
https://edtechbooks.org/api.v2.php?action=get_entity&entity_type=GlossaryTerm&entity_id=Behaviorism
The push_check endpoint allows you to test if your API key is working for future calls. Note that an API key is required, which may be found in your user settings.
https://edtechbooks.org/api.v2.php?action=push_check&api_key=YOURAPIKEYHERE
Variable | Type | Status | Default | Description |
---|---|---|---|---|
key | string | required | - | Pushing data requires an API key. |
You can create an ETB API key for your project by logging in and going to the Developer
dashboard in the top-right menu. This requires developer access, which you can request by contacting a site administrator.
This content is provided to you freely by Ensign College.
Access it online or download it at https://ensign.edtechbooks.org/userguide/reading_api.