Shapir: Standardizing and Democratizing Access to Web APIs
Tarfah Alrashed, Lea Verou, David R. Karger
Abstract
Today, many web sites ofer third-party access to their data through web APIs. But manually encoding URLs with arbitrary endpoints, parameters, authentication handshakes, and pagination, among other things, makes API use challenging and laborious for programmers, and untenable for novices. In addition, each site ofers its own idiosyncratic data model, properties, and methods that a new user must learn, even when the sites manage the same common types of information as many others.
In this work, we show how working with web APIs can be dramatically simplifed by describing the APIs using a standardized, machine-readable ontology. By surveying a statistical sample of web APIs, we develop a simple ontology that can efectively describe the core functionality of nearly all of them. We then present Shapir, a system that includes a graphical, form-based authoring tool for the API description, from which Shapir can automatically generate a standardized JavaScript library for accessing data on the web site as objects with readable and writeable properties. This enables programmers to access data without learning the details of each API, and indeed allows them to use the same unchanged code for multiple web sites. We then integrate Shapir with Mavo, an HTML language extension for describing web applications declaratively, to also empower plain-HTML authors to access these APIs. In our lab evaluation, we found that programmers are able to accomplish program data management tasks that require multiple API requests 5.6 times faster on average using the Shapir generic library than using the popular Swagger API integration library. Using our Mavo-Shapir integration, even non-programmers were able to build functioning data management applications that access multiple web APIs in just 4 minutes.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 04008754-709d-4794-ab91-eb5f3a4d11eeBuilds on1
Related papers
- Agent Data Protocol: Unifying Datasets for Diverse, Effective Fine-tuning of LLM AgentsYueqi Song, Ketan Ramaneti, Zaid Sheikh, Ziru Chen et al.ICLR 2026 · 18 citations
- Crystalline: Lowering the Cost for Developers to Collect and Organize Information for Decision MakingMichael Xieyang Liu, Aniket Kittur, Brad A. MyersCHI 2022 · 31 citations
- Speculate: Generating REST API Specifications using LLMsKrishanu Singh, Kushagra Karar, Abhilash Jindal, Guowei YangFSE 2026
- Are Human Rules Necessary? Generating Reusable APIs with CoT Reasoning and In-Context LearningYubo Mai, Zhipeng Gao, Xing Hu, Lingfeng Bao et al.FSE 2024 · 4 citations
- Supporting Web-Based API Searches in the IDE Using SignaturesNick C. Bradley, Thomas Fritz, Reid HolmesICSE 2024
