Free-Sitemaps

Documentation

Free Sitemaps has developed an API for extracting links from a website or generating a sitemap. The API has two endpoints and is designed for developers to easily integrate into their applications. The first endpoint provides the same functionality as our Sitemap Generator to generate a sitemap. The second endpoint can be used to extract links from a website if a sitemap is not needed.

Our API is free to use and only requires a free API key. In addition, it doesn't have any usage limits, allowing developers to make as many requests as they please. To get started, first generate a free API key using the API Key Generator. Next, take a look at our API Reference to familiarize yourself with the endpoints and the required parameters.

Quickstart Guide in Node JS

Free Sitemap's server-side API can be set up to run in any environment. All you need is an external library that allows you to make GET requests to our API. For example, if you are using Python, you would probably use the Requests Library. In this demonstration, we will be using Axios in Node JS to make our requests.

1. Generate your API Key

Generating your API key is by far the most crucial step in integrating our API. This step is free and only requires a valid email address. Using our API Key Generator requires you to enter your email address which is where you will receive your free API key.

2. Sending Requests to the API

Sending requests to the API requires very little work. All you need is your API key and the domain of the website you would like to crawl or generate a sitemap for. In the example below, we will be sending a request to generate a sitemap for example.org.

const axios = require("axios")

axios.get("https://free-sitemaps.com/v1/api/sitemap?key=<your_api_key>&domain=example.org").then(response => {
  const data = response.data
  console.log(data)
})

In the example above, we are sending a request to the https://free-sitemaps.com/api/sitemap endpoint which is used to generate a sitemap. This specific endpoint returns a URL which is the link to your sitemap file. It is worth mentioning that <your_api_key> is to be replaced with the actual API key that you generated. For more information about requests, endpoints and responses, visit our API Reference.