SEO for SaaS
Start
API reference

Sitemap

GET /content/sitemap: every published article as a ready sitemap entry, with a lastmod date Google can rely on.

text
GET https://api.seoforsaas.dev/api/v1/projects/{projectId}/content/sitemap

Every published article as { url, lastModified }, newest change first. The shape is what sitemap generators take: Next.js returns it from app/sitemap.ts as is. One small request, no article bodies, and the same content key as every other read.

curl "https://api.seoforsaas.dev/api/v1/projects/YOUR_PROJECT_ID/content/sitemap" \  -H "Authorization: Bearer $SEOFORSAAS_CONTENT_KEY"

Response

json
{  "success": true,  "data": [    {      "url": "https://example.com/blog/how-google-decides-what-to-show",      "lastModified": "2026-09-28T10:14:03.000Z"    },    {      "url": "https://example.com/blog/how-to-write-a-sitemap",      "lastModified": "2026-09-12T08:00:00.000Z"    }  ]}
Field
urlAbsolute: your website URL plus the article's seo.canonicalPath, so it's always the URL the page names as canonical.
lastModifiedISO 8601, the article's updatedAt.

Why the date matters

Google reads a sitemap's lastmod to decide what to recrawl, and uses it only "if it's consistently and verifiably accurate". Google may stop trusting the dates of a site that bumps them without changing the page, so a sitemap stamped with every build's date doesn't help.

lastModified moves only when a reader would see the change:

Moves itLeaves it
PublishingA fact check that changed no text
A rewrite, ours or one you ask for, including one you approve from reviewA rewrite still waiting in your review queue
A link we added to it, pointing at a newer article of yoursRepublishing an article that is already live
Internal changes that readers can't see

Google counts a changed link as a significant change, so a link we add moves the date on purpose. An unpublished article leaves the list.

Using it

  • Next.js: the guide's sitemap spreads the entries next to your own pages.

  • Astro: the guide's config gives each article the date through @astrojs/sitemap's serialize.

  • Anything else: write one <url> per entry, <loc> from url and <lastmod> from lastModified, as the Python example does.

The URLs are built on the website URL you added the site with (shown in Settings → Site and URLs). If you use them as they are (Next.js, the Python example), that must be the origin your pages use for canonicals, or the sitemap would list URLs your pages don't claim. The Astro setup matches dates by path, so it isn't affected.

Submit the sitemap once in Google Search Console (Sitemaps → Add a new sitemap). Google rereads it on its own from then on; there's no ping to send. A sitemap holds up to 50,000 URLs, and so does this list.