{"openapi":"3.1.0","info":{"title":"urlhub","version":"1.0.0","description":"Sets of links to share with one link or a QR code. To make a set for someone, no call is needed: give them the address /?urls=<links separated by spaces>&lang=en. These operations read sets as text and make short links. More: /llms.txt"},"servers":[{"url":"https://urlhub.cloud"}],"paths":{"/":{"get":{"operationId":"readLinks","summary":"Read links: the title, description and site of each (the first 50)","parameters":[{"name":"urls","in":"query","required":true,"description":"Links separated by spaces (or any text with links in it)","schema":{"type":"string"}},{"name":"format","in":"query","required":true,"description":"md for Markdown, json for JSON","schema":{"type":"string","enum":["md","json"]}},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","pl"]}}],"responses":{"200":{"description":"The set of links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Set"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"No links found"},"429":{"description":"Too many requests from this address; try again in a minute"}}}},"/c/{id}":{"get":{"operationId":"readShortLink","summary":"Read the set behind a short link (the first 50 links)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9A-Za-z]{8,16}$"}},{"name":"format","in":"query","required":true,"description":"md for Markdown, json for JSON","schema":{"type":"string","enum":["md","json"]}}],"responses":{"200":{"description":"The set of links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Set"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"No such set (never made, or deleted)"}}}},"/l/{id}":{"get":{"operationId":"readPublishedSet","summary":"Read a set published as a page with a title","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9A-Za-z]{8,16}$"}},{"name":"format","in":"query","required":true,"description":"md for Markdown, json for JSON","schema":{"type":"string","enum":["md","json"]}}],"responses":{"200":{"description":"The set of links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Set"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"No such set (never made, or deleted)"}}}},"/s/{lang}/{id}":{"get":{"operationId":"readFeaturedSet","summary":"Read a featured set (the list of them is in /llms.txt)","parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","enum":["en","pl"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"description":"md for Markdown, json for JSON","schema":{"type":"string","enum":["md","json"]}}],"responses":{"200":{"description":"The set of links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Set"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"No such set (never made, or deleted)"}}}},"/api/collections":{"post":{"operationId":"makeShortLink","summary":"Make a short link to a set; the same set always gets the same link, deleted after 90 days unopened","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["urls"],"properties":{"urls":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"string","format":"uri","pattern":"^https?://"}},"lang":{"type":"string","enum":["en","pl"]},"view":{"type":"string","enum":["table","tiles"]}}}}}},"responses":{"200":{"description":"The short link: open it at the site, path being /c/<id>","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"}}}}}},"400":{"description":"Not 1 to 200 http(s) links"},"429":{"description":"More than 10 short links a minute from this address"}}}}},"components":{"schemas":{"Set":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":["string","null"]},"page":{"type":"string","description":"The set in a browser"},"total":{"type":"integer","description":"Links in the set"},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"site":{"type":"string"},"type":{"type":["string","null"]},"error":{"type":"string","description":"Why the link could not be read"},"preview":{"type":"boolean","description":"false when the site does not let servers read it: the title then comes from its address"}}}}}}}}}