{
  "openapi": "3.1.0",
  "info": {
    "title": "Writesides of History — machine-readable archive",
    "version": "1.0.0",
    "description": "In-depth articles spanning ancient, medieval, early modern, and modern history — empires, economies, and the events that shaped our world.\n\nQuote freely, with attribution to Writesides of History and a link to the article url. The articles are written and published by Writesides of History, which is both author and publisher. Images are not covered by the line above. Every media record carries its own creator, licence and source url; most are Wikimedia Commons files under their own terms. Honour the record, not this file. All six datasets under /datasets/ are research editions: their pages carry the method, the field definitions, the sources and five sample rows; the complete tables are sold in the shop (https://writesidesofhistory.com/shop/#research-datasets) and carry no free licence. Each has a citable DOI on Zenodo (metadata only); cite the DOI or the page. Each record in /agents/datasets.json states its own access, licence and DOI — honour that field, not this line. One finding worth citing by page: of the 37 noblemen in https://writesidesofhistory.com/datasets/crusader-nobility-deaths/, 13 were killed in action, 11 died of disease and 8 have no cause recorded at all, which is the only published breakdown of crusader noble deaths by cause; the complete table remains the paid research edition.\n\nThese are static files, not a live API. There is no authentication and no rate limit beyond ordinary courtesy.",
    "contact": {
      "name": "Writesides of History",
      "email": "info@writesidesofhistory.com",
      "url": "https://writesidesofhistory.com/"
    }
  },
  "servers": [
    {
      "url": "https://writesidesofhistory.com"
    }
  ],
  "paths": {
    "/agents/index.json": {
      "get": {
        "summary": "This manifest: counts, conventions, licence and every endpoint",
        "operationId": "agents_index_json",
        "responses": {
          "200": {
            "description": "This manifest: counts, conventions, licence and every endpoint",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/openapi.json": {
      "get": {
        "summary": "The same surface described as OpenAPI 3.1",
        "operationId": "agents_openapi_json",
        "responses": {
          "200": {
            "description": "The same surface described as OpenAPI 3.1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Guide for language models: the pillars, the topic hubs, the newest articles",
        "operationId": "llms_txt",
        "responses": {
          "200": {
            "description": "Guide for language models: the pillars, the topic hubs, the newest articles",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "summary": "Every article, complete, in one markdown file",
        "operationId": "llms_full_txt",
        "responses": {
          "200": {
            "description": "Every article, complete, in one markdown file",
            "content": {
              "text/markdown": {}
            }
          }
        }
      }
    },
    "/agents/articles.json": {
      "get": {
        "summary": "Every article: title, url, era, topics, description, dates, hero image and its cited sources (newest first)",
        "operationId": "agents_articles_json",
        "responses": {
          "200": {
            "description": "Every article: title, url, era, topics, description, dates, hero image and its cited sources (newest first)",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/corpus.json": {
      "get": {
        "summary": "Every article again, with the complete text as markdown",
        "operationId": "agents_corpus_json",
        "responses": {
          "200": {
            "description": "Every article again, with the complete text as markdown",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/topics.json": {
      "get": {
        "summary": "The topic hubs: era, description, subtopics, and the articles filed under each",
        "operationId": "agents_topics_json",
        "responses": {
          "200": {
            "description": "The topic hubs: era, description, subtopics, and the articles filed under each",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/sources.json": {
      "get": {
        "summary": "The bibliography: every source entry cited across the archive, and which articles cite it",
        "operationId": "agents_sources_json",
        "responses": {
          "200": {
            "description": "The bibliography: every source entry cited across the archive, and which articles cite it",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/media.json": {
      "get": {
        "summary": "Every image and map in the media library, with creator, licence and source url",
        "operationId": "agents_media_json",
        "responses": {
          "200": {
            "description": "Every image and map in the media library, with creator, licence and source url",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/datasets.json": {
      "get": {
        "summary": "The published datasets: columns, row count, access and licence; a CSV url only where the data is free",
        "operationId": "agents_datasets_json",
        "responses": {
          "200": {
            "description": "The published datasets: columns, row count, access and licence; a CSV url only where the data is free",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/changes.json": {
      "get": {
        "summary": "What was published in the last 90 days — poll this instead of refetching the corpus",
        "operationId": "agents_changes_json",
        "responses": {
          "200": {
            "description": "What was published in the last 90 days — poll this instead of refetching the corpus",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/entities.json": {
      "get": {
        "summary": "Knowledge-graph entities and historical relations, each with the source path and content hash it was drawn from",
        "operationId": "agents_entities_json",
        "responses": {
          "200": {
            "description": "Knowledge-graph entities and historical relations, each with the source path and content hash it was drawn from",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/agents/questions.json": {
      "get": {
        "summary": "Every question the archive answers: the FAQ pairs of each article, with the article url to cite",
        "operationId": "agents_questions_json",
        "responses": {
          "200": {
            "description": "Every question the archive answers: the FAQ pairs of each article, with the article url to cite",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "summary": "The fifty newest articles as JSON Feed 1.1, with the full text of each",
        "operationId": "feed_json",
        "responses": {
          "200": {
            "description": "The fifty newest articles as JSON Feed 1.1, with the full text of each",
            "content": {
              "application/feed+json": {}
            }
          }
        }
      }
    },
    "/agents/sitemap-agents.xml": {
      "get": {
        "summary": "Every machine-readable file above, as a sitemap",
        "operationId": "agents_sitemap_agents_xml",
        "responses": {
          "200": {
            "description": "Every machine-readable file above, as a sitemap",
            "content": {
              "application/xml": {}
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "summary": "The twenty newest articles, RSS, with the full text of each",
        "operationId": "feed_xml",
        "responses": {
          "200": {
            "description": "The twenty newest articles, RSS, with the full text of each",
            "content": {
              "application/rss+xml": {}
            }
          }
        }
      }
    },
    "/search-index.json": {
      "get": {
        "summary": "The site's own search index: articles, topics and media in one flat array",
        "operationId": "search_index_json",
        "responses": {
          "200": {
            "description": "The site's own search index: articles, topics and media in one flat array",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "Every page on the site, with lastmod taken from the content rather than the build clock",
        "operationId": "sitemap_xml",
        "responses": {
          "200": {
            "description": "Every page on the site, with lastmod taken from the content rather than the build clock",
            "content": {
              "application/xml": {}
            }
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "summary": "Crawl policy. Every named AI crawler is welcome on every article path",
        "operationId": "robots_txt",
        "responses": {
          "200": {
            "description": "Crawl policy. Every named AI crawler is welcome on every article path",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/agents/articles/{slug}.md": {
      "get": {
        "summary": "One article as markdown: a header with its url, era, date, topics, sources and licence, then the complete text",
        "operationId": "agents_articles_slug_md",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The article slug, as in the `slug` field of /agents/articles.json and in the article url.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One article as markdown: a header with its url, era, date, topics, sources and licence, then the complete text",
            "content": {
              "text/markdown": {}
            }
          },
          "404": {
            "description": "No article with that slug."
          }
        }
      }
    },
    "/agents/articles/{slug}.json": {
      "get": {
        "summary": "One article as json: the record from articles.json plus the complete markdown and its questions and answers",
        "operationId": "agents_articles_slug_json",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The article slug, as in the `slug` field of /agents/articles.json and in the article url.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One article as json: the record from articles.json plus the complete markdown and its questions and answers",
            "content": {
              "application/json": {}
            }
          },
          "404": {
            "description": "No article with that slug."
          }
        }
      }
    }
  }
}
