JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 86
  • Score
    100M100P100Q77396F
  • License MIT

Simple utility to inject AI-friendly JSON-LD schema for SEO.

Package Exports

  • ai-seo

Readme

🧠 AI-SEO (NPM Package)

AI-SEO is a plug-and-play JavaScript module for injecting Schema.org structured data (FAQPage format) into your pages, optimized for AI-based search engines like ChatGPT, Bing Chat, and Gemini.

πŸ“¦ Installation

npm install ai-seo

πŸ› οΈ Usage

import { initSEO } from 'ai-seo';

initSEO({
  pageType: 'FAQPage',
  questionType: "How do I use the ai-seo npm package?",
  answerType: "Install the package with npm, import initSEO, and call it with your structured content."
});

React Example

import React, { useEffect } from 'react';
import { initSEO } from 'ai-seo';

const TestSEOPage = () => {
  useEffect(() => {
    initSEO({
      pageType: 'FAQPage',
      questionType: 'How do I use the ai-seo npm package?',
      answerType: 'Install the package with npm, import initSEO, and call it with your structured content.'
    });
  }, []);

  return (
    <main>
      <h1>Test Page for AI-SEO NPM Package</h1>
    </main>
  );
};

export default TestSEOPage;

πŸ” Comparison: AI-SEO vs Alternatives

Feature/Criteria ai-seo next-seo directus-extension-seo
AI Content Generation ❌ No ❌ No βœ… Yes (ChatGPT-powered)
Structured Data βœ… Yes (FAQPage Schema) ⚠️ Partial (via meta tags only) ❌ No (focuses on scoring/suggestions)
SEO Meta Management ❌ No βœ… Yes ⚠️ Partial (within Directus CMS only)
Platform/Framework 🌐 Any JS frontend πŸ”· Next.js only 🧱 Directus CMS only
Best Use Case AI/FAQ search optimization SEO best practices in Next.js AI-powered SEO scoring/content optimization

πŸ€” Which Should You Choose?

  • ai-seo:
    Use if you want a lightweight, framework-agnostic way to inject FAQPage schema for better AI and search engine visibility, especially for AI-driven search platforms.

  • next-seo:
    Use if you’re building with Next.js and require comprehensive, declarative SEO meta management (but without AI features).

  • directus-extension-seo:
    Use if you’re on Directus CMS and want AI-powered SEO scoring, validation, and ChatGPT-driven suggestions for content optimization.


βœ… Features

  • Compatible with any frontend project (React, Next.js, Vue, plain HTML)
  • Tiny footprint
  • Schema.org & SEO compliant
  • AI-ready content structuring

πŸ“˜ License

MIT License. Free for personal and commercial use.


πŸ™‹ Support & Contributions

Feel free to fork, contribute, or submit issues/feature requests.
Created with β™₯ to help the web evolve with AI-driven search.