Sitemap Generator
Extract links from web pages and generate XML sitemaps from URL lists.
Endpoint
POST https://www.acrewity.com/api/services/execute
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
n8n Integration
This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity
Operations
Extract Links
Extract all hyperlinks from a web page
Operation ID: extract_links
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string | Yes | - | URL of the page to extract links from |
same_domain_only |
boolean | No | true |
Only return links from the same domain |
limit |
number | No | 100 |
Maximum number of links to return (max: 100) |
Example Request
Extract Links from Homepage:
{
"service": "sitemap-generator",
"operation": "extract_links",
"parameters": {
"url": "https://example.com",
"same_domain_only": true,
"limit": 50
}
}
Extract All Links (Including External):
{
"service": "sitemap-generator",
"operation": "extract_links",
"parameters": {
"url": "https://blog.example.com/articles",
"same_domain_only": false,
"limit": 100
}
}
Example Response (extract_links)
{
"success": true,
"result": {
"data": {
"url": "https://example.com",
"domain": "example.com",
"links": [
"https://example.com/about",
"https://example.com/products",
"https://example.com/contact",
"https://example.com/blog",
"https://example.com/pricing"
],
"count": 5,
"same_domain_only": true,
"limit": 50
}
},
"credits_used": 1
}
Generate Sitemap
Generate an XML sitemap from a list of URLs
Operation ID: generate_sitemap
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
urls |
array | Yes | - | Array of URLs to include in the sitemap (max: 50,000) |
changefreq |
string | No | weekly |
Change frequency: always, hourly, daily, weekly, monthly, yearly, never |
priority |
number | No | 0.5 |
Default priority for all URLs (0.0-1.0) |
include_lastmod |
boolean | No | true |
Include last modification date |
Example Request
Generate Basic Sitemap:
{
"service": "sitemap-generator",
"operation": "generate_sitemap",
"parameters": {
"urls": [
"https://example.com/",
"https://example.com/about",
"https://example.com/products",
"https://example.com/contact"
],
"changefreq": "weekly",
"priority": 0.8
}
}
Generate Sitemap for Blog:
{
"service": "sitemap-generator",
"operation": "generate_sitemap",
"parameters": {
"urls": [
"https://blog.example.com/",
"https://blog.example.com/post-1",
"https://blog.example.com/post-2",
"https://blog.example.com/post-3"
],
"changefreq": "daily",
"priority": 0.7,
"include_lastmod": true
}
}
Example Response (generate_sitemap)
{
"success": true,
"result": {
"data": {
"sitemapXml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url>\n <loc>https://example.com/</loc>\n <lastmod>2024-12-30</lastmod>\n <changefreq>weekly</changefreq>\n <priority>0.8</priority>\n </url>\n ...\n</urlset>",
"content": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4...",
"filename": "sitemap-1735567890123.xml",
"contentType": "application/xml",
"size": 892,
"downloadUrl": "/api/downloads/sitemap-1735567890123.xml",
"downloadable": true,
"urlCount": 4,
"changefreq": "weekly",
"priority": 0.8
}
},
"credits_used": 1
}
More Examples
See Utilities & Helpers Examples for complete workflow examples including SEO automation, site auditing, and search engine submission.