### Install and Run Local Development Source: https://github.com/sh20raj/index-fast/blob/main/README.md Install project dependencies and start the local development server. Open http://localhost:3000 to view the application. ```bash pnpm install pnpm dev ``` -------------------------------- ### Claude Desktop Configuration Source: https://github.com/sh20raj/index-fast/blob/main/docs/mcp.md Example JSON configuration snippet for setting up IndexFast MCP server in Claude Desktop. ```JSON { "mcpServers": { "indexfast": { "command": "curl", "args": [ "-X", "POST", "-H", "Authorization: Bearer YOUR_API_KEY", "-H", "Content-Type: application/json", "-d", "{\"method\": \"list_tools\", \"jsonrpc\": \"2.0\", \"id\": 1}", "https://www.indexfast.co/api/mcp" ] } } } ``` -------------------------------- ### IndexNow Protocol Submission Example Source: https://github.com/sh20raj/index-fast/blob/main/docs/dashboard.md Submits URLs to the IndexNow API using a POST request. Ensure your key is correctly placed and accessible. ```http POST https://www.bing.com/indexnow Host: www.example.com Content-Type: application/json { "key": "634a2c77198a45429967eb9dc1252278", "urlList": [ "https://www.example.com/url1", "https://www.example.com/url2" ], "host": "https://www.example.com" } ``` -------------------------------- ### MCP Endpoint - Get Usage Source: https://context7.com/sh20raj/index-fast/llms.txt Retrieve current plan details, website count, and monthly submission usage. Useful for monitoring quota consumption programmatically. ```bash # Get usage statistics via MCP curl -X POST https://www.indexfast.co/api/mcp \ -H "Authorization: Bearer idx_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 4, "method": "call_tool", "params": { "name": "get_usage", "arguments": {} } }' ``` -------------------------------- ### MCP Endpoint - Get Usage Source: https://context7.com/sh20raj/index-fast/llms.txt Retrieve current plan details, website count, and monthly submission usage. Useful for monitoring quota consumption programmatically. ```APIDOC ## MCP Endpoint - Get Usage ### Description Retrieve current plan details, website count, and monthly submission usage. Useful for monitoring quota consumption programmatically. ### Method POST ### Endpoint https://www.indexfast.co/api/mcp ### Parameters #### Request Body - **jsonrpc** (string) - Required - JSON-RPC version, should be "2.0". - **id** (integer) - Required - Request ID. - **method** (string) - Required - The method to call, should be "call_tool". - **params** (object) - Required - Parameters for the tool call. - **name** (string) - Required - The name of the tool, should be "get_usage". - **arguments** (object) - Optional - Arguments for the tool, empty for get_usage. ### Request Example ```json { "jsonrpc": "2.0", "id": 4, "method": "call_tool", "params": { "name": "get_usage", "arguments": {} } } ``` ### Response #### Success Response (200) - **jsonrpc** (string) - JSON-RPC version. - **id** (integer) - Request ID. - **result** (object) - **content** (array) - **type** (string) - Type of content, usually "text". - **text** (string) - JSON string containing usage details. - **plan** (string) - The current plan name. - **websitesUsed** (integer) - Number of websites currently used. - **websitesLimit** (integer) - Maximum number of websites allowed. - **submissionsUsedThisMonth** (integer) - Number of submissions used this month. - **submissionsLimitMonthly** (integer) - Maximum number of monthly submissions allowed. #### Response Example ```json { "jsonrpc": "2.0", "id": 4, "result": { "content": [ { "type": "text", "text": "{\"plan\":\"Pro\",\"websitesUsed\":3,\"websitesLimit\":100,\"submissionsUsedThisMonth\":156,\"submissionsLimitMonthly\":10000}" } ] } } ``` ``` -------------------------------- ### Standard Metadata Object in Next.js Source: https://github.com/sh20raj/index-fast/blob/main/docs/rules.md Example of exporting metadata for a static page using Next.js's Metadata API. Ensure 'metadataBase' and 'alternates.canonical' are correctly configured for SEO. ```typescript export const metadata = { title: 'IndexFast | Automated SEO Indexing', description: 'Submit your URLs to Google, Bing, and IndexNow instantly.', metadataBase: new URL('https://www.indexfast.co'), alternates: { canonical: '/', }, openGraph: { type: 'website', }, }; ``` -------------------------------- ### Configure Payment Environment Variables Source: https://github.com/sh20raj/index-fast/blob/main/README.md Set up required environment variables for Dodo Payments, including environment mode, return URL, API keys, webhook secrets, and product IDs. Use test or live mode as needed. ```bash # Common DODO_PAYMENTS_ENVIRONMENT=test_mode # or live_mode DODO_PAYMENTS_RETURN_URL=/dashboard # API keys (either set DODO_PAYMENTS_API_KEY directly, or use env-specific keys) DODO_PAYMENTS_API_KEY_TEST=... DODO_PAYMENTS_API_KEY_LIVE=... # Webhook secrets (either set DODO_WEBHOOK_SECRET directly, or use env-specific keys) DODO_WEBHOOK_SECRET_TEST=... DODO_WEBHOOK_SECRET_LIVE=... # Product IDs used for checkout session creation DODO_PRODUCT_ID_PRO=... DODO_PRODUCT_ID_AGENCY=... ``` -------------------------------- ### Websites API - List Websites Source: https://context7.com/sh20raj/index-fast/llms.txt List all websites connected to your IndexFast account. Requires session authentication. ```bash # List all websites (requires session authentication) curl -X GET https://www.indexfast.co/api/websites \ -H "Cookie: your_session_cookie" ``` -------------------------------- ### Websites API - List and Create Source: https://context7.com/sh20raj/index-fast/llms.txt Manage websites connected to your IndexFast account. Each website can have its own sitemap URL, IndexNow key, Bing API key, and tokens for Yandex, Baidu, and Naver. ```APIDOC ## Websites API - List and Create ### Description Manage websites connected to your IndexFast account. Each website can have its own sitemap URL, IndexNow key, Bing API key, and tokens for Yandex, Baidu, and Naver. ### List Websites #### Method GET #### Endpoint https://www.indexfast.co/api/websites ### Parameters #### Headers - **Cookie** (string) - Required - Your session cookie for authentication. ### Response #### Success Response (200) - **id** (string) - Unique identifier for the website. - **url** (string) - The URL of the website. - **sitemapUrl** (string) - The URL of the website's sitemap. - **indexNowKey** (string) - The IndexNow API key for the website. - **bingApiKey** (string) - The Bing API key for the website. - **lastSyncAt** (string) - Timestamp of the last synchronization. #### Response Example ```json [ { "id": "uuid-1234", "url": "https://myblog.com", "sitemapUrl": "https://myblog.com/sitemap.xml", "indexNowKey": "abc123", "bingApiKey": "bing_key_here", "lastSyncAt": "2024-01-15T10:30:00Z" } ] ``` ### Add a New Website #### Method POST #### Endpoint https://www.indexfast.co/api/websites ### Parameters #### Headers - **Cookie** (string) - Required - Your session cookie for authentication. - **Content-Type** (string) - Required - Must be `application/json`. #### Request Body - **url** (string) - Required - The URL of the website to add. - **sitemapUrl** (string) - Optional - The URL of the website's sitemap. - **indexNowKey** (string) - Optional - The IndexNow API key for the website. - **bingApiKey** (string) - Optional - The Bing API key for the website. ### Request Example ```json { "url": "https://newsite.com", "sitemapUrl": "https://newsite.com/sitemap.xml", "indexNowKey": "my_indexnow_key", "bingApiKey": "my_bing_api_key" } ``` ``` -------------------------------- ### IndexNow Key Validator API Source: https://context7.com/sh20raj/index-fast/llms.txt Validate that an IndexNow key file is correctly placed and accessible on your domain. Essential for verifying IndexNow setup before submitting URLs. ```APIDOC ## IndexNow Key Validator API ### Description Validate that an IndexNow key file is correctly placed and accessible on your domain. Essential for verifying IndexNow setup before submitting URLs. ### Method POST ### Endpoint https://www.indexfast.co/api/tools/validate-indexnow-key ### Parameters #### Request Body - **url** (string) - Required - The base URL of your website (e.g., https://example.com). - **indexNowKey** (string) - Required - Your IndexNow API key. ### Request Example ```json { "url": "https://example.com", "indexNowKey": "your_indexnow_api_key" } ``` ### Response #### Success Response (200) - **url** (string) - The URL that was validated. - **indexNowKey** (string) - The provided IndexNow key. - **isValid** (boolean) - True if the key file is correctly placed and accessible, false otherwise. - **message** (string) - A message indicating the validation status or any errors found. #### Response Example ```json { "url": "https://example.com", "indexNowKey": "your_indexnow_api_key", "isValid": true, "message": "IndexNow key file is accessible." } ``` ``` -------------------------------- ### POST /api/billing/checkout Source: https://context7.com/sh20raj/index-fast/llms.txt Creates a checkout session for upgrading to Pro or Agency plans using Dodo Payments. ```APIDOC ## POST /api/billing/checkout ### Description Create a checkout session for upgrading to Pro or Agency plans. Uses Dodo Payments for processing subscriptions. ### Method POST ### Endpoint https://www.indexfast.co/api/billing/checkout ### Parameters #### Request Body - **plan** (string) - Required - The subscription plan to checkout ('pro' or 'agency'). ### Request Example ```json { "plan": "pro" } ``` ### Response #### Success Response (200) - **checkoutUrl** (string) - The URL to redirect the user to for completing the payment. #### Response Example ```json { "checkoutUrl": "https://checkout.dodopayments.com/session_abc123" } ``` ### Notes Redirect user to `checkoutUrl` to complete payment. ``` -------------------------------- ### Implement IndexNow POST Protocol Source: https://github.com/sh20raj/index-fast/blob/main/docs/data.md Implements the IndexNow POST protocol for submitting URLs to search engines like Bing and Yandex. Requires the API key and the URL to be submitted. ```typescript export async function submitToindexNow(url: string, apiKey: string): Promise { const endpoint = 'https://api.indexnow.org/submit-url'; try { const response = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ key: apiKey, // Your IndexNow API key url: url, // The URL to submit action: "update" }), }); if (!response.ok) { const errorText = await response.text(); throw new Error(`IndexNow API Error: ${response.status} - ${errorText}`); } const data = await response.json(); return data; } catch (error) { console.error('Error submitting URL to IndexNow:', error); throw error; } } ``` -------------------------------- ### IndexFast Project Folder Structure Source: https://github.com/sh20raj/index-fast/blob/main/docs/dashboard.md Organizes the codebase using a feature-based module structure within the 'src/' directory for maintainability. ```bash src/ ├── app/ │ ├── (dashboard)/ # Protected dashboard routes │ │ ├── dashboard/ # Main overview & AI Insights │ │ ├── sites/ # Site management & Key verification │ │ ├── submissions/ # Indexing history & Ping logs │ │ └── settings/ # User & API settings │ ├── api/ # Backend API endpoints & Webhooks │ └── (landing)/ # Marketing pages ├── components/ │ ├── dashboard/ # Dashboard-specific UI components │ ├── ui/ # Shared primitive components (MUI/Tailwind) │ └── shared/ # Reusable layout elements ├── lib/ │ ├── api/ # API wrappers (GSC, Bing, IndexNow, Pings) │ ├── db/ # Drizzle schema & Postgres clients │ ├── services/ # Core business logic (Sitemap diffing, AI parsing) │ └── utils/ # Helper functions ├── hooks/ # Custom React hooks └── types/ # Shared TypeScript definitions ``` -------------------------------- ### Optional/Verification Environment Variables for IndexFast Source: https://github.com/sh20raj/index-fast/blob/main/INDEXFAST.md These optional environment variables are used for site verification across different search engines and for configuring test/live modes for Dodo Payments, as well as for Pingler API key. ```bash NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION= NEXT_PUBLIC_BING_SITE_VERIFICATION= NEXT_PUBLIC_YANDEX_SITE_VERIFICATION= DODO_WEBHOOK_SECRET_TEST= DODO_WEBHOOK_SECRET_LIVE= DODO_PAYMENTS_API_KEY_TEST= DODO_PAYMENTS_API_KEY_LIVE= PINGLER_API_KEY= ``` -------------------------------- ### Configure Claude Desktop for IndexFast MCP Source: https://github.com/sh20raj/index-fast/blob/main/docs/mcp.md Add this JSON configuration to your Claude Desktop settings to enable interaction with IndexFast's MCP endpoint. Replace YOUR_API_KEY with your personal API key. ```json { "mcpServers": { "indexfast": { "command": "curl", "args": [ "-X", "POST", "-H", "Authorization: Bearer YOUR_API_KEY", "-H", "Content-Type: application/json", "-d", "{\"method\":\"list_tools\",\"jsonrpc\":\"2.0\",\"id\":1}", "https://www.indexfast.co/api/mcp" ] } } } ``` -------------------------------- ### List MCP Tools Source: https://context7.com/sh20raj/index-fast/llms.txt Use `list_tools` to discover all available tools including website management, URL submission, SEO auditing, and usage monitoring. The MCP endpoint supports JSON-RPC 2.0 protocol for AI agent integrations. ```bash # List all available MCP tools curl -X POST https://www.indexfast.co/api/mcp \ -H "Authorization: Bearer idx_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "list_tools" }' ``` ```json # Response includes available tools: # { # "jsonrpc": "2.0", # "id": 1, # "result": { # "tools": [ # { "name": "list_websites", "description": "List all websites connected to your IndexFast account." }, # { "name": "get_usage", "description": "Get your current indexing usage, limits, and plan details." }, # { "name": "submit_url", "description": "Submit a URL for indexing across all connected engines." }, # { "name": "seo_audit", "description": "Run a comprehensive SEO audit on a specific URL." }, # { "name": "list_recent_submissions", "description": "List the most recent indexing submissions." }, # { "name": "get_site_details", "description": "Get detailed configuration for a specific site." } # ] # } # } ``` -------------------------------- ### Websites API - Add New Website Source: https://context7.com/sh20raj/index-fast/llms.txt Add a new website to your IndexFast account. Requires session authentication and specifies website details like URL, sitemap URL, and API keys. ```bash # Add a new website curl -X POST https://www.indexfast.co/api/websites \ -H "Cookie: your_session_cookie" \ -H "Content-Type: application/json" \ -d '{ "url": "https://newsite.com", "sitemapUrl": "https://newsite.com/sitemap.xml", "indexNowKey": "my_indexnow_key", "bingApiKey": "my_bing_api_key" }' ``` -------------------------------- ### Create Billing Checkout Session with cURL Source: https://context7.com/sh20raj/index-fast/llms.txt Initiates a checkout session for plan upgrades using the Billing Checkout API. Requires authentication and specifies the desired plan. ```bash curl -X POST https://www.indexfast.co/api/billing/checkout \ -H "Cookie: your_session_cookie" \ -H "Content-Type: application/json" \ -d '{ "plan": "pro" }' ``` -------------------------------- ### Website Sync API - Trigger Sync Source: https://context7.com/sh20raj/index-fast/llms.txt Trigger a manual sync for a specific website. This parses the sitemap, detects new URLs, and submits them to search engines. Requires session authentication. ```bash # Trigger website sync curl -X POST https://www.indexfast.co/api/websites/{website_id}/sync \ -H "Cookie: your_session_cookie" ``` -------------------------------- ### Orchestrate Website Indexing Workflow Source: https://context7.com/sh20raj/index-fast/llms.txt The core service that orchestrates the full indexing workflow: fetch sitemap, diff with existing inventory, store new URLs, and submit to all configured engines. Can process a full website or trigger submissions manually. ```typescript import { processWebsiteIndexing, triggerSubmissions } from "@/lib/services/indexing-service"; // Process full indexing for a website (parse sitemap + submit new URLs) const result = await processWebsiteIndexing("website-uuid-here"); // Result: // { // message: "Indexing process completed", // newUrlsCount: 12, // results: [ // { websiteId: "uuid", url: "...", engine: "indexnow", status: "success" }, // { websiteId: "uuid", url: "Batch 1", engine: "bing", status: "success" } // ] // } // Or trigger submissions for specific URLs manually const website = { id: "uuid", url: "https://site.com", indexNowKey: "key", bingApiKey: "key" }; const submissions = await triggerSubmissions( website, // Website object from database ["https://site.com/page1", "https://site.com/page2"], // URLs to submit true // isPro (enables universal pings) ); ``` -------------------------------- ### MCP Endpoint - List Tools Source: https://context7.com/sh20raj/index-fast/llms.txt Discover all available tools for AI agent integrations using the JSON-RPC 2.0 protocol. This includes website management, URL submission, SEO auditing, and usage monitoring. ```APIDOC ## POST /api/mcp (List Tools) ### Description List all available tools for AI agent integrations via the MCP endpoint. ### Method POST ### Endpoint /api/mcp ### Parameters #### Request Body - **jsonrpc** (string) - Required - Specifies the JSON-RPC version, should be "2.0". - **id** (integer) - Required - An identifier for the request. - **method** (string) - Required - The method to call, should be "list_tools". ### Request Example ```json { "jsonrpc": "2.0", "id": 1, "method": "list_tools" } ``` ### Response #### Success Response (200) - **jsonrpc** (string) - The JSON-RPC version. - **id** (integer) - The identifier for the request. - **result** (object) - Contains the list of available tools. - **tools** (array) - An array of tool objects. - **name** (string) - The name of the tool. - **description** (string) - A brief description of what the tool does. ### Response Example ```json { "jsonrpc": "2.0", "id": 1, "result": { "tools": [ { "name": "list_websites", "description": "List all websites connected to your IndexFast account." }, { "name": "get_usage", "description": "Get your current indexing usage, limits, and plan details." }, { "name": "submit_url", "description": "Submit a URL for indexing across all connected engines." }, { "name": "seo_audit", "description": "Run a comprehensive SEO audit on a specific URL." }, { "name": "list_recent_submissions", "description": "List the most recent indexing submissions." }, { "name": "get_site_details", "description": "Get detailed configuration for a specific site." } ] } } ``` ``` -------------------------------- ### Standard Folder Structure for IndexFast Source: https://github.com/sh20raj/index-fast/blob/main/docs/rules.md Defines the standardized directory layout for the Next.js project, organizing code by feature and type. ```text src/ ├── app/ # Next.js App Router (Routing, Layouts, Metadata) │ ├── (auth)/ # Logic for login/registration │ ├── (dashboard)/ # Protected routes for the management platform │ │ └── sites/ # Site management pages │ │ ├── _components/ # Components SPECIFIC to this route │ │ └── page.tsx │ ├── api/ # Public/Private API Route Handlers │ ├── layout.tsx # Root layout with MUI Cache/Theme Providers │ └── globals.css # Global styles (keep minimal) ├── components/ # Shared UI components (Atomic design) │ ├── ui/ # Basic primitives (Buttons, Inputs) │ ├── layout/ # Shared layouts (Navbars, Footers) │ └── indicators/ # SEO/Index status indicators ├── db/ # Database Layer (Drizzle ORM) │ ├── schema/ # SQL table definitions │ └── index.ts # Postgres connection instance ├── lib/ # External API wrappers (Google, Bing, IndexNow) ├── hooks/ # Custom React hooks ├── types/ # TypeScript interfaces/types └── utils/ # Pure helper functions ``` -------------------------------- ### Define Database Schema for IndexFast MVP Source: https://github.com/sh20raj/index-fast/blob/main/docs/data.md Defines the necessary tables for storing user data, website information, API keys, and submission history. Focuses on optimal storage for fast URL lookups. ```sql CREATE TABLE Users ( user_id SERIAL PRIMARY KEY, google_id TEXT UNIQUE NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE Websites ( website_id SERIAL PRIMARY KEY, user_id INTEGER REFERENCES Users(user_id), url TEXT UNIQUE NOT NULL, gsc_last_sync TIMESTAMP WITH TIME ZONE, sitemap_url TEXT, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE ApiKeys ( api_key_id SERIAL PRIMARY KEY, user_id INTEGER REFERENCES Users(user_id), service TEXT NOT NULL, -- e.g., 'bing', 'google' api_key TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, UNIQUE (user_id, service) ); CREATE TABLE SubmissionHistory ( submission_id SERIAL PRIMARY KEY, website_id INTEGER REFERENCES Websites(website_id), url TEXT NOT NULL, service TEXT NOT NULL, -- e.g., 'indexnow', 'bing' status TEXT, -- e.g., 'submitted', 'indexed', 'error' last_pushed_at TIMESTAMP WITH TIME ZONE, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP ); -- Indexes for performance CREATE INDEX idx_websites_user_id ON Websites(user_id); CREATE INDEX idx_apikeys_user_id ON ApiKeys(user_id); CREATE INDEX idx_submissionhistory_website_id ON SubmissionHistory(website_id); CREATE INDEX idx_submissionhistory_url ON SubmissionHistory(url); CREATE INDEX idx_submissionhistory_service ON SubmissionHistory(service); ``` -------------------------------- ### Run SEO Audit via MCP Tool Source: https://context7.com/sh20raj/index-fast/llms.txt Run a comprehensive SEO audit on any URL to identify issues with title tags, meta descriptions, H1 headers, image alt text, and canonical URLs. Returns a score out of 100 with AI-generated fix prompts for each issue. ```bash # Run SEO audit via MCP curl -X POST https://www.indexfast.co/api/mcp \ -H "Authorization: Bearer idx_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "call_tool", "params": { "name": "seo_audit", "arguments": { "url": "https://example.com/page-to-audit" } } }' ``` -------------------------------- ### Submit URL via API v1 Source: https://context7.com/sh20raj/index-fast/llms.txt Programmatically submit a URL to all connected search engines using your API key. The endpoint authenticates the user and triggers submissions to IndexNow, Bing, Yandex, Baidu, Naver, and universal ping services. ```bash # Submit a URL for indexing curl -X POST https://www.indexfast.co/api/v1/submit \ -H "Authorization: Bearer idx_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/new-blog-post" }' ``` ```json # Response on success: # { # "success": true, # "results": [ # { "engine": "indexnow", "status": "success", "error": null }, # { "engine": "bing", "status": "success", "error": null }, # { "engine": "pingomatic", "status": "success", "error": null } # ] # } ``` ```json # Response on error (website not registered): # { # "error": "Website not found in your dashboard. Please add the site to IndexFast before using the API.", # "hint": "No website found matching hostname: example.com" # } ``` -------------------------------- ### Submit URLs to Bing API (Batch) Source: https://github.com/sh20raj/index-fast/blob/main/docs/data.md Provides a clean wrapper for the `SubmitUrlbatch` Bing API endpoint. This function takes a list of URLs and an API key to submit them in a batch request. ```typescript export async function submitUrlsToBingBatch(urls: string[], apiKey: string): Promise { const endpoint = `https://ssl.bing.com/webmaster/api.svc/json/SubmitUrlbatch?apikey=${apiKey}`; try { const response = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ siteUrl: "YOUR_WEBSITE_URL", // This should ideally be dynamic or passed in urlList: urls.map(url => ({ url })) }), }); if (!response.ok) { const errorText = await response.text(); throw new Error(`Bing API Error: ${response.status} - ${errorText}`); } const data = await response.json(); return data; } catch (error) { console.error('Error submitting URLs to Bing Batch API:', error); throw error; } } ``` -------------------------------- ### Data Loading Pattern in Next.js Server Components Source: https://github.com/sh20raj/index-fast/blob/main/INDEXFAST.md This pattern demonstrates how to load data within Next.js Server Components using inline async data loaders. It shows fetching user data and performing database queries before rendering the view. ```tsx export default function SitesPage() { return ; } async function SitesDataLoader() { const user = await stackServerApp.getUser(); // ... db queries return ; } ``` -------------------------------- ### Submit URLs to IndexNow Library Source: https://context7.com/sh20raj/index-fast/llms.txt Submits a list of URLs to the IndexNow protocol using the provided library function. Requires host, key, and optionally key location. ```typescript import { submitToIndexNow } from "@/lib/api/indexnow"; // Submit multiple URLs to IndexNow const result = await submitToIndexNow( "example.com", // host "your_indexnow_key", // key [ "https://example.com/new-page-1", "https://example.com/new-page-2" ], "https://example.com/your_key.txt" // keyLocation (optional) ); // Result on success: // { success: true, status: 200, count: 2 } // Result on failure: // { success: false, status: 422, error: "Invalid key" } ``` -------------------------------- ### Cold Email Template for IndexFast Source: https://github.com/sh20raj/index-fast/blob/main/docs/outreach-list.md A template for a cold outreach email to potential clients, highlighting the features and benefits of IndexFast for URL indexing automation. It suggests a brief demo or free trial. ```plaintext Subject: Quick question about [Agency Name]'s indexing workflow Hi [Name], I noticed [Agency Name] manages SEO for multiple clients — I'm curious how you currently handle URL indexing across all those sites? We built IndexFast (indexfast.co) to automate exactly that: • Bulk URL submission via IndexNow • Multi-site dashboard with real-time indexation status • Sitemap change monitoring (auto-detect new/updated pages) Would you be open to a 5-min demo? Happy to set up a free trial for your team. Best, [Your Name] ``` -------------------------------- ### Submit URL via MCP Tool Source: https://context7.com/sh20raj/index-fast/llms.txt Submit a URL for indexing through the MCP interface. The tool validates the URL belongs to a registered website and triggers submissions to all configured search engines. ```bash # Submit a URL via MCP curl -X POST https://www.indexfast.co/api/mcp \ -H "Authorization: Bearer idx_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "call_tool", "params": { "name": "submit_url", "arguments": { "url": "https://myblog.com/latest-article" } } }' ``` ```json # Response: # { # "jsonrpc": "2.0", # "id": 2, # "result": { # "content": [{ # "type": "text", # "text": "[{\"engine\":\"indexnow\",\"status\":\"success\",\"error\":null},{\"engine\":\"bing\",\"status\":\"success\",\"error\":null}]" # }] # } # } ``` -------------------------------- ### Required Environment Variables for IndexFast Source: https://github.com/sh20raj/index-fast/blob/main/INDEXFAST.md These environment variables are essential for the IndexFast application to function correctly, including database connection, site URL, cron job authentication, AI API keys, and payment gateway integration. ```bash DATABASE_URL= NEXT_PUBLIC_SITE_URL= CRON_SECRET= NVIDIA_API_KEY= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= GOOGLE_REDIRECT_URI= DODO_PAYMENTS_API_KEY= DODO_PAYMENTS_ENVIRONMENT= DODO_PRODUCT_ID_PRO= DODO_PRODUCT_ID_AGENCY= DODO_PAYMENTS_RETURN_URL= ``` -------------------------------- ### API v1 Submit URL Source: https://context7.com/sh20raj/index-fast/llms.txt Programmatically submit a URL to all connected search engines using your API key. The endpoint authenticates the user, matches the URL's hostname to a registered website, and triggers submissions to IndexNow, Bing, Yandex, Baidu, Naver, and universal ping services based on configured API keys. ```APIDOC ## POST /api/v1/submit ### Description Submit a URL for indexing across multiple search engines. ### Method POST ### Endpoint /api/v1/submit ### Parameters #### Request Body - **url** (string) - Required - The URL to submit for indexing. ### Request Example ```json { "url": "https://example.com/new-blog-post" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the submission was successful. - **results** (array) - An array of objects, each detailing the status for a specific engine. - **engine** (string) - The name of the search engine or service. - **status** (string) - The status of the submission (e.g., "success", "failed"). - **error** (string|null) - An error message if the submission failed, otherwise null. #### Error Response (e.g., Website not found) - **error** (string) - A message indicating the error. - **hint** (string) - Additional information about the error, such as the unmatched hostname. ### Response Example (Success) ```json { "success": true, "results": [ { "engine": "indexnow", "status": "success", "error": null }, { "engine": "bing", "status": "success", "error": null }, { "engine": "pingomatic", "status": "success", "error": null } ] } ``` ### Response Example (Error - Website not registered) ```json { "error": "Website not found in your dashboard. Please add the site to IndexFast before using the API.", "hint": "No website found matching hostname: example.com" } ``` ``` -------------------------------- ### Website Sync API Source: https://context7.com/sh20raj/index-fast/llms.txt Trigger a manual sync for a specific website. This parses the sitemap, detects new URLs, and submits them to all configured search engines. ```APIDOC ## Website Sync API ### Description Trigger a manual sync for a specific website. This parses the sitemap, detects new URLs, and submits them to all configured search engines. ### Method POST ### Endpoint https://www.indexfast.co/api/websites/{website_id}/sync ### Parameters #### Path Parameters - **website_id** (string) - Required - The ID of the website to sync. #### Headers - **Cookie** (string) - Required - Your session cookie for authentication. ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **newUrlsCount** (integer) - The number of new URLs detected and submitted. - **results** (array) - **websiteId** (string) - The ID of the website. - **url** (string) - The URL that was processed. - **engine** (string) - The search engine the URL was submitted to. - **status** (string) - The status of the submission (e.g., "success"). #### Response Example (Success) ```json { "message": "Indexing process completed", "newUrlsCount": 5, "results": [ { "websiteId": "uuid-1234", "url": "https://site.com/new-page", "engine": "indexnow", "status": "success" }, { "websiteId": "uuid-1234", "url": "Batch 1", "engine": "bing", "status": "success" } ] } ``` #### Response Example (No New URLs) ```json { "message": "No new URLs detected", "count": 0 } ``` ``` -------------------------------- ### Internal Server Actions Source: https://github.com/sh20raj/index-fast/blob/main/INDEXFAST.md Server actions for managing websites, sitemaps, GSC sites, and billing operations. ```APIDOC ## Internal Server Actions Located in `src/app/(dashboard)/actions.ts`: - Add/edit/delete websites - Sync sitemaps - Import GSC sites - Billing operations ``` -------------------------------- ### Bing Batch Submission Library Source: https://context7.com/sh20raj/index-fast/llms.txt Client-side library for submitting URLs in batches to the Bing Webmaster API. ```APIDOC ## Bing Batch Submission Library ### Description Submit up to 500 URLs per batch to Bing Webmaster API. Automatically handles batching for larger URL lists. ### Method `submitToBingBatch(siteUrl: string, urlList: string[], apiKey: string): Promise ### Parameters - **siteUrl** (string) - Required - The base URL of the website. - **urlList** (array of strings) - Required - A list of URLs to submit. Can contain more than 500 URLs. - **apiKey** (string) - Required - Your Bing Webmaster API key. ### Request Example ```typescript import { submitToBingBatch } from "@/lib/api/bing"; // Submit URLs to Bing (batches automatically at 500 per request) const results = await submitToBingBatch( "https://example.com", // siteUrl [ "https://example.com/page1", "https://example.com/page2", // ... up to thousands of URLs ], "your_bing_api_key" // apiKey ); ``` ### Response #### Success Response - **success** (boolean) - Indicates if the batch submission was successful. - **status** (integer) - The HTTP status code. - **count** (integer) - The number of URLs submitted in this batch. #### Response Example (per batch) ```json [ { success: true, status: 200, count: 500 }, { success: true, status: 200, count: 150 } ] ``` ``` -------------------------------- ### Validate IndexNow Key with cURL Source: https://context7.com/sh20raj/index-fast/llms.txt Use this cURL command to validate your IndexNow API key. Ensure the key and URL match the expected format for a successful validation. ```bash curl -X POST https://www.indexfast.co/api/tools/validate-indexnow-key \ -H "Content-Type: application/json" \ -d '{ "key": "abc123def456", "url": "https://mysite.com/abc123def456.txt" }' ``` -------------------------------- ### MCP Endpoint - Submit URL Tool Source: https://context7.com/sh20raj/index-fast/llms.txt Submit a URL for indexing through the MCP interface. This tool validates the URL against registered websites and initiates submissions to configured search engines. ```APIDOC ## POST /api/mcp (Submit URL Tool) ### Description Submit a URL for indexing using the "submit_url" tool via the MCP endpoint. ### Method POST ### Endpoint /api/mcp ### Parameters #### Request Body - **jsonrpc** (string) - Required - Specifies the JSON-RPC version, should be "2.0". - **id** (integer) - Required - An identifier for the request. - **method** (string) - Required - The method to call, should be "call_tool". - **params** (object) - Required - Parameters for the tool call. - **name** (string) - Required - The name of the tool to call, should be "submit_url". - **arguments** (object) - Required - Arguments for the "submit_url" tool. - **url** (string) - Required - The URL to submit for indexing. ### Request Example ```json { "jsonrpc": "2.0", "id": 2, "method": "call_tool", "params": { "name": "submit_url", "arguments": { "url": "https://myblog.com/latest-article" } } } ``` ### Response #### Success Response (200) - **jsonrpc** (string) - The JSON-RPC version. - **id** (integer) - The identifier for the request. - **result** (object) - Contains the result of the tool call. - **content** (array) - An array containing the submission results. - **type** (string) - The type of content, typically "text". - **text** (string) - A JSON string representing the submission status for each engine. ### Response Example ```json { "jsonrpc": "2.0", "id": 2, "result": { "content": [ { "type": "text", "text": "[{\"engine\":\"indexnow\",\"status\":\"success\",\"error\":null},{\"engine\":\"bing\",\"status\":\"success\",\"error\":null}]" } ] } } ``` ``` -------------------------------- ### Define Websites Table with Drizzle ORM Source: https://context7.com/sh20raj/index-fast/llms.txt Defines the 'websites' table schema for managing website configurations, including URL, sitemap URL, and API keys for various search engines. Use this to store and manage website-specific indexing settings. ```typescript // Websites with multi-engine configuration const websites = pgTable("websites", { id: uuid("id").defaultRandom().primaryKey(), userId: text("user_id").references(() => users.id), url: text("url").notNull(), sitemapUrl: text("sitemap_url"), indexNowKey: text("indexnow_key"), bingApiKey: text("bing_api_key"), yandexToken: text("yandex_token"), baiduToken: text("baidu_token"), naverToken: text("naver_token"), lastSyncAt: timestamp("last_sync_at"), }); ```