> ## Documentation Index
> Fetch the complete documentation index at: https://docs.searchcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Architecture for the Submit IndexNow endpoint

## Purpose

Notifies search engines (Bing, Yandex, Naver, Seznam, Yep, Amazon) about new or updated URLs for instant indexing.

## Architecture

```mermaid theme={null}
flowchart TD
    Request["POST /api/cron/submit-indexnow"]
    
    subgraph service [IndexNow Service]
        Submit["submit_urls_to_indexnow()"]
    end
    
    subgraph engines [Search Engines]
        Bing["Bing"]
        Yandex["Yandex"]
        Naver["Naver"]
        Seznam["Seznam"]
        Yep["Yep"]
        Amazon["Amazon"]
    end
    
    Request --> Submit
    Submit --> Bing
    Submit --> Yandex
    Submit --> Naver
    Submit --> Seznam
    Submit --> Yep
    Submit --> Amazon
```

## Request Body

```json theme={null}
{
  "source_url": "https://customer-domain.com",
  "urls": [
    "https://customer-domain.com/new-page/",
    "https://customer-domain.com/updated-page/"
  ]
}
```

<Warning>
  URLs must use `source_url` (customer's real domain), NOT `ai_site_url`. This ensures search engines index the canonical URLs.
</Warning>

## Response Format

```json theme={null}
{
  "status": "success",
  "submitted": 2,
  "accepted": 2,
  "rejected": 0
}
```

## IndexNow Protocol

IndexNow is a protocol that allows websites to notify search engines about URL changes:

1. **Verification** - Requires a key file at `/search-company.txt`
2. **Submission** - POST to IndexNow API with URLs
3. **Propagation** - Search engines share with each other

## Workflow Position

This is Phase 3 of the AI articles workflow:

```
Phase 1: Generate content (parallel)
Phase 2: Deploy to Vercel (single deployment)
Phase 3: Submit to IndexNow (this endpoint)
```

## Code Location

```
src/app/apis/cron/submit_indexnow/routes.py
src/app/shared/indexnow/service.py
```
