{
  "openapi": "3.1.0",
  "info": {
    "title": "Collectly Public API",
    "version": "1.0.0",
    "summary": "Read-only access to public collections, items and collector profiles on Collectly.",
    "description": "Collectly is a free collection tracker for physical collectibles. These\nendpoints read the same public data the website shows: public collections, public\nitems and opt-in collector profiles. Anything a collector keeps private is never\nreturned. No authentication is required and all endpoints are read-only.",
    "contact": {
      "name": "Collectly",
      "url": "https://collectly.xyz/Contact"
    },
    "license": {
      "name": "Content contributed by collectors, provided as-is"
    }
  },
  "servers": [
    {
      "url": "https://collectly.xyz",
      "description": "Collectly"
    }
  ],
  "paths": {
    "/functions/publicCatalog": {
      "get": {
        "operationId": "readPublicCatalog",
        "summary": "Read the public catalogue as JSON",
        "description": "Returns public collections, items or collector profiles. Every record returned has been marked public by its collector.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Which collection of records to return.",
            "schema": {
              "type": "string",
              "enum": [
                "collections",
                "items",
                "collectors",
                "collection",
                "item",
                "collector"
              ],
              "default": "collections"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Record id, required when type is collection, item or collector.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of records to return on the list endpoints.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested public records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Unknown type, or a missing id."
          },
          "404": {
            "description": "No public record with that id."
          }
        }
      }
    },
    "/functions/markdownPage": {
      "get": {
        "operationId": "readPageAsMarkdown",
        "summary": "Read any public page as markdown",
        "description": "Renders a public Collectly page as clean markdown, so the content can be read without parsing the website markup.",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": false,
            "description": "The site path to render, for example /, /browse, /browse/toys, /c/<name>-<id>, /item/<name>-<id>, /u/<name>-<id>, /blog or /blog/<title>-<id>.",
            "schema": {
              "type": "string",
              "default": "/"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page as markdown.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "302": {
            "description": "The client asked for HTML, so it is sent to the rendered page."
          },
          "404": {
            "description": "No public markdown version of that path."
          }
        }
      }
    },
    "/functions/blogFeed": {
      "get": {
        "operationId": "readBlogFeed",
        "summary": "Read the blog as an RSS feed",
        "description": "An RSS feed carrying the full text of every published post.",
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/functions/sitemap": {
      "get": {
        "operationId": "readSitemap",
        "summary": "Read the XML sitemap",
        "description": "Every public page on the site, as an XML sitemap.",
        "responses": {
          "200": {
            "description": "The sitemap.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}