{
  "openapi": "3.0.3",
  "info": {
    "title": "devendrasaini.com Blog API",
    "version": "1.0.0",
    "description": "Read-only API exposing Devendra Saini's blog content (SEO, GEO, AEO, technical SEO) and the Search Bytes timeline (confirmed Google updates + AI-search moves). Intended for AI agents and tools. A real MCP server is available at /api/mcp (JSON-RPC); connect docs at /mcp.",
    "contact": {
      "name": "Devendra Saini",
      "url": "https://devendrasaini.com/contact"
    }
  },
  "externalDocs": {
    "description": "MCP server + connect instructions",
    "url": "https://devendrasaini.com/mcp"
  },
  "servers": [
    {
      "url": "https://devendrasaini.com"
    }
  ],
  "paths": {
    "/api/posts.json": {
      "get": {
        "summary": "List all published blog posts",
        "operationId": "listPosts",
        "description": "Returns every published blog post with metadata, newest first.",
        "responses": {
          "200": {
            "description": "A list of blog posts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostList"
                }
              }
            }
          }
        }
      }
    },
    "/api/search-bytes.json": {
      "get": {
        "summary": "List Search Bytes (confirmed Google + AI-search updates)",
        "operationId": "listSearchBytes",
        "description": "Returns the curated Search Bytes timeline — confirmed Google algorithm updates, Search-documentation changes and major AI-search moves — newest first.",
        "responses": {
          "200": {
            "description": "The Search Bytes feed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByteList"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "summary": "MCP endpoint (JSON-RPC 2.0, Streamable HTTP)",
        "operationId": "mcp",
        "description": "Model Context Protocol server. POST JSON-RPC 2.0 messages (initialize, tools/list, tools/call). Connect any client with: npx -y mcp-remote https://devendrasaini.com/api/mcp — full docs at https://devendrasaini.com/mcp.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "example": "2.0"
                  },
                  "id": {},
                  "method": {
                    "type": "string",
                    "example": "tools/list"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PostList": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer"
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        }
      },
      "Post": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "what-is-geo-generative-engine-optimisation"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "example": "geo"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "published_at": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "read_time_min": {
            "type": "integer"
          }
        }
      },
      "ByteList": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "feed": {
            "type": "string"
          },
          "page": {
            "type": "string",
            "format": "uri"
          },
          "rss": {
            "type": "string",
            "format": "uri"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer"
          },
          "bytes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Byte"
            }
          }
        }
      },
      "Byte": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "lane": {
            "type": "string",
            "enum": [
              "algo",
              "docs",
              "geo"
            ]
          },
          "title": {
            "type": "string"
          },
          "blurb": {
            "type": "string"
          },
          "source_name": {
            "type": "string"
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}