AI-SEO.js is a lightweight, plug-and-play JavaScript utility that injects structured schema markup (JSON-LD) into any webpage. It's designed to make your content readable and indexable by AI-powered search engines (LLMs), like ChatGPT, Bing Chat, Google Gemini, and more — with just two lines of code.
- ✅ Zero dependencies
- ✅ CDN-compatible (GitHub Pages or Vercel)
- ✅ Schema.org-compliant (for FAQ pages)
- ✅ Works with any JavaScript framework (React, Next.js, Vue, plain HTML)
- ✅ Minimal integration (just 2 script tags)
- ✅ Optimized for AI and SEO bots
Use directly via GitHub Pages:
<script src="https://github.com/Veeeetzzzz/easy-ai-seo/ai-seo.js"></script>Download ai-seo.js and include it in your project:
<script src="/path/to/ai-seo.js"></script>After including the script, initialize it like this:
<script>
AISEO.init({
pageType: 'FAQPage',
questionType: "How to optimize for AI search?",
answerType: "Use structured data, clear headings, and conversational answers."
});
</script>That's it. One line to inject structured JSON-LD markup into your site.
- ✅ Static HTML
- ✅ React / Next.js
- ✅ WordPress (paste into HTML block or template)
- ✅ Shopify / Webflow
- ✅ Any framework that supports JS
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How to optimize for AI search?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Use structured data, clear headings, and conversational answers."
}
}
]
}Use the following tools to confirm your schema is valid and indexable:
- Google Rich Results Test
- Schema.org Validator
- Google Search Console (submit your URL for indexing)
Want to check if AI models can read and understand your page?
Try this prompt in ChatGPT, Gemini, or Bing Chat:
“Can you summarize the content from [https://yourwebsite.com]? What question does it answer?”
- Host the JS file on a trusted domain (GitHub Pages or your own).
- Use HTTPS to avoid mixed content issues.
- Validate frequently when updating Q&A content.
- Keep your schema up-to-date with SEO best practices.
import { useEffect } from 'react';
const SEOPage = () => {
useEffect(() => {
const script = document.createElement('script');
script.src = "https://github.com/Veeeetzzzz/easy-ai-seo/ai-seo.js";
script.onload = () => {
AISEO.init({
pageType: 'FAQPage',
questionType: "What is AI SEO?",
answerType: "It’s the practice of optimizing content for LLM-powered AI tools and search engines."
});
};
document.head.appendChild(script);
}, []);
return <h1>My Optimized Page</h1>;
};
export default SEOPage;MIT License. Free for personal and commercial use.
Feel free to fork, contribute, or submit issues/feature requests.
Created with ♥ to help the web evolve with AI-driven search.