{
    "openapi": "3.1.0",
    "info": {
        "title": "Sam's Block content API",
        "version": "1.0.0",
        "x-deprecation-policy": "https://www.samsblock.com/developers/#versioning-and-deprecation-policy",
        "description": "Read-only API for Sam Michelson's blog samsblock.com: search, list and read posts, pages and projects. No authentication. Rate limit 120 requests per minute per IP, reported in RateLimit headers. Versioned in the URL; retiring endpoints send Deprecation and Sunset headers at least 90 days ahead.",
        "contact": {
            "name": "Sam Michelson",
            "url": "https://www.samsblock.com/contact/"
        },
        "license": {
            "name": "All rights reserved; quoting with a link is welcome",
            "url": "https://www.samsblock.com/"
        }
    },
    "externalDocs": {
        "url": "https://www.samsblock.com/developers/",
        "description": "Developer docs"
    },
    "servers": [
        {
            "url": "https://www.samsblock.com/api/v1"
        }
    ],
    "security": [],
    "tags": [
        {
            "name": "content",
            "description": "Posts, pages and projects"
        }
    ],
    "paths": {
        "/search": {
            "get": {
                "operationId": "searchContent",
                "summary": "Search posts, pages and projects",
                "description": "Ranked keyword search over titles and text. Use it to find what Sam Michelson has written about a topic.",
                "tags": [
                    "content"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "Search words.",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Results per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Opaque cursor from next_cursor.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one content type.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "post",
                                "page",
                                "project"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "headers": {
                            "RateLimit-Limit": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests allowed per window."
                            },
                            "RateLimit-Remaining": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests left in this window."
                            },
                            "RateLimit-Reset": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds until the window resets."
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "has_more",
                                        "next_cursor"
                                    ],
                                    "properties": {
                                        "query": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "slug",
                                                    "title",
                                                    "url",
                                                    "markdown_url"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "WordPress ID."
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "post",
                                                            "page",
                                                            "project"
                                                        ]
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Page URL to cite."
                                                    },
                                                    "markdown_url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Markdown version of the page."
                                                    },
                                                    "summary": {
                                                        "type": "string"
                                                    },
                                                    "published": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "modified": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "image": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    },
                                                    "categories": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "description": "Search relevance from 0 to 1 (search only)."
                                                    }
                                                }
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Pass as cursor to get the next page."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "searchContentPost",
                "summary": "Search with a JSON body",
                "description": "Same as GET /search with parameters in a JSON body. Safe to retry with an Idempotency-Key header.",
                "tags": [
                    "content"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "Unique key so a retried request returns the same result.",
                        "schema": {
                            "type": "string",
                            "maxLength": 128
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "q"
                                ],
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "description": "Search words."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "cursor": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "post",
                                            "page",
                                            "project"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "headers": {
                            "RateLimit-Limit": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests allowed per window."
                            },
                            "RateLimit-Remaining": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests left in this window."
                            },
                            "RateLimit-Reset": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds until the window resets."
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "has_more",
                                        "next_cursor"
                                    ],
                                    "properties": {
                                        "query": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "slug",
                                                    "title",
                                                    "url",
                                                    "markdown_url"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "WordPress ID."
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "post",
                                                            "page",
                                                            "project"
                                                        ]
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Page URL to cite."
                                                    },
                                                    "markdown_url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Markdown version of the page."
                                                    },
                                                    "summary": {
                                                        "type": "string"
                                                    },
                                                    "published": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "modified": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "image": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    },
                                                    "categories": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "description": "Search relevance from 0 to 1 (search only)."
                                                    }
                                                }
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Pass as cursor to get the next page."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/posts": {
            "get": {
                "operationId": "listContent",
                "summary": "List published content, newest first",
                "description": "Lists posts, pages and projects with cursor pagination.",
                "tags": [
                    "content"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Limit to one content type.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "post",
                                "page",
                                "project"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Results per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Opaque cursor from next_cursor.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "headers": {
                            "RateLimit-Limit": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests allowed per window."
                            },
                            "RateLimit-Remaining": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests left in this window."
                            },
                            "RateLimit-Reset": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds until the window resets."
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "has_more",
                                        "next_cursor"
                                    ],
                                    "properties": {
                                        "query": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "slug",
                                                    "title",
                                                    "url",
                                                    "markdown_url"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "WordPress ID."
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "post",
                                                            "page",
                                                            "project"
                                                        ]
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Page URL to cite."
                                                    },
                                                    "markdown_url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Markdown version of the page."
                                                    },
                                                    "summary": {
                                                        "type": "string"
                                                    },
                                                    "published": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "modified": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "image": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    },
                                                    "categories": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "description": "Search relevance from 0 to 1 (search only)."
                                                    }
                                                }
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Pass as cursor to get the next page."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/posts/{slug}": {
            "get": {
                "operationId": "getContent",
                "summary": "Read one post, page or project",
                "description": "Returns one item with its full text as Markdown.",
                "tags": [
                    "content"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "URL slug or numeric ID.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The item.",
                        "headers": {
                            "RateLimit-Limit": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests allowed per window."
                            },
                            "RateLimit-Remaining": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests left in this window."
                            },
                            "RateLimit-Reset": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds until the window resets."
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data"
                                    ],
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "id",
                                                        "type",
                                                        "slug",
                                                        "title",
                                                        "url",
                                                        "markdown_url"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "description": "WordPress ID."
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "enum": [
                                                                "post",
                                                                "page",
                                                                "project"
                                                            ]
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "title": {
                                                            "type": "string"
                                                        },
                                                        "url": {
                                                            "type": "string",
                                                            "format": "uri",
                                                            "description": "Page URL to cite."
                                                        },
                                                        "markdown_url": {
                                                            "type": "string",
                                                            "format": "uri",
                                                            "description": "Markdown version of the page."
                                                        },
                                                        "summary": {
                                                            "type": "string"
                                                        },
                                                        "published": {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        "modified": {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        "image": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "format": "uri"
                                                        },
                                                        "categories": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "score": {
                                                            "type": "number",
                                                            "description": "Search relevance from 0 to 1 (search only)."
                                                        }
                                                    }
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "markdown": {
                                                            "type": "string",
                                                            "description": "Full page text as Markdown."
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects": {
            "get": {
                "operationId": "listProjects",
                "summary": "List Sam's side projects",
                "description": "Apps, videos, data visualizations and small sites, newest first.",
                "tags": [
                    "content"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Results per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "Opaque cursor from next_cursor.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of results.",
                        "headers": {
                            "RateLimit-Limit": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests allowed per window."
                            },
                            "RateLimit-Remaining": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Requests left in this window."
                            },
                            "RateLimit-Reset": {
                                "schema": {
                                    "type": "integer"
                                },
                                "description": "Seconds until the window resets."
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "has_more",
                                        "next_cursor"
                                    ],
                                    "properties": {
                                        "query": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "slug",
                                                    "title",
                                                    "url",
                                                    "markdown_url"
                                                ],
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "WordPress ID."
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "post",
                                                            "page",
                                                            "project"
                                                        ]
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Page URL to cite."
                                                    },
                                                    "markdown_url": {
                                                        "type": "string",
                                                        "format": "uri",
                                                        "description": "Markdown version of the page."
                                                    },
                                                    "summary": {
                                                        "type": "string"
                                                    },
                                                    "published": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "modified": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                    },
                                                    "image": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    },
                                                    "categories": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "score": {
                                                        "type": "number",
                                                        "description": "Search relevance from 0 to 1 (search only)."
                                                    }
                                                }
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Pass as cursor to get the next page."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error with a machine-readable code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Item": {
                "type": "object",
                "required": [
                    "id",
                    "type",
                    "slug",
                    "title",
                    "url",
                    "markdown_url"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "WordPress ID."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "post",
                            "page",
                            "project"
                        ]
                    },
                    "slug": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Page URL to cite."
                    },
                    "markdown_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Markdown version of the page."
                    },
                    "summary": {
                        "type": "string"
                    },
                    "published": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "image": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "score": {
                        "type": "number",
                        "description": "Search relevance from 0 to 1 (search only)."
                    }
                }
            },
            "ItemList": {
                "type": "object",
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "properties": {
                    "query": {
                        "type": "string"
                    },
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Item"
                        }
                    },
                    "total": {
                        "type": "integer"
                    },
                    "has_more": {
                        "type": "boolean"
                    },
                    "next_cursor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Pass as cursor to get the next page."
                    }
                }
            },
            "ItemResponse": {
                "type": "object",
                "required": [
                    "data"
                ],
                "properties": {
                    "data": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Item"
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "markdown": {
                                        "type": "string",
                                        "description": "Full page text as Markdown."
                                    }
                                }
                            }
                        ]
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message",
                            "status"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "description": "Machine-readable error code."
                            },
                            "message": {
                                "type": "string"
                            },
                            "status": {
                                "type": "integer"
                            },
                            "docs": {
                                "type": "string",
                                "format": "uri"
                            }
                        }
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "Error with a machine-readable code.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        }
    }
}