{"openapi":"3.0.3","info":{"title":"Grayhat Blog Public API","version":"1.0.0","description":"Public API surface for Grayhat blog content, intended for human pages, crawlers, chatbots, and agents."},"servers":[{"url":"https://grayhat-company-blog.grayhatstudio.workers.dev/blog","description":"Configured Grayhat blog origin."}],"paths":{"/api/openapi.json":{"get":{"operationId":"getBlogOpenApiDocument","summary":"Get the blog public OpenAPI document","description":"Returns the generated OpenAPI contract for Grayhat public blog APIs.","tags":["Discovery"],"responses":{"200":{"description":"Generated OpenAPI document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/public/v1/posts":{"get":{"operationId":"listBlogPosts","summary":"List public blog posts","description":"Returns public Ghost posts available for blog display and agent reads.","tags":["Posts"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"q","in":"query","description":"Case-insensitive text search across implemented public fields.","schema":{"type":"string"}},{"name":"tag","in":"query","description":"Filter by public tag slug.","schema":{"type":"string"}},{"name":"author","in":"query","description":"Filter by public author slug.","schema":{"type":"string"}},{"name":"featured","in":"query","description":"Filter by featured status.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Public blog post list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPostsListResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}},"/api/public/v1/posts/{slug}":{"get":{"operationId":"getBlogPost","summary":"Get a public blog post","description":"Returns one public Ghost post or page by slug, including rendered HTML.","tags":["Posts"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"slug","in":"path","required":true,"description":"Public blog post or page slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Public blog post with content HTML.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPostResponse"}},"text/toon":{"schema":{"type":"string"}}}},"404":{"description":"Blog post not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}},"/api/public/v1/tags":{"get":{"operationId":"listBlogTags","summary":"List public blog tags","description":"Returns public Ghost tags that have at least one routed blog post.","tags":["Tags"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"q","in":"query","description":"Case-insensitive text search across implemented public fields.","schema":{"type":"string"}}],"responses":{"200":{"description":"Public blog tag list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTagsListResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}},"/api/public/v1/tags/{slug}":{"get":{"operationId":"getBlogTag","summary":"Get a public blog tag","description":"Returns one public Ghost tag by slug.","tags":["Tags"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"slug","in":"path","required":true,"description":"Public blog tag slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Public blog tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTagResponse"}},"text/toon":{"schema":{"type":"string"}}}},"404":{"description":"Blog tag not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}},"/api/public/v1/authors":{"get":{"operationId":"listBlogAuthors","summary":"List public blog authors","description":"Returns public Ghost authors that have at least one routed blog post.","tags":["Authors"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"q","in":"query","description":"Case-insensitive text search across implemented public fields.","schema":{"type":"string"}}],"responses":{"200":{"description":"Public blog author list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuthorsListResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}},"/api/public/v1/authors/{slug}":{"get":{"operationId":"getBlogAuthor","summary":"Get a public blog author","description":"Returns one public Ghost author by slug.","tags":["Authors"],"parameters":[{"name":"format","in":"query","description":"Optional response format. JSON is returned by default.","schema":{"type":"string","enum":["json","toon"]}},{"name":"slug","in":"path","required":true,"description":"Public blog author slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"Public blog author.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuthorResponse"}},"text/toon":{"schema":{"type":"string"}}}},"404":{"description":"Blog author not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorResponse"}},"text/toon":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"PublicApiErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND","PUBLIC_CONTENT_UNAVAILABLE"],"description":"Stable machine-readable error code."},"message":{"type":"string","description":"Public, non-secret error message."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"PublicPostsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost post identifier."},"uuid":{"type":"string","nullable":true,"description":"Ghost post UUID when available."},"slug":{"type":"string","description":"Public post slug."},"title":{"type":"string","description":"Public post title."},"excerpt":{"type":"string","description":"Public post summary."},"url":{"type":"string","description":"Canonical public blog post URL."},"featureImage":{"type":"string","nullable":true,"description":"Public post feature image URL."},"featureImageAlt":{"type":"string","nullable":true,"description":"Feature image alt text."},"publishedAt":{"type":"string","nullable":true,"description":"Published timestamp."},"updatedAt":{"type":"string","nullable":true,"description":"Updated timestamp."},"readingTime":{"type":"integer","minimum":0,"nullable":true},"featured":{"type":"boolean"},"visibility":{"type":"string","nullable":true,"description":"Ghost visibility value."},"primaryTag":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost tag identifier."},"slug":{"type":"string","description":"Public tag slug."},"name":{"type":"string","description":"Public display name."},"description":{"type":"string","nullable":true,"description":"Public tag description."},"featureImage":{"type":"string","nullable":true,"description":"Public tag feature image URL."},"url":{"type":"string","description":"Canonical public blog tag URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","description","featureImage","url","postCount"],"additionalProperties":false,"nullable":true},"primaryAuthor":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost author identifier."},"slug":{"type":"string","description":"Public author slug."},"name":{"type":"string","description":"Public display name."},"bio":{"type":"string","nullable":true,"description":"Public author biography."},"profileImage":{"type":"string","nullable":true,"description":"Public author profile image URL."},"coverImage":{"type":"string","nullable":true,"description":"Public author cover image URL."},"website":{"type":"string","nullable":true,"description":"Public author website URL."},"location":{"type":"string","nullable":true,"description":"Public author location."},"url":{"type":"string","description":"Canonical public blog author URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","bio","profileImage","coverImage","website","location","url","postCount"],"additionalProperties":false,"nullable":true},"tags":{"type":"array","items":{"$ref":"#/definitions/PublicPostsListResponse/properties/data/items/properties/primaryTag"}},"authors":{"type":"array","items":{"$ref":"#/definitions/PublicPostsListResponse/properties/data/items/properties/primaryAuthor"}}},"required":["id","uuid","slug","title","excerpt","url","featureImage","featureImageAlt","publishedAt","updatedAt","readingTime","featured","visibility","primaryTag","primaryAuthor","tags","authors"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"filters":{"type":"object","additionalProperties":{"type":"string"}}},"required":["count"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"PublicPostResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost post identifier."},"uuid":{"type":"string","nullable":true,"description":"Ghost post UUID when available."},"slug":{"type":"string","description":"Public post slug."},"title":{"type":"string","description":"Public post title."},"excerpt":{"type":"string","description":"Public post summary."},"url":{"type":"string","description":"Canonical public blog post URL."},"featureImage":{"type":"string","nullable":true,"description":"Public post feature image URL."},"featureImageAlt":{"type":"string","nullable":true,"description":"Feature image alt text."},"publishedAt":{"type":"string","nullable":true,"description":"Published timestamp."},"updatedAt":{"type":"string","nullable":true,"description":"Updated timestamp."},"readingTime":{"type":"integer","minimum":0,"nullable":true},"featured":{"type":"boolean"},"visibility":{"type":"string","nullable":true,"description":"Ghost visibility value."},"primaryTag":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost tag identifier."},"slug":{"type":"string","description":"Public tag slug."},"name":{"type":"string","description":"Public display name."},"description":{"type":"string","nullable":true,"description":"Public tag description."},"featureImage":{"type":"string","nullable":true,"description":"Public tag feature image URL."},"url":{"type":"string","description":"Canonical public blog tag URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","description","featureImage","url","postCount"],"additionalProperties":false,"nullable":true},"primaryAuthor":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost author identifier."},"slug":{"type":"string","description":"Public author slug."},"name":{"type":"string","description":"Public display name."},"bio":{"type":"string","nullable":true,"description":"Public author biography."},"profileImage":{"type":"string","nullable":true,"description":"Public author profile image URL."},"coverImage":{"type":"string","nullable":true,"description":"Public author cover image URL."},"website":{"type":"string","nullable":true,"description":"Public author website URL."},"location":{"type":"string","nullable":true,"description":"Public author location."},"url":{"type":"string","description":"Canonical public blog author URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","bio","profileImage","coverImage","website","location","url","postCount"],"additionalProperties":false,"nullable":true},"tags":{"type":"array","items":{"$ref":"#/definitions/PublicPostResponse/properties/data/properties/primaryTag"}},"authors":{"type":"array","items":{"$ref":"#/definitions/PublicPostResponse/properties/data/properties/primaryAuthor"}},"html":{"type":"string","description":"Rendered Ghost post HTML."},"plaintext":{"type":"string","description":"Plain-text post content."}},"required":["id","uuid","slug","title","excerpt","url","featureImage","featureImageAlt","publishedAt","updatedAt","readingTime","featured","visibility","primaryTag","primaryAuthor","tags","authors","html","plaintext"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"PublicTagsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost tag identifier."},"slug":{"type":"string","description":"Public tag slug."},"name":{"type":"string","description":"Public display name."},"description":{"type":"string","nullable":true,"description":"Public tag description."},"featureImage":{"type":"string","nullable":true,"description":"Public tag feature image URL."},"url":{"type":"string","description":"Canonical public blog tag URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","description","featureImage","url","postCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"filters":{"type":"object","additionalProperties":{"type":"string"}}},"required":["count"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"PublicTagResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost tag identifier."},"slug":{"type":"string","description":"Public tag slug."},"name":{"type":"string","description":"Public display name."},"description":{"type":"string","nullable":true,"description":"Public tag description."},"featureImage":{"type":"string","nullable":true,"description":"Public tag feature image URL."},"url":{"type":"string","description":"Canonical public blog tag URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","description","featureImage","url","postCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"PublicAuthorsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost author identifier."},"slug":{"type":"string","description":"Public author slug."},"name":{"type":"string","description":"Public display name."},"bio":{"type":"string","nullable":true,"description":"Public author biography."},"profileImage":{"type":"string","nullable":true,"description":"Public author profile image URL."},"coverImage":{"type":"string","nullable":true,"description":"Public author cover image URL."},"website":{"type":"string","nullable":true,"description":"Public author website URL."},"location":{"type":"string","nullable":true,"description":"Public author location."},"url":{"type":"string","description":"Canonical public blog author URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","bio","profileImage","coverImage","website","location","url","postCount"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"filters":{"type":"object","additionalProperties":{"type":"string"}}},"required":["count"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"PublicAuthorResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Stable Ghost author identifier."},"slug":{"type":"string","description":"Public author slug."},"name":{"type":"string","description":"Public display name."},"bio":{"type":"string","nullable":true,"description":"Public author biography."},"profileImage":{"type":"string","nullable":true,"description":"Public author profile image URL."},"coverImage":{"type":"string","nullable":true,"description":"Public author cover image URL."},"website":{"type":"string","nullable":true,"description":"Public author website URL."},"location":{"type":"string","nullable":true,"description":"Public author location."},"url":{"type":"string","description":"Canonical public blog author URL."},"postCount":{"type":"integer","minimum":0,"nullable":true}},"required":["id","slug","name","bio","profileImage","coverImage","website","location","url","postCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}}