Introduction to APIs for Research: 4TU.ResearchData's API as an example
Full text
Exploring the API of 4TU.ResearchData Leila Iñigo de la Cruz October 30, 2025
Introduction What are APIs 01 Common language of Web APIs 02 Why APIs are relevant for research 03 Using the Unix terminal to work with Web APIs 04 The Web API of 4TU.ResearchData 05
Introduction to APIs What are APIs 01 1. API (Application Programming Interface): A bridge that allows different software systems to communicate. 2. APIs define how software components interact.
Client Server
Introduction to APIs Common language for APIs 02 1. Web API is an API that allows different software systems to communicate via the web, using HTTP protocol. 2. They use a shared vocabulary of methods: GET, POST, PUT, DELETE to define how to exchange resources across the web. 3. Resources are something the API makes available and lets you interact with, e.g. (datasets, authors, collections). 4. Most Web APIs today use the JSON format to exchange data.
Introduction to APIs Why APIs are relevant for research 03 1. (In general) APIs enable automation, integration, and reuse of data and services. 2. Enable programmatic access to research data (no manual downloads) 3. Facilitate reproducibility and automation of workflows 4. Support interoperability across systems and tools Example: Retrieve datasets via API → analyze in Python/R → publish results
Introduction to APIs Using the Unix terminal with REST APIs 04 1. The Unix terminal allows HTTP requests using `curl`. `curl` = client URL: send requests and receive responses. Examples: curl [options] [URL] → Request → Server → JSON response
Introduction to APIs The Web API of 4TU.ResearchData 05 [base URL] : https://data.4tu.nl [specific resource URL:endpoint]: https://data.4tu.nl/v2/articles List of (documented) endpoints: https://djehuty.4tu.nl/ Exercise #1 : Checking the connection with the server using the web browser and CURL in the Unix terminal •Open a web browser and write: https://data.4tu.nl/v2/articles •One the Unix terminal and write: `curl –X GET https://data.4tu.nl/v2/articles | jq •How are both responses compared to each other?