{
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Generated from the API's own index at GET https://api.seodiff.io/v1/. Request bodies and examples are in https://seodiff.io/docs/api.md.",
    "title": "SEODiff API",
    "version": "2026-11-25"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/account": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your plan (in this phase every account has everything), your sites, and what you used this month and last: pages crawled, renders, AI answers, preview checks, backlink pages fetched and API calls, beside each plan's limits."
      }
    },
    "/v1/ai-visibility": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Can AI crawlers read the site (robots.txt per AI crawler, llms.txt, text without scripts, AI crawler fetches), and what AI models say: whether they name the site for its own top searches, with and without web search, and how they describe it, asked weekly and labelled as AI. ?answers=1 adds the answers word for word."
      }
    },
    "/v1/ai-visibility/questions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's own questions for AI visibility, up to 10, each with a language and the country it's asked from, asked as written in place of the site's Search Console searches. PUT {\"questions\": [...]}; an empty list goes back to the searches."
      },
      "put": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's own questions for AI visibility, up to 10, each with a language and the country it's asked from, asked as written in place of the site's Search Console searches. PUT {\"questions\": [...]}; an empty list goes back to the searches."
      }
    },
    "/v1/alert-ranges": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "How traffic drops are judged for each page type: its own usual range, learned from its history, and a replay of the past year with the learned rule against the fixed one, with the traffic alerts actually raised."
      }
    },
    "/v1/alerts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Open alerts on your monitored sites, plus any opened or resolved since the time given; site and source narrow them. Read it at the start of each session."
      }
    },
    "/v1/analytics": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Remove one connection; provider may be left out when there's only one. Visits already read stay."
      },
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's analytics connections, each read hourly, with its state, install tag and the last check of it on the site; the primary one feeds GET /v1/visits and is also given as connection. next is the site's next step (choose, add_tag, waiting_for_visits or counting), options the cookie-free tools SEODiff can set up for it, and install_prompt asks the site's agent to add the tags still missing. For GA4 waiting for a choice, the properties to choose from."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Connect the site's own analytics: {\"site\": ..., \"plausible\": {\"server\": \"https://plausible.io\", \"site_id\": \"example.com\", \"api_key\": \"\u003cStats API key\u003e\", \"time_zone\": \"Europe/Stockholm\"}}, or {\"site\": ..., \"ga4\": {\"property\": \"properties/123\"}} after connecting Google Analytics in the app. Or {\"site\": ..., \"primary\": \"umami\"} to choose which connection feeds visits, from the next hour."
      }
    },
    "/v1/analytics/check": {
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Look for the site's hosted tags on its live home page now: {\"site\": ...}. Answers like GET /v1/analytics, with each install's check: tag_found, and csp_needs, what the site's Content-Security-Policy must allow. SEODiff also checks every hour until the tags are found."
      }
    },
    "/v1/analytics/compare": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Each connection's visits beside Search Console's clicks, per day in Search Console's days: from Google, from all search and in all, and Google visits as a share of clicks."
      }
    },
    "/v1/analytics/hosted": {
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "SEODiff adds the site to a cookie-free tool itself: {\"site\": ..., \"provider\": \"umami\"} or \"cloudflare\". Umami: SEODiff adds the site to the Umami it runs. Cloudflare: SEODiff finds the site's Web Analytics in your own connected Cloudflare account (switch it on there first; 409 web_analytics_off says how). Answers with the connection and install.script, the tag for every page's head, or install.automatic when Cloudflare adds its beacon itself. Reads the week before at once."
      }
    },
    "/v1/analytics/providers": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The analytics tools SEODiff reads, which are cookie-free, which SEODiff sets up itself (hosted), and which this server offers now. No token needed."
      }
    },
    "/v1/backlinks": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The exact pages linking to a monitored site: link text, rel, first and last seen, and lost links, by the page type they link to. Found from Common Crawl's linking hosts, your visits' referrers, the new pages of sites linking to you or your competitors, Wikipedia as it's edited, Hacker News and pages you add, with each source's state, and checked again weekly."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Follow a page you know links to the site: {\"site\": \"https://www.example.com/\", \"page\": \"https://other.example/list\"}. Checked now and weekly after."
      }
    },
    "/v1/baselines": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your baselines, kept 90 days."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Save up to 50 pages on one host to compare against later. JSON: {\"urls\": [\"https://example.com/a\"], \"label\": \"before release 42\"}. Runs in the background."
      }
    },
    "/v1/baselines/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Delete a baseline and everything stored with it."
      },
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The baseline, its runs, and the latest comparison: only what changed."
      }
    },
    "/v1/baselines/{id}/compare": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Check the same pages again and compare with the baseline. Runs in the background."
      }
    },
    "/v1/baselines/{id}/runs/{run}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One run, with every change."
      }
    },
    "/v1/basics": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The domain's expiry, registrar and registry status (RDAP), its name and mail servers with changes in the last week, and the certificate's expiry. Checked daily."
      }
    },
    "/v1/bing": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Bing Webmaster data for a monitored site: clicks, impressions, pages crawled, pages in Bing's index, top queries, and Bing's share of your search clicks."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Let SEODiff submit your new pages to Bing daily, within Bing's quota: {\"submit_new_pages\": true}. Off by default."
      }
    },
    "/v1/brand": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your brand patterns."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your brand searches: {\"patterns\": [\"(?i)trail ?splits\"]}. The traffic report then splits each template's query rows into branded and non-branded."
      }
    },
    "/v1/candidates": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Check pages before release: {\"pages\": [{\"url\": \"https://www.example.com/a\", \"status\": 200, \"headers\": {\"Content-Type\": \"text/html\"}, \"html\": \"...\"}], \"robots_txt\": \"optional\", \"compare\": true}. Up to 20 pages, gzip accepted. Each gets the same check as /v1/check and a comparison with the live page, and the batch a verdict."
      }
    },
    "/v1/changelog": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "since_version",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "What changed in the API, newest first, each with a version number, with no token needed. The SEODiff-API-Version header on every response gives the newest number."
      }
    },
    "/v1/check": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Check one page. Stored for 90 days, and its id can be cited in feedback. Without a token it runs as the public check, 10 an hour, kept 15 minutes."
      }
    },
    "/v1/checks/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Read one of your stored checks."
      }
    },
    "/v1/cloudflare": {
      "delete": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Disconnect Cloudflare. What was read stays."
      },
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your own Cloudflare connection, read-only: whether it's connected, what SEODiff can read with it (crawler fetches, Web Analytics, which sites are behind Cloudflare), and token_link, which opens Cloudflare's token form with the four read permissions ticked."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Connect your Cloudflare account: {\"token\": \"\u003cAPI token\u003e\"}. SEODiff checks what it can read and answers with the report; it never changes anything in Cloudflare."
      }
    },
    "/v1/competitors": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your page types against the sites you watch, from their sitemaps: each rival's pages of the same type and growth in about 30 days, and the entities rivals have pages about that you don't, ranked by how many rivals have them and your own Search Console impressions for them. Each rival type's match to yours is suggested, confirmed or none. format=csv with type lists that type's missing entities."
      }
    },
    "/v1/competitors/types": {
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Confirm or change which of your page types a rival type is: {\"site\": \"https://www.example.com/\", \"matches\": [{\"rival\": \"https://rival.example/\", \"pattern\": \"^/marathons/[^/]+$\", \"type\": \"race\"}]}. Pattern from GET /v1/competitors; \"type\": \"\" for none of yours, \"auto\" for SEODiff's suggestion."
      }
    },
    "/v1/crawlers": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "What search and AI crawlers fetched in the last 30 days (days=1 to 30), checked against the addresses their companies publish: per crawler, and per page type how many pages Googlebot reached, which it never fetched, and which it fetched but Google doesn't show or index. From Cloudflare when connected, else from the site's snippet."
      }
    },
    "/v1/deploys": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your recent deploys, kept 180 days as markers."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Report a deploy to a monitored site, and get what it changed: {\"site\": \"https://www.example.com/\", \"ref\": \"a1b2c3d\", \"note\": \"new match pages\", \"wait\": true}. Compares the monitor's sample pages, sitemaps and robots.txt with the state before. With wait, answers when done, within 80 seconds."
      }
    },
    "/v1/deploys/effect": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "deploy",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "date",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "template",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Did a change help? A time-based test per template against the rest of the site, 28 days before and up to 28 after, with a 95% interval calibrated on the template's own earlier weeks. Defaults to the newest deploy with a week of data after it, and the templates it touched."
      }
    },
    "/v1/deploys/hours": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "deploy",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "template",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A deploy's first hours, up to 3 days: each template it touched in Search Console's hourly data, against the same hours a week before and the rest of the site, with its usual range. Defaults to the newest deploy. An alert opens when a touched template's impressions fall 30% or more below it."
      }
    },
    "/v1/deploys/outcomes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "What each reported deploy did: its new pages, the share indexed within 7 and 14 days, and clicks in the week before and after."
      }
    },
    "/v1/deploys/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One deploy check: its verdict, new and resolved conditions, and page changes."
      }
    },
    "/v1/digest": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One read for the week, in Markdown: alerts opened, resolved and open, deploys and Google updates, search traffic and its biggest moves, index share, Core Web Vitals and Bing, each pointing at the endpoint with the detail."
      }
    },
    "/v1/edge": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "What Cloudflare did before or instead of the site's server, per day: requests it blocked or challenged, by verified bot category and by people; error answers, and whether the server ever saw them; and how AI assistants' reads were served from the cache. Read live through the Cloudflare connection; days 1 to 30, default 7."
      }
    },
    "/v1/export": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Everything SEODiff keeps about a monitored site as one JSON file: settings (secrets left out), alerts, deploys, notes, Search Console by page and day, visits, backlinks, crawl history, page versions, split tests and AI answers."
      }
    },
    "/v1/features": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Every feature with its plan label, the limits per plan and what's metered; the same as https://seodiff.io/features.json. No token needed."
      }
    },
    "/v1/feedback": {
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Tell us what's wrong or missing. JSON: {\"kind\": \"incorrect_finding|missed_problem|bug|unsupported_case|feature_request|other\", \"rule_id\": \"R10\", \"check_id\": \"ck_...\", \"problem_id\": \"p_... or al_...\", \"source\": \"agent|person\", \"agent\": \"claude-code\", \"text\": \"at most 2,000 characters\"}. Only kind and source are required. check_id is for a stored check; for a problem or alert from the hourly monitor or another source, use problem_id. A false alarm is kind incorrect_finding (false_positive is accepted as the same)."
      }
    },
    "/v1/feedback/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Read a submission's status: received, triaged, planned, shipped or declined, with a short note."
      }
    },
    "/v1/gate": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your blocking rules."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Choose the rules that block a release: {\"block\": [\"R01\", \"R02\", \"R03\", \"sitemap\"]}. Release and deploy checks then answer gate: block, warn or pass."
      }
    },
    "/v1/ghosts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The 30 pages with the most impressions in the newest week of data, checked now, listing those that answer an error, redirect, noindex or a canonical elsewhere. Checked daily as an alert too."
      }
    },
    "/v1/ignore": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's ignore rules, what each left out in the last 7 days, and suggested rules: crawlers named after the site, SEODiff's own checks, and paths such as /api/* that draw many crawler fetches."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Set the site's ignore rules: {\"site\": ..., \"rules\": [{\"crawler\": \"examplebot\"}, {\"path\": \"/api/*\"}]}. They leave those crawlers or paths out of every count, view, problem and alert; the counts stay stored, so removing a rule brings them back."
      }
    },
    "/v1/index-health": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "What Google does with your listed pages, by page type: indexed share, crawled or discovered but not indexed, another canonical, and the trend, from a rotating URL Inspection sample."
      }
    },
    "/v1/index-panel": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A fixed set of up to 200 pages Google had, inspected again weekly, or daily after a whole-site fall: the share still indexed by day and by page type, the pages dropped without a new crawl, and the hold that keeps the site's evidence from being deleted."
      }
    },
    "/v1/intents": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your declared intents: URL patterns you keep out of search on purpose."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Set them. JSON: {\"noindex\": [\"^/[a-z]{2}/\\\\d{4}-\\\\d{2}-\\\\d{2}$\"], \"noindex_reasons\": [\"past-event\"]}. noindex: RE2 patterns on path and query, at most 50. noindex_reasons: reasons a page may state in \u003cmeta name=\"seodiff-intent\" content=\"noindex: past-event\"\u003e. A matching page's noindex is expected instead of attention."
      }
    },
    "/v1/keypages": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The key pages checked every 15 minutes (home, robots.txt, the sitemap, the top pages by clicks, or your own list), with each one's latest answer."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Set the key pages: {\"site\": \"...\", \"pages\": [\"https://...\"], \"every_minutes\": 15}. \"pages\": [] goes back to SEODiff's suggestions; every_minutes is 15, 30 or 60."
      }
    },
    "/v1/links": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Which hosts link to a watched or verified site, from Common Crawl's newest monthly web graph."
      }
    },
    "/v1/monitors": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Stop monitoring a site, and delete its runs and alerts."
      },
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your monitored sites, their latest run, and with url, open alerts and the last 24 runs."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Monitor your own production site every hour. JSON: {\"url\": \"https://www.example.com/\"}. The site must be verified in a connected Search Console account."
      }
    },
    "/v1/notes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Changes written down on a date by people or agents, shown on charts and in reports beside deploys and Google's updates."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Write one down: {\"site\": \"https://www.example.com/\", \"date\": \"2026-11-08\", \"text\": \"New titles on match pages\"}. Up to 200 characters. Test it later with GET /v1/deploys/effect?date=."
      }
    },
    "/v1/notes/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Delete one of your notes."
      }
    },
    "/v1/notifications": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The notification mails SEODiff wrote for the site, newest first, with the automatic check's findings and whether each kind is sent to people yet. Read them like a person would, and send what's wrong or unclear to POST /v1/feedback."
      }
    },
    "/v1/opportunities": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Pages seen in search but rarely clicked, against this site's own click share at the same position, pages just off page one, and missed clicks by template."
      }
    },
    "/v1/overview": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site now, as questions answered worst first: can search engines read it, are clicks up or down, does Google index the pages, did the last release change anything, is it fast, does Bing find it, where could it earn more. Each answer has a status (problem, look, unknown or fine), its evidence and the endpoint with the detail."
      }
    },
    "/v1/page": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One page: clicks, impressions and position per day for up to 90 days, its queries in the last 28 days with the share of clicks they cover, Google's index state, and deploys, notes and Google updates in the period."
      }
    },
    "/v1/pages": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "template",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One page type's pages: clicks, impressions and position against the days before, with Google's index state where SEODiff inspected the page. Up to 200, by clicks, or by the biggest loss or gain."
      }
    },
    "/v1/portfolio": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "All your sites in one answer: ranked by what needs attention today, each with the problem to look at first; every site's clicks on one timeline with Google's updates; whether an update moved the sites together; page types across sites. ?page_types=all lists every page type; ?format=md for Markdown."
      }
    },
    "/v1/previews": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's latest preview checks."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Check a release's preview site before it goes live: {\"site\": \"...\", \"preview_url\": \"https://my-app-git-branch.vercel.app/\", \"headers\": {\"x-vercel-protection-bypass\": \"...\"}, \"wait\": true}. Live pages are sampled per page type and compared with the same paths on the preview, rule by rule and rendered; the gate says pass, warn or block."
      }
    },
    "/v1/previews/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A preview check: running (202) or done, with each page's gate, changes and what scripts change. ?format=md for a CI log."
      }
    },
    "/v1/problems": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's problems, grouped by cause, worst first: each with what SEODiff saw, what it means, why it matters, how sure it is, how to fix it, how SEODiff checks the fix, examples and a ready prompt. The same problems, by the same ids, as the site pages."
      }
    },
    "/v1/problems/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One problem in full."
      }
    },
    "/v1/problems/{id}/intended": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Mark a problem as how the site is meant to be: {\"site\": \"...\", \"reason\": \"...\"}. It leaves the open problems and the overview until DELETE /v1/problems/\u003cid\u003e/intended."
      }
    },
    "/v1/problems/{id}/recheck": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Run the hourly check of the site now, for problems it found ({\"site\": \"...\"}). Other problems say when their source updates."
      }
    },
    "/v1/quality": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Page quality from the full crawl, by page type: near-duplicates, pages that differ only by a name, thin pages, placeholders, and shared titles and descriptions, with the crawl running now. Each finding is also a problem."
      }
    },
    "/v1/quality/crawl": {
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Ask for a full crawl now: {\"site\": \"...\"}. It starts within 10 minutes and reads one page a second."
      }
    },
    "/v1/quality/history": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Every finished crawl's counts per page type, kept with no end: pages, median own words, near copies, name-only pages, thin pages, placeholders, shared titles and noindex, oldest first, to follow quality over time."
      }
    },
    "/v1/queries": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Each query group's clicks, impressions, click share and position against the period before, with top pages and queries, and how much of the site's clicks query rows hold."
      }
    },
    "/v1/query-groups": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your query groups."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Name groups of searches to track: {\"query_groups\": [{\"name\": \"where to watch\", \"patterns\": [\"(?i)wo wird .* übertragen\"], \"countries\": [\"DEU\"]}]}. RE2 on the query, at most 30 groups."
      }
    },
    "/v1/render": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The page without scripts, as crawlers that don't run them read it, against the page after scripts, as Google renders it: title, robots, canonical, text, links and structured data, and what differs that matters. Pages of your monitored sites."
      }
    },
    "/v1/reviews": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "AI reviews (Claude): does a page answer the searches that bring people to it, what it lacks, and a suggested title and description. Every quote is checked to appear on the page. Pages seen in search but rarely clicked are reviewed each Monday."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Review one page now: {\"site\": \"https://www.example.com/\", \"url\": \"https://www.example.com/a-page\"}. Up to 30 a day per project, within SEODiff's monthly AI budget."
      }
    },
    "/v1/snapshots": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A page's versions, newest first: each kept when its status, HTML or search-related headers changed, with the fields that changed from the one before (title, description, canonical, robots, h1, structured data, text length, links)."
      }
    },
    "/v1/snapshots/compare": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Two versions of a page: the fields that differ, and the HTML line by line, one tag a line."
      }
    },
    "/v1/snapshots/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One version: status, headers, and its raw HTML as text."
      }
    },
    "/v1/speed": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "How fast Google crawls and indexes your site's new pages, by URL template, from Search Console's URL Inspection."
      }
    },
    "/v1/splittests": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your split tests on a site, with their results."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Make a split test: {\"site\": \"https://www.example.com/\", \"page_type\": \"race\", \"name\": \"Distance in the title\", \"hypothesis\": \"...\", \"metric\": \"clicks\", \"weeks\": 4}. SEODiff splits the page type's pages into matched halves A and B."
      }
    },
    "/v1/splittests/candidates": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Which page types can be split-tested: per page type, each half's clicks and impressions a day, the smallest change a 2, 4 or 6-week test would see, and a backtest of four-week tests where nothing changed."
      }
    },
    "/v1/splittests/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Delete a test that hasn't started."
      },
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "daily",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "One test: its groups, how they were made, and B against its forecast from A for clicks and impressions, with a 95% interval from reshuffling pages."
      }
    },
    "/v1/splittests/{id}/end": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "End the test: {\"outcome\": \"keep\" | \"revert\" | \"stopped\", \"note\": \"...\"}."
      }
    },
    "/v1/splittests/{id}/pages": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The paths in B (the variant: serve the change here), A (the control) or left_out."
      }
    },
    "/v1/splittests/{id}/start": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The change is live on B: {\"date\": \"2026-11-12\"}, default today."
      }
    },
    "/v1/status": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Whether SEODiff's own jobs run on time and how fresh Search Console data is. No token needed; with one, it adds how fresh SEODiff's view of each of your sites is, so an agent can tell \"SEODiff is late\" from \"my site is broken\"."
      }
    },
    "/v1/templates": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Your page types, and a preview of how your monitored sites' recent search pages fall into them."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Name your page types: {\"templates\": [{\"name\": \"match\", \"patterns\": [\"^/[a-z]{2}/match/\"]}]}. RE2 on path and query, first match wins, at most 30. Pages no rule matches keep their path shape. Used by the monitor, traffic, deploy checks and speed."
      }
    },
    "/v1/templates/suggest": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Proposed page types from your sitemap's URL shapes, with a named capture where the same shape repeats under several first segments, and a body ready for PUT /v1/templates."
      }
    },
    "/v1/traffic": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Clicks, impressions and position for a monitored site by template and country, the last days against the days before, from stored Search Console data."
      }
    },
    "/v1/visitors": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Cookie-free analytics, the basics: visits by people today (against the same hours yesterday), yesterday, 7 and 28 days; sources, landing pages, countries and devices for days 1, 7 or 28; and visits from Google since Search Console's newest day."
      }
    },
    "/v1/visitors/decline": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "option",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Take a no back. Setting the tool up again does the same."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Say no to one way of counting visits, on purpose: {\"site\": \"https://www.example.com/\", \"option\": \"umami\", \"reason\": \"No analytics scripts on this site\"}. option is a key of counting_options. SEODiff removes that tool, stops setting it up or suggesting it, and closes its problems."
      }
    },
    "/v1/visits": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Visits by people from search engines, AI assistants and links, and by crawlers, per page type, with the hours after the last release and a check of visits from Google against Search Console's clicks. ?days=1 to 45, default 7."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Counts of visits from the site: {\"site\": \"...\", \"batch_id\": \"...\", \"visits\": [{\"hour\": \"2026-11-10T14:00:00Z\", \"path\": \"/a\", \"referrer\": \"https://www.google.com/\", \"utm_source\": \"\", \"user_agent\": \"only a crawler's\", \"count\": 3}]}. Counts only: no addresses or cookies. Counts from before the site sent live, up to 90 days back: the same with \"backfill\": true, and \"without_referrers\": true if the site didn't keep where people came from."
      }
    },
    "/v1/visits/backfill": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Take a site's back-filled counts out again, to send them anew or leave them; live counts stay."
      }
    },
    "/v1/visits/pages": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Visits per page: people's arrivals by where they came from, AI assistants' reads for someone (ChatGPT-User and the like) and crawler fetches, for each page or grouped with by=page_type, source, day, hour_of_day, segment:N or a part named in /v1/visits/parts. Filters: source, group, prefix, page_type; counts_from picks which counts (the site's visits or one of its analytics tools); days 1 to 45."
      }
    },
    "/v1/visits/parts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The site's address patterns, such as /{country}/{league}, that name parts of its addresses to group visits by."
      },
      "put": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Set the site's address patterns: {\"site\": ..., \"patterns\": [\"/{country}/{league}\", \"/{country}/{league}/{match}\"]}. {name} is one segment, * at the end any rest; the first that matches names a page's parts."
      }
    },
    "/v1/visits/sources": {
      "get": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "How referrers and crawlers are named and grouped, and the pattern a snippet tests a user agent against before sending it."
      }
    },
    "/v1/visits/token": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A send token for the site's own server: it can only POST /v1/visits and GET /v1/visits for that site. POST makes it (shown once) or replaces it, GET says whether one exists, DELETE stops it. Separate from the client token, so a new client token doesn't stop it."
      },
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A send token for the site's own server: it can only POST /v1/visits and GET /v1/visits for that site. POST makes it (shown once) or replaces it, GET says whether one exists, DELETE stops it. Separate from the client token, so a new client token doesn't stop it."
      },
      "post": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "A send token for the site's own server: it can only POST /v1/visits and GET /v1/visits for that site. POST makes it (shown once) or replaces it, GET says whether one exists, DELETE stops it. Separate from the client token, so a new client token doesn't stop it."
      }
    },
    "/v1/vitals": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "site",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Core Web Vitals from real Chrome users (Chrome UX Report), for the origin and the monitor's sampled pages, phone and desktop, kept beyond the 28-day window, with no data said plainly."
      }
    },
    "/v1/watch": {
      "delete": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Stop watching a site."
      },
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "The sites you watch, each with its latest weekly report of what changed."
      },
      "post": {
        "responses": {
          "200": {
            "description": "JSON, or Markdown with format=md where offered"
          }
        },
        "summary": "Watch a site, such as a competitor. JSON: {\"url\": \"https://rival.example/\"}. At most 20 per project."
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "https://api.seodiff.io"
    }
  ]
}
