{"openapi":"3.1.0","info":{"title":"OpenTags API","version":"3.0.0","description":"Free HTTP API behind opentags.io. No authentication. Rate limited per IP. Docs: https://opentags.io/docs"},"servers":[{"url":"https://opentags.io"}],"externalDocs":{"url":"https://opentags.io/docs"},"paths":{"/api/tools/{tool}":{"post":{"summary":"Run a tool","operationId":"runTool","parameters":[{"name":"tool","in":"path","required":true,"schema":{"type":"string","enum":["citation-check","verify","page-to-markdown","ai-crawler-check","llms-txt","meta-writer","social-post"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page to check. Required for every tool except citation-check and verify."},"text":{"type":"string","maxLength":20000,"description":"Text to check. Required for citation-check and verify."},"mode":{"type":"string","enum":["page","site"],"description":"page-to-markdown only."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"page":{"type":"object"},"result":{"type":"object"}}},"sig":{"type":"string"}},"required":["data","sig"]}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}}}},"/api/meta-fetcher":{"get":{"summary":"Fetch a page's share metadata","operationId":"getPageMeta","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"sig":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}}}},"/api/url-shortener":{"post":{"summary":"Create a short link","operationId":"createShortLink","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"longUrl":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"image":{"type":"string"}},"required":["longUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"shortCode":{"type":"string"},"shortUrl":{"type":"string"},"longUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Look up a short link","operationId":"getShortLink","parameters":[{"name":"shortCode","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9]{5,8}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"shortCode":{"type":"string"},"shortUrl":{"type":"string"},"longUrl":{"type":"string"},"clicks":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"lastClicked":{"type":["string","null"],"format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/reports":{"post":{"summary":"Save a result as a shareable report","operationId":"createReport","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["share-preview","citation-check","verify","ai-crawler-check","meta-writer","social-post","llms-txt"]},"data":{"type":"object"},"sig":{"type":"string"}},"required":["kind","data","sig"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/md/{url}":{"get":{"summary":"Read a page as Markdown","operationId":"getMarkdown","parameters":[{"name":"url","in":"path","required":true,"schema":{"type":"string"},"description":"Full target URL, unencoded, e.g. https://example.com/page"}],"responses":{"200":{"description":"Markdown, or JSON when Accept: application/json","headers":{"X-Source-Url":{"schema":{"type":"string"}},"X-Token-Estimate":{"schema":{"type":"integer"}}},"content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"tokens":{"type":"integer"},"words":{"type":"integer"},"markdown":{"type":"string"}}}}}},"308":{"description":"Normalises https:/ in the path. Follow it."},"422":{"description":"Target page returned an HTTP error","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Rate limited","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"responses":{"Error":{"description":"Error with a human-readable message","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}