Query History
developer/v1/history/queriesReturns a paginated, filterable list of your API query history with tier-based retention (Free: 30 days, Developer: 90 days, Pro: 1 year, Enterprise: 2 years). Each record includes the endpoint called, HTTP method, target domain, status code, response time, cache hit status, and cost — essential for API observability and operational debugging.
What It Does
Retrieves historical API request records for your organization. Supports granular filtering by endpoint path, target domain (partial match), API key ID, HTTP status code, cache hit/miss, error code, and ISO 8601 date range. Returns paginated results (max 1,000 per page) with retention metadata showing how long your tier preserves history data.
Why It's Useful
API request logging is a foundational observability practice recommended by the OpenTelemetry standard for distributed tracing. Provides the audit trail needed for SOC 2 Type II compliance (CC7.2 — System Monitoring), enables root-cause analysis during incident response, and gives engineering teams data-driven insights into API consumption patterns.
Use Cases
Integration Debugging
An API integration starts returning intermittent errors. Filter query history by endpoint and status_code >= 400 to isolate failing calls, compare request parameters across successful and failed attempts, and identify the exact payload or timing that triggers failures.
Reduce mean time to resolution (MTTR) by correlating request parameters with failure patterns instead of guessing.
Usage Auditing & Compliance
During a SOC 2 or ISO 27001 audit, demonstrate that all API access is logged with immutable records showing who accessed what data, when, and from which IP address. Filter by API key to isolate access by team or application.
Complete, exportable audit trail satisfying SOC 2 CC7.2 monitoring requirements and ISO 27001 A.12.4 logging controls.
Performance Regression Detection
After a deployment, compare average response times for critical endpoints (dns/lookup, domain/ssl) between the current and previous week. Filter by endpoint and date range to build before/after latency comparisons.
Detect performance regressions within hours of deployment rather than waiting for user-reported slowdowns.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Optional | Filter by endpoint, target, api_key_id, status_code, cache_hit, error_code, from/to (ISO 8601), limit (1-1000), offsetExample: endpoint=/v1/dns/lookup&from=2024-01-01T00:00:00Z&limit=100 |
Response Fields
| Field | Type | Description |
|---|---|---|
queries | array | List of query records with id, endpoint, method, target, status_code, response_time_ms, cache_hit, cost_micros, error_code, request_id, and created_at |
pagination.total | number | Total matching queries across all pages |
pagination.limit | number | Page size (default 100, max 1000) |
pagination.offset | number | Current offset position |
pagination.has_more | boolean | Whether additional pages of results exist |
retention.days | number | How many days of history your tier retains (30/90/365/730) |
retention.tier | string | Your current plan tier |
Code Examples
curl "https://api.edgedns.dev/v1/history/queries" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch(
'https://api.edgedns.dev/v1/history/queries',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/history/queries',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
}
)
data = response.json()
print(data)Read the full Query History guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Query History endpoint live in the playground.