Sitemaps
Endpoints for managing company sitemaps and sitemap URLs.
Sitemaps
Create or Update Sitemap
POST /api/company/<company_slug>/sitemap/
Auth: full_access
Create a new sitemap or update an existing one.
Request body:
{
"url": "https://example.com/sitemap.xml",
"raw_xml": "<urlset>...</urlset>",
"date_parsed": "2025-01-15"
}
Required fields: url, raw_xml
date_parsed defaults to today if omitted.
Response: 201 Created for new sitemaps, 200 OK for updates.
List Sitemaps
GET /api/company/<company_slug>/sitemap/
Auth: read_only or full_access
Query parameters:
| Parameter | Type | Description |
|---|---|---|
year |
integer | Filter by year |
month |
integer | Filter by month |
url |
string | Filter by specific sitemap URL |
Fetch Sitemap from URL
POST /api/company/<company_slug>/sitemap/fetch/
Auth: full_access
Download a sitemap from a URL and save it. Handles gzip compression and large files (up to 500 MB).
Request body:
{
"url": "https://example.com/sitemap.xml",
"date_parsed": "2025-01-15"
}
Required fields: url
Response codes:
| Code | Meaning |
|---|---|
201 |
Sitemap created |
200 |
Existing sitemap updated |
413 |
File too large (> 500 MB) |
504 |
Timeout downloading sitemap |
502 |
Connection error |
List Sitemap URLs
GET /api/company/<company_slug>/sitemap-urls/
Auth: read_only or full_access
Returns all SitemapURL entries for the company.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
is_blog_sitemap |
string | Filter by blog sitemap status (true/false) |
List Sitemaps by Month
GET /api/company/<company_slug>/sitemap/<year>/<month>/
Auth: read_only or full_access
Returns sitemaps for a specific company, year, and month.