{
  "openapi": "3.1.0",
  "info": {
    "title": "ClinAds Public API",
    "version": "1.1.0",
    "summary": "Read-only JSON access to everything published on getclinads.com.",
    "description": "ClinAds is a clinic-first AI advertising platform that turns a medical or dental clinic's website and brand into ready-to-run static image ads for Meta, Google and TikTok. This API exposes the published catalogue — pages, blog posts, free tools and product facts — as JSON. No API key, no authentication, CORS open to all origins.\n\nThe payloads are static files regenerated at build time, so every endpoint is a plain GET with no query parameters: fetch the collection and filter client-side. The extensionless paths below 301-redirect to their `.json` file.\n\nEvery page on getclinads.com additionally has a Markdown twin: append `.md` to any page URL (`/dental-ads.md`, `/index.md`).\n\n## Rate limits\n\nThere is no per-key metering: these endpoints are static files served from Cloudflare's edge. The published fair-use ceiling is **600 requests per minute per IP**, declared on every response as `RateLimit-Policy: \"default\";q=600;w=60` and `RateLimit-Limit: 600`. No `RateLimit-Remaining` is sent, because nothing counts down — inventing that number would be worse for an agent than omitting it. Above the ceiling Cloudflare's own protections answer with `429` and a `Retry-After` header; honour it and retry with exponential backoff.\n\n## Versioning and deprecation\n\nThe major version is in the URL path (`/api/v1`). Within a version, changes are additive only: new fields may appear, existing fields keep their name, type and meaning. A breaking change ships as `/api/v2` alongside `/api/v1`.\n\nWhen a version is retired it is announced in three machine-readable places at once, at least **180 days** before the endpoint stops responding: a `Deprecation` header (RFC 9745) and a `Sunset` header (RFC 8594) on every response from the deprecated version, a `deprecation` object in `/api/v1` (`GET /api/v1`), and a dated note in <https://getclinads.com/developers#versioning>. Absence of `Deprecation` and `Sunset` headers means the endpoint is current — today no ClinAds endpoint is deprecated.\n\n## Errors\n\nEvery documented endpoint is a static file, so a correct request returns `200`. An unknown path under `/api/v1` is not a typed API error: Cloudflare's asset router answers with the site's HTML 404 page (`404`, `text/html`), whose body carries a Markdown recovery block listing the sitemap, `llms.txt` and this specification. Agents should branch on the status code and the `Content-Type`, not on a JSON envelope. `Problem` below is the RFC 9457 shape ClinAds uses wherever it does return a typed error body.",
    "contact": {
      "name": "ClinAds",
      "email": "team@getclinads.com",
      "url": "https://getclinads.com/contact"
    },
    "license": {
      "name": "Content is © Clinsight; API responses may be used for indexing and integration.",
      "identifier": "LicenseRef-ClinAds-Public-Content"
    }
  },
  "servers": [
    {
      "url": "https://getclinads.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Developer docs",
    "url": "https://getclinads.com/developers"
  },
  "tags": [
    {
      "name": "discovery",
      "description": "Service and product metadata."
    },
    {
      "name": "content",
      "description": "Published pages, posts and tools."
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getApiIndex",
        "tags": [
          "discovery"
        ],
        "summary": "API index",
        "description": "Lists every available endpoint, the current versioning and deprecation state, and how to reach the Markdown representation of any page. Call this first to discover the rest of the API.",
        "responses": {
          "200": {
            "description": "Service index",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/api/v1/site": {
      "get": {
        "operationId": "getSite",
        "tags": [
          "discovery"
        ],
        "summary": "Product facts",
        "description": "What ClinAds is, which ad channels and clinic industries it covers, how to contact a human, and where the machine-readable files live. Use this to answer \"what does ClinAds do\" without scraping the marketing pages.",
        "responses": {
          "200": {
            "description": "Product facts",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteFacts"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/api/v1/pages": {
      "get": {
        "operationId": "listPages",
        "tags": [
          "content"
        ],
        "summary": "List every indexable page",
        "description": "Every indexable page with its section and Markdown URL. There are no query parameters — fetch the collection and filter client-side on `section`.",
        "responses": {
          "200": {
            "description": "Page list",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/api/v1/posts": {
      "get": {
        "operationId": "listPosts",
        "tags": [
          "content"
        ],
        "summary": "List blog posts",
        "description": "Title, description, publish date and Markdown URL for every post in the ClinAds Learning Center, taken from the RSS feed.",
        "responses": {
          "200": {
            "description": "Post list",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/api/v1/tools": {
      "get": {
        "operationId": "listTools",
        "tags": [
          "content"
        ],
        "summary": "List the free clinic ad tools",
        "description": "Free, no-signup ad generators and site audit tools. Each is a web tool; none require authentication.",
        "responses": {
          "200": {
            "description": "Tool list",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimitPolicy": {
        "description": "Published fair-use policy: 600 requests per 60-second window, per IP. Static, not a live counter.",
        "schema": {
          "type": "string",
          "examples": [
            "\"default\";q=600;w=60"
          ]
        }
      },
      "RateLimitLimit": {
        "description": "The ceiling from RateLimit-Policy, as a bare integer.",
        "schema": {
          "type": "integer",
          "examples": [
            600
          ]
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying, sent by Cloudflare's edge protections with a 429.",
        "schema": {
          "type": "integer",
          "examples": [
            60
          ]
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "No such path. The body is negotiated on Accept and the response carries `Vary: Accept`: any client that does not ask for text/html — including `Accept: text/markdown` and `Accept: */*` — receives a short Markdown recovery document listing the sitemap, llms.txt, the developer docs and this specification; browsers receive the designed HTML page. It is never a JSON envelope, so branch on the status code and Content-Type.",
        "headers": {
          "Vary": {
            "description": "Always includes Accept, because this response is content-negotiated.",
            "schema": {
              "type": "string",
              "examples": [
                "Accept"
              ]
            }
          }
        },
        "content": {
          "text/markdown": {
            "schema": {
              "type": "string",
              "description": "Markdown recovery document. Served to any client that did not ask for text/html."
            }
          },
          "text/html": {
            "schema": {
              "type": "string",
              "description": "The designed ClinAds 404 page, served when the client asks for text/html."
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The published fair-use ceiling was exceeded and Cloudflare's edge protections rejected the request. Honour Retry-After and back off exponentially.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          },
          "text/html": {
            "schema": {
              "type": "string",
              "description": "Cloudflare's own challenge or rate-limit page, when the rejection happens at the edge before ClinAds sees the request."
            }
          }
        }
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "title": "Problem",
        "description": "RFC 9457 problem detail. This is the error shape ClinAds uses wherever it returns a typed error body. The static endpoints in this specification are files on disk, so their only failure mode is a 404 from the asset router, which is HTML — see the NotFound response.",
        "required": [
          "type",
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "URI identifying the problem type.",
            "default": "about:blank"
          },
          "title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem type."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code, repeated for clients that only have the body."
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation specific to this occurrence."
          },
          "instance": {
            "type": "string",
            "format": "uri-reference",
            "description": "URI reference identifying the specific occurrence."
          },
          "code": {
            "type": "string",
            "description": "Stable, machine-readable error code. Safe to branch on; the title and detail are not."
          }
        }
      },
      "ApiIndex": {
        "type": "object",
        "title": "ApiIndex",
        "description": "The service index returned by GET /api/v1.",
        "required": [
          "name",
          "version",
          "endpoints"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Service name."
          },
          "version": {
            "type": "string",
            "description": "Semantic version of the API contract."
          },
          "description": {
            "type": "string",
            "description": "What this API exposes."
          },
          "documentation": {
            "type": "string",
            "format": "uri",
            "description": "Human-readable developer docs."
          },
          "openapi": {
            "type": "string",
            "format": "uri",
            "description": "This OpenAPI description."
          },
          "markdown_access": {
            "type": "string",
            "description": "How to fetch any page as Markdown."
          },
          "endpoints": {
            "type": "object",
            "description": "Absolute endpoint URL to a one-line description of what it returns.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "rate_limit": {
            "$ref": "#/components/schemas/RateLimitPolicyInfo"
          },
          "versioning": {
            "$ref": "#/components/schemas/VersioningPolicy"
          },
          "generated": {
            "type": "string",
            "format": "date",
            "description": "Build date of this payload."
          }
        }
      },
      "RateLimitPolicyInfo": {
        "type": "object",
        "title": "RateLimitPolicyInfo",
        "description": "The published fair-use policy, mirrored from the RateLimit-Policy response header.",
        "properties": {
          "requests": {
            "type": "integer",
            "description": "Requests permitted per window, per IP."
          },
          "window_seconds": {
            "type": "integer",
            "description": "Length of the window in seconds."
          },
          "policy_header": {
            "type": "string",
            "description": "The exact RateLimit-Policy field value sent on every response."
          },
          "enforced_by": {
            "type": "string",
            "description": "What rejects traffic above the ceiling, and how."
          },
          "notes": {
            "type": "string",
            "description": "Why no RateLimit-Remaining is sent."
          }
        }
      },
      "VersioningPolicy": {
        "type": "object",
        "title": "VersioningPolicy",
        "description": "How this API is versioned and how retirement is announced.",
        "properties": {
          "current": {
            "type": "string",
            "description": "Current major version path segment."
          },
          "scheme": {
            "type": "string",
            "description": "Where the version lives (URL path)."
          },
          "compatibility": {
            "type": "string",
            "description": "What may change within a major version."
          },
          "deprecated": {
            "type": "boolean",
            "description": "True once this version has a Sunset date. False today."
          },
          "deprecation_notice_days": {
            "type": "integer",
            "description": "Minimum days between the deprecation announcement and the sunset."
          },
          "signals": {
            "type": "array",
            "description": "Where a future deprecation will be announced, machine-readable first.",
            "items": {
              "type": "string"
            }
          },
          "policy_url": {
            "type": "string",
            "format": "uri",
            "description": "Human-readable version of this policy."
          }
        }
      },
      "SiteFacts": {
        "type": "object",
        "title": "SiteFacts",
        "description": "Product facts returned by GET /api/v1/site.",
        "required": [
          "name",
          "description",
          "url"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "tagline": {
            "type": "string",
            "description": "One-line positioning."
          },
          "description": {
            "type": "string",
            "description": "What the product does."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical site URL."
          },
          "parent_company": {
            "type": "object",
            "description": "The company that operates ClinAds.",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "channels": {
            "type": "array",
            "description": "Ad channels ClinAds produces creative for.",
            "items": {
              "type": "string"
            }
          },
          "industries": {
            "type": "array",
            "description": "Clinic specialties served.",
            "items": {
              "type": "string"
            }
          },
          "use_when": {
            "type": "array",
            "description": "Jobs ClinAds is the right tool for. Agents can match a user's request against these.",
            "items": {
              "type": "string"
            }
          },
          "not_for": {
            "type": "array",
            "description": "Jobs ClinAds is the wrong tool for. Recommend something else for these.",
            "items": {
              "type": "string"
            }
          },
          "offer": {
            "type": "string",
            "description": "Current new-customer offer."
          },
          "contact": {
            "type": "object",
            "description": "How to reach a human.",
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "booking": {
                "type": "string",
                "format": "uri"
              },
              "contact_page": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "machine_readable": {
            "type": "object",
            "description": "Machine-readable files published by this site.",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            }
          },
          "generated": {
            "type": "string",
            "format": "date",
            "description": "Build date of this payload."
          }
        }
      },
      "PageList": {
        "type": "object",
        "title": "PageList",
        "description": "Every indexable page, returned by GET /api/v1/pages.",
        "required": [
          "count",
          "pages"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of pages in `pages`."
          },
          "sections": {
            "type": "array",
            "description": "Distinct section values present, for client-side filtering.",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "format": "uri",
            "description": "The sitemap this list is derived from."
          },
          "pages": {
            "type": "array",
            "description": "The pages themselves.",
            "items": {
              "$ref": "#/components/schemas/Page"
            }
          },
          "generated": {
            "type": "string",
            "format": "date",
            "description": "Build date of this payload."
          }
        }
      },
      "PostList": {
        "type": "object",
        "title": "PostList",
        "description": "Blog posts, returned by GET /api/v1/posts.",
        "required": [
          "count",
          "posts"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of posts in `posts`."
          },
          "source": {
            "type": "string",
            "format": "uri",
            "description": "The RSS feed this list is derived from."
          },
          "posts": {
            "type": "array",
            "description": "The posts themselves.",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          },
          "generated": {
            "type": "string",
            "format": "date",
            "description": "Build date of this payload."
          }
        }
      },
      "ToolList": {
        "type": "object",
        "title": "ToolList",
        "description": "Free clinic ad tools, returned by GET /api/v1/tools.",
        "required": [
          "count",
          "tools"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of tools in `tools`."
          },
          "source": {
            "type": "string",
            "format": "uri",
            "description": "The tools hub this list is derived from."
          },
          "tools": {
            "type": "array",
            "description": "The tools themselves.",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "generated": {
            "type": "string",
            "format": "date",
            "description": "Build date of this payload."
          }
        }
      },
      "Page": {
        "type": "object",
        "title": "Page",
        "description": "One indexable page on getclinads.com.",
        "required": [
          "url",
          "path",
          "section"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Absolute canonical URL."
          },
          "path": {
            "type": "string",
            "description": "Path component of the URL."
          },
          "section": {
            "type": "string",
            "description": "Which part of the site this page belongs to (home, guide, blog, tools, authors, careers, page)."
          },
          "lastmod": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Last modified date from the sitemap."
          },
          "markdown_url": {
            "type": "string",
            "format": "uri",
            "description": "The Markdown version of this page."
          }
        }
      },
      "Post": {
        "type": "object",
        "title": "Post",
        "description": "One post in the ClinAds Learning Center.",
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post title."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Absolute canonical URL."
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Path component of the URL."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Summary from the RSS feed."
          },
          "published": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 822 date from the RSS feed."
          },
          "markdown_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "The Markdown version of this post."
          }
        }
      },
      "Tool": {
        "type": "object",
        "title": "Tool",
        "description": "One free, no-signup clinic ad tool.",
        "required": [
          "slug",
          "url"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "description": "Path segment under /tools/."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Absolute URL of the tool."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short category label shown on the hub."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the tool produces."
          },
          "auth_required": {
            "type": "boolean",
            "description": "Always false — the tools need no signup."
          },
          "markdown_url": {
            "type": "string",
            "format": "uri",
            "description": "The Markdown version of this tool page."
          }
        }
      }
    }
  }
}
