kvk_usage_report: Generate API usage report for current session

View source: R/utils-usage-tracking.R

kvk_usage_reportR Documentation

Generate API usage report for current session

Description

Display or return API usage statistics and costs for the current R session. This function helps you monitor your KvK API usage and associated costs.

Usage

kvk_usage_report(format = "summary")

Arguments

format

Character string specifying output format:

  • "summary" (default): Human-readable console output with costs and call counts for this session

  • "tibble": Structured summary data as a tibble

  • "detailed": Detailed data with one row per API call, suitable for analysis and visualization

Details

The summary format displays API call counts and costs for the current R session only. All usage data is session-based and will be reset when you restart R. Search calls are free, while profile calls cost EUR 0.02 each.

Only production API calls are included in reports. Test environment calls are not tracked.

Value

  • format = "summary": Invisible NULL (output printed to console)

  • format = "tibble": A tibble with session usage summary

  • format = "detailed": A tibble with detailed call-by-call data

See Also

kvk_usage_alert for setting usage limits, kvk_export_usage for exporting data to CSV, kvk_reset_usage for clearing usage history

Examples


# Display human-readable summary
kvk_usage_report()

# Get structured summary as tibble
summary_data <- kvk_usage_report(format = "tibble")
print(summary_data)

# Get detailed call data for custom analysis
call_data <- kvk_usage_report(format = "detailed")
head(call_data)


kvkapiR documentation built on June 25, 2025, 5:11 p.m.