Get post schema is a WordPress ability from Rank Math SEO — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get post schema

Read-only
Rank Math SEO SEO rank-math/get-post-schema

Read the schema markup attached to a post plus the schema types available for this install.

Requires the Rank Math SEO plugin on WordPress 6.9+ for the Abilities API. AI Visibility abilities require the 'manage_options' capability; Link Genius abilities require 'rank_math_link_builder'; Post SEO abilities require 'rank_math_onpage_general'; Schema abilities require 'rank_math_onpage_snippet'; SEO Analysis abilities require 'rank_math_site_analysis'; Analytics abilities require 'rank_math_analytics'; Content Analysis abilities require 'rank_math_onpage_analysis'. Some outputs (broken-link audit data in get-link-report, extra schema types in get-post-schema) are only populated when Rank Math PRO is active.

What it does

Given a post_id, this ability returns the raw schema markup blocks Rank Math has attached to that post along with the list of schema types currently applied. When include_available_types is true (the default), it also returns the catalog of schema types installable on this site — a fixed set on the free plugin, with additional named types added automatically when Rank Math PRO is active — plus an upgrade_message the AI assistant should show verbatim if the desired type isn't available. It's designed to be called after get-post-seo-meta so an assistant can check what schema already exists and what's possible before recommending a change. Requires the 'rank_math_onpage_snippet' capability.

See it in action

You ask your AI assistant

"Check what schema markup is on post 128 and tell me if I can add a Recipe schema type or if that needs Rank Math PRO."

Inputs

Name Type Required Description
post_id integer Yes The ID of the post to retrieve schema markup for.
include_available_types boolean No When true (default), includes the schema types available on this install. Always pass true when evaluating which schema to add.

Returns

An object with post_id, schema_types (array of strings), schemas (array of schema objects), an optional available_types object (types array plus an upgrade_message when PRO is inactive), and an error field on invalid post ID.

Permission

Requires the 'rank_math_onpage_snippet' capability.

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.