{"info":{"_postman_id":"982a3e50-e959-442b-ab97-448b3381faa1","name":"AmputatorBot API: Remove AMP from your URLs","description":"<html><head></head><body><h4 id=\"amputatorbot\">AmputatorBot</h4>\n<p><a href=\"https://github.com/jvdburgh/AmputatorBot\">AmputatorBot</a> is a highly specialised <a href=\"https://www.reddit.com/user/AmputatorBot\">Reddit</a> bot that automatically replies to comments and submissions (posts) containing AMP URLs with the canonical link(s). It's also available as a <a href=\"https://www.amputatorbot.com/\">website</a> and as a free and publicly available API, of which the latter is documented here. Info on rate-limits: <a href=\"https://www.reddit.com/r/AmputatorBot/comments/rrc8wk/comment/hqg9w5p/\">see here</a>.</p>\n<h5 id=\"faq-about--why\">FAQ, About &amp; Why</h5>\n<p>A Reddit post in which I explain why I made AmputatorBot, how it functions, how you can contact me, etc: <a href=\"https://www.reddit.com/r/AmputatorBot/s/cI1OpBtRP1\">https://www.reddit.com/r/AmputatorBot/s/cI1OpBtRP1</a>.</p>\n<h5 id=\"open-sourced-on-github\">Open Sourced on GitHub</h5>\n<p>Prerry much everything (except for the website and database used for caching), has been open sourced on GitHub: <a href=\"https://github.com/jvdburgh/AmputatorBot\">https://github.com/jvdburgh/AmputatorBot</a>.</p>\n<h5 id=\"contribute\">Contribute</h5>\n<p>You can contribute by giving feedback or making changes: <a href=\"https://www.reddit.com/r/AmputatorBot/submit\">post on r/AmputatorBot</a>, <a href=\"https://github.com/jvdburgh/AmputatorBot/issues\">fill an issue or make a pull request on GitHub</a>.</p>\n<h5 id=\"sponsor\">Sponsor</h5>\n<p>Our server for the bot, website, and API costs about €10 ($12) per month. If you support AmputatorBot's mission and can chip in, any donation would be a huge help. Every bit goes straight into server expenses. Thanks a bunch!</p>\n<blockquote>\n<p><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=EU6ZFKTVT9VH2\">https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=EU6ZFKTVT9VH2</a> </p>\n</blockquote>\n<p>Alternatively, consider supporting our friends in Ukraine who could greatly benefit from your help:</p>\n<blockquote>\n<p><a href=\"https://savelife.in.ua/en/donate-en/\">https://savelife.in.ua/en/donate-en/</a> </p>\n</blockquote>\n<blockquote>\n<p><a href=\"https://u24.gov.ua/\">https://u24.gov.ua/</a> </p>\n</blockquote>\n<p>Thank you!</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12422626","collectionId":"982a3e50-e959-442b-ab97-448b3381faa1","publishedId":"UVC3n93T","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"222222","highlight":"005af0"},"publishDate":"2021-11-08T15:16:22.000Z"},"item":[{"name":"Convert: Returns an array of Links (canonicals, origin, etc.)","id":"e43b7772-0d6d-4ecc-920c-4a0f3f1f4134","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","description":"<p>This is the main and only endpoint, used to convert (text with) AMP URL(s) to canonicals. It returns an array of Link objects, which contains the following objects:</p>\n<ul>\n<li><code>AmpCanonical</code>: The suggested canonical <em>AMP</em> URL and meta-info. <code>null</code> unless no <code>Canonical</code> was found.</li>\n<li><code>Canonical</code>: The suggested canonical URL and meta-info, no longer AMP. <code>null</code> if only an <code>AmpCanonical</code> was found.</li>\n<li><code>Canonicals</code>: An array of all found canonicals (both AMP and full canonicals), sorted by <code>url_similarity</code>. Will never be <code>null</code>.  If no canonicals were found, an error message is returned instead.</li>\n<li><code>Origin</code>: Meta info on the submitted URL.</li>\n</ul>\n<p>Example responses can be found in the grey box. Note that the <code>success</code> example <strong>contains an error</strong>. The first object in <code>Canonicals</code> should have the same contents as <code>AmpCanonical</code>.</p>\n","urlObject":{"path":["convert"],"host":["https://www.amputatorbot.com/api/v1"],"query":[{"description":{"content":"<p>Whether to use the canonical-finding method guess-and-check. While prone to errors, it's handy as a last resort. It essentially guesses canonical links and tests to see if they could be correct.</p>\n","type":"text/plain"},"key":"gac","value":"true"},{"description":{"content":"<p>The maximum number of refferals to canonicals to follow (max-depth). AmputatorBot keeps scraping referred canonical pages untill the max-depth has been reached.</p>\n","type":"text/plain"},"key":"md","value":"3"},{"description":{"content":"<p>(Required) The query; (text with) one or more AMP URLs (preferably separated by \";\"). Must be the last parameter specified.</p>\n","type":"text/plain"},"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}],"variable":[]}},"response":[{"id":"9226bac0-587b-40e9-937f-832741551bff","name":"Success: An array of Links with canonicals are returned","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","host":["https://www.amputatorbot.com/api/v1"],"path":["convert"],"query":[{"key":"gac","value":"true"},{"key":"md","value":"3"},{"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n {\n  \"amp_canonical\": {\n   \"domain\": \"ampproject\",\n   \"is_alt\": false,\n   \"is_amp\": true,\n   \"is_cached\": true,\n   \"is_valid\": true,\n   \"type\": \"CANURL\",\n   \"url\": \"https://electrek-co.cdn.ampproject.org/c/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/?usqp=mq331AQIKAGwASCAAgM%3D\",\n   \"url_similarity\": 0.7480314960629921\n  },\n  \"canonical\": {\n   \"domain\": \"electrek\",\n   \"is_alt\": false,\n   \"is_amp\": false,\n   \"is_cached\": null,\n   \"is_valid\": true,\n   \"type\": \"REL\",\n   \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n   \"url_similarity\": 0.8900523560209425\n  },\n  \"canonicals\": [\n   {\n    \"domain\": \"electrek\",\n    \"is_alt\": false,\n    \"is_amp\": false,\n    \"is_cached\": null,\n    \"is_valid\": true,\n    \"type\": \"REL\",\n    \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n    \"url_similarity\": 0.8900523560209425\n   },\n   {\n    \"domain\": \"electrek\",\n    \"is_alt\": false,\n    \"is_amp\": false,\n    \"is_cached\": null,\n    \"is_valid\": true,\n    \"type\": \"REL\",\n    \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n    \"url_similarity\": 0.8900523560209425\n   }\n  ],\n  \"origin\": {\n   \"domain\": \"google\",\n   \"is_amp\": true,\n   \"is_cached\": true,\n   \"is_valid\": true,\n   \"url\": \"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/\"\n  }\n },\n {\n  \"amp_canonical\": {\n   \"domain\": \"ampproject\",\n   \"is_alt\": false,\n   \"is_amp\": true,\n   \"is_cached\": true,\n   \"is_valid\": true,\n   \"type\": \"GOOGLE_JS_REDIRECT\",\n   \"url\": \"https://electrek-co.cdn.ampproject.org/c/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/?usqp=mq331AQIKAGwASCAAgM%3D\",\n   \"url_similarity\": 0.7480314960629921\n  },\n  \"canonical\": {\n   \"domain\": \"electrek\",\n   \"is_alt\": false,\n   \"is_amp\": false,\n   \"is_cached\": null,\n   \"is_valid\": true,\n   \"type\": \"REL\",\n   \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n   \"url_similarity\": 0.8900523560209425\n  },\n  \"canonicals\": [\n   {\n    \"domain\": \"electrek\",\n    \"is_alt\": false,\n    \"is_amp\": false,\n    \"is_cached\": null,\n    \"is_valid\": true,\n    \"type\": \"REL\",\n    \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n    \"url_similarity\": 0.8900523560209425\n   },\n   {\n    \"domain\": \"electrek\",\n    \"is_alt\": false,\n    \"is_amp\": false,\n    \"is_cached\": null,\n    \"is_valid\": true,\n    \"type\": \"REL\",\n    \"url\": \"https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/\",\n    \"url_similarity\": 0.8900523560209425\n   }\n  ],\n  \"origin\": {\n   \"domain\": \"google\",\n   \"is_amp\": true,\n   \"is_cached\": true,\n   \"is_valid\": true,\n   \"url\": \"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/\"\n  }\n }\n]"},{"id":"c7b73bf0-3541-4af0-af48-a82ea555698d","name":"Error: Entry doesn't meet criteria (no AMP link detected).","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","host":["https://www.amputatorbot.com/api/v1"],"path":["convert"],"query":[{"key":"gac","value":"true"},{"key":"md","value":"3"},{"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}]}},"status":"Not Acceptable","code":406,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"error_message\": \"Error: Entry doesn't meet criteria (no AMP link detected)\",\n \"result_code\": \"error_no_amp\"\n}"},{"id":"404311f8-0e72-4ce1-b794-024cc61439f2","name":"Error: An unknown error was raised.","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","host":["https://www.amputatorbot.com/api/v1"],"path":["convert"],"query":[{"key":"gac","value":"true"},{"key":"md","value":"3"},{"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"error_message\": \"Error: An unknown error was raised\",\n \"result_code\": \"error_unknown\"\n}"},{"id":"5adc2e56-465f-419a-8211-2da7b80dc6e1","name":"Error: No canonicals found.","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","host":["https://www.amputatorbot.com/api/v1"],"path":["convert"],"query":[{"key":"gac","value":"true"},{"key":"md","value":"3"},{"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}]}},"code":560,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"error_message\": \"Error: No canonicals found\",\n \"result_code\": \"error_no_canonicals\"\n}"},{"id":"8f4e12c3-541e-4ec4-9d8e-5b7edeeb94a0","name":"Error: No canonicals found, this domain is known to be problematic.","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/","host":["https://www.amputatorbot.com/api/v1"],"path":["convert"],"query":[{"key":"gac","value":"true"},{"key":"md","value":"3"},{"key":"q","value":"https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/"}]}},"code":561,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"error_message\": \"Error: No canonicals found, this domain is known to be problematic\",\n \"result_code\": \"error_problematic_domain\"\n}"}],"_postman_id":"e43b7772-0d6d-4ecc-920c-4a0f3f1f4134"}],"variable":[{"id":"aec911f4-1f9e-401b-8f4d-6196b1658a5f","key":"baseUrl","value":"https://www.amputatorbot.com/api/v1","type":"string"}]}