Get Form Analytics is a WordPress ability from SureForms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Form Analytics

Read-only
SureForms Forms sureforms/get-form-analytics

Retrieve raw submission timestamps for a date range, optionally scoped to one form, capped at 10,000 results.

Requires the SureForms plugin on WordPress 6.9+ (the Abilities API is gated behind function_exists('wp_register_ability'), so it degrades gracefully on WP 6.4-6.8). Abilities only register when the 'srfm_abilities_api' option is enabled in SureForms' AI settings, and every ability requires the current user to have the 'manage_options' capability. Abilities that create or modify data additionally require the 'srfm_abilities_api_edit' option to not be explicitly disabled; abilities that permanently delete data additionally require 'srfm_abilities_api_delete' to not be explicitly disabled.

What it does

This ability queries the entries table for all submissions between date_from and date_to (both required, Y-m-d format, validated before the query runs), optionally filtered to a single form_id, and returns up to 10,000 submission records ordered by created_at descending. If more than 10,000 rows match, the results are truncated and the response's truncated flag is set to true so the caller knows the count is incomplete. This gives an AI assistant the raw time-series data it needs to compute submission trends, busiest days, or period-over-period comparisons.

See it in action

You ask your AI assistant

"Pull all SureForms submissions from the last 30 days so I can see which days had the most activity."

Inputs

Name Type Required Description
date_from string Yes Start date for the analytics range (Y-m-d format).
date_to string Yes End date for the analytics range (Y-m-d format).
form_id integer No Optional form ID to filter analytics by.

Returns

An object with a submissions array (each item has created_at), total_count, a truncated boolean (true if results exceeded the 10,000-row cap), form_id (or null), date_from, and date_to.

Permission

Requires the 'manage_options' capability, and the 'srfm_abilities_api' master option must be enabled. This ability has no additional gate option.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.