How to Get the Sitemap Link of an HTML Document in JavaScript

In today’s tutorial, we’re going to do you a favor; instead of spending unnecessary time attempting to locate the sitemap link URL of an HTML document, we are going to demonstrate how you can use an API in JavaScript to automate the link retrieval.

Our first step is to install the jQuery library:

bower install jquery

Now, we can call the function with the following example code:

var settings = {
"url": "",
"method": "POST",
"timeout": 0,
"headers": {
"inputFileUrl": "<string>",
"Content-Type": "application/x-www-form-urlencoded",
"data": {
"inputFile": "<binary>"
$.ajax(settings).done(function (response) {

And we’re done! Simple.