Skip to main content
QUICK REVIEW

[Paper Review] APISENSOR: Robust Discovery of Web API from Runtime Traffic Logs

Yaru Yang, Chenxing Zhong|arXiv (Cornell University)|Mar 25, 2026
Software System Performance and ReliabilityComputer Science0 citations
TL;DR

APISensor is a black-box API discovery framework that robustnessly reconstructs web APIs from mixed runtime traffic by denoising, path normalization, and a two-stage graph-based clustering of structural templates and semantic behavior.

ABSTRACT

Large Language Model (LLM)-based agents increasingly rely on APIs to operate complex web applications, but rapid evolution often leads to incomplete or inconsistent API documentation. Existing work falls into two categories: (1) static, white-box approaches based on source code or formal specifications, and (2) dynamic, black-box approaches that infer APIs from runtime traffic. Static approaches rely on internal artifacts, which are typically unavailable for closed-source systems, and often over-approximate API usage, resulting in high false-positive rates. Although dynamic black-box API discovery applies broadly, its robustness degrades in complex environments where shared collection points aggregate traffic from multiple applications. To improve robustness under mixed runtime traffic, we propose APISENSOR, a black-box API discovery framework that reconstructs application APIs unsupervised. APISENSOR performs structured analysis over complex traffic, combining traffic denoising and normalization with a graph-based two-stage clustering process to recover accurate APIs. We evaluated APISENSOR across six web applications using over 10,000 runtime requests with simulated mixed-traffic noise. Results demonstrate that APISENSOR significantly improves discovery accuracy, achieving an average Group Accuracy Precision of 95.92% and an F1-score of 94.91%, outperforming state-of-the-art methods. Across different applications and noise settings, APISENSOR achieves the lowest performance variance and at most an 8.11-point FGA drop, demonstrating the best robustness among 10 baselines. Ablation studies confirm that each component is essential. Furthermore, APISENSOR revealed API documentation inconsistencies in a real application, later confirmed by community developers.

Motivation & Objective

  • Motivate robust API discovery for LLM-enabled agents operating on evolving web services with incomplete documentation.
  • Address limitations of static white-box and naive black-box approaches in real-world, mixed-traffic environments.
  • Develop an unsupervised pipeline to extract API templates and refine them via semantic clustering to improve precision and robustness.

Proposed method

  • Apply multi-signal noise filtering to remove non-API requests from runtime traffic.
  • Normalize API paths by stripping extraneous components and standardizing formatting.
  • Use a two-stage clustering: Stage 1 mines structural templates with a Drain3 prefix-tree to group paths into interface-level templates (e.g., /api/v1/items/*).
  • Stage 2 performs semantic refinement within each template group using lightweight features (path structure, query parameters, payload complexity) and graph-based clustering (or fallback to K-means) to separate behaviors.
  • Leverage a consistency loss L_cons = ||A − σ(ZZ^T)||_F^2 and a clustering regularization term in the final objective L = L_cons + λ L_clus to learn embeddings and form coherent semantic clusters.

Experimental results

Research questions

  • RQ1RQ1: How effective is APISensor at discovering APIs across diverse applications compared with baselines?
  • RQ2RQ2: How robust is APISensor to noise in diverse API traffic (mixed multi-tenant gateways)?
  • RQ3RQ3: What is the contribution of each component (denoising, template mining, semantic graph clustering) to overall performance?

Key findings

  • APISensor achieves high discovery accuracy across six open-source applications, with average PGA 95.92%, RGA 94.36%, and FGA 94.91%.
  • APISensor demonstrates strong robustness across noise types and levels, with at most an 8.11-point decrease in FGA and Purity variation within 1%.
  • Across applications and noise settings, APISensor shows the lowest performance variance among 10 baselines.
  • Ablation studies confirm that each component (noise filtering, template mining, semantic refinement, graph clustering) is essential for performance.
  • The study provides a 10K+ traffic benchmark with 199 ground-truth endpoints and notes discovery of shadow APIs in Dify validated by the community.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.