Search1API
Advanced

Sitemap

API endpoint for retrieving sitemap links from a website

POST
/sitemap

Authorization

AuthorizationRequiredBearer <token>

In: header

Request Body

application/jsonRequired

URL for sitemap crawling

urlRequiredstring

URL of the website to crawl sitemap

typestring

Type of sitemap crawl. 'sitemap' crawls only standard sitemap files, 'all' crawls all linked pages.

Value in: "sitemap" | "all"

Response Body

Successful Response

TypeScript Definitions

Use the response body type in TypeScript.

linksarray<string>

List of URLs found in the sitemap

curl -X POST "https://api.search1api.com/sitemap" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://search1api.com",
    "type": "sitemap"
  }'
{
  "links": [
    "string"
  ]
}