
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
An NPM package to fetch the canonical links from websites just enter the link and get the canonical link,
amputator?A lot of links especially AMP (Accelerated Mobile Pages) links are taking over the internet. For example, Google mobile Search’s Top Stories carousel has a premium position above of all other results, which is only accessible for cached AMP pages. This has the effect of further reinforcing Google’s dominance of the Web. (Source: Amputatorbot). This package will help you get the canonical links without being dependent on a website.
var Amp = require('amputator');
(async function() {
var amp = new Amp();
var canonical = await amp.canon("https://www.google.com/amp/s/electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/amp/");
console.log(canonical);
})();
Which gives the following result,
{
"success": true,
"title": "Tesla's new Model 3 assembly line inside a 'tent' is 'way better' and cheaper than other line, says Elon Musk - Electrek",
"canonical": 'https://electrek.co/2018/06/19/tesla-model-3-assembly-line-inside-tent-elon-musk/'
}
npm i amputator --save
Add a pull request or raise an issue if you wish to contribute.
This project is licensed under GNU General Public License, See LICENSE for more information
FAQs
An NPM package to find canonical links of websites
We found that amputator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.