Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/kyufagency/ai-content-api/archive/refs/heads/main.zipRead-only AI-ready Markdown endpoints for WordPress and WooCommerce content.
Description
AI Content API gives your site a machine-friendly layer without scraping HTML.
It creates read-only endpoints that return structured Markdown with YAML frontmatter, so AI systems can understand your catalog and content faster.
Core endpoints:
/ai-page/{slug}.md/ai-product/{slug}.md/ai-index.json/ai-sitemap.xml(with grouped child sitemaps)
Key benefits:
- Faster AI ingestion from clean Markdown
- Better discoverability via index and sitemap
- Safe by design (read-only, no order or customer data access)
- Works with WordPress pages/posts and WooCommerce products
- Built for extensibility with filters/actions
What this plugin does:
- Returns markdown with YAML frontmatter
- Supports simple, variable, and grouped WooCommerce products
- Adds an AI index endpoint for quick endpoint discovery
- Adds AI sitemap XML for crawler-based discovery
- Supports optional noindex and robots sitemap integration
- Provides transient caching and cache invalidation hooks
- Offers an admin settings screen with endpoint controls
What this plugin never does:
- Create orders
- Process payments
- Modify posts or products
- Expose private/draft/password-protected content
- Expose users, customers, or order data
Installation
- Upload the plugin to
/wp-content/plugins/or install it from the WordPress plugins screen. - Activate AI Content API.
- Go to Settings > AI Content API and review options.
- Save settings once to refresh endpoint rewrite rules.
- Test discovery endpoint:
/ai-index.json?source=ai-agent.
Frequently Asked Questions
Is this plugin safe for production stores?
Yes. It is read-only and intentionally excludes checkout, payments, users, and order/customer data operations.
Does it work without WooCommerce?
Yes. Page/post endpoints work without WooCommerce. Product endpoints activate only when WooCommerce is active and enabled in plugin settings.
Why do I get 404 on AI endpoints?
Usually rewrite rules need refresh. Go to Settings > Permalinks and click Save Changes, or use the plugin's rebuild-permalinks action.
How do AI agents discover links?
Use /ai-index.json and /ai-sitemap.xml. You can also enable robots.txt sitemap output and alternate markdown links.
Which languages are bundled?
The plugin includes gettext translation catalogs for:
- Arabic (
ar) - French (
fr_FR) - Spanish (
es_ES) - German (
de_DE) - Italian (
it_IT)
Developers can extend translations using languages/ai-content-api.pot.
Screenshots
- Settings screen with endpoint and safety controls.
- Product markdown output with YAML frontmatter.
- AI sitemap/index endpoints for discovery.
Example
Product endpoint response example
Request:
GET /ai-product/hat.md?source=ai-agent
Response content type:
text/markdown; charset=utf-8
Response snippet:
---
type: "product"
title: "Hat"
slug: "hat"
price: 12
currency: "USD"
stock_status: "instock"
---
# Hat
Technical Notes
Filters:
ai_content_api_markdownai_content_api_product_dataai_content_api_frontmatterai_content_api_is_ai_request
Actions:
ai_content_api_before_renderai_content_api_after_render
Changelog
1.0.0
- Initial public release.
- Added AI markdown endpoints for pages, posts, and WooCommerce products.
- Added AI index and sitemap discovery endpoints.
- Added caching, noindex controls, and extensibility hooks.
- Added admin permalink management tools.