Skip to main content
GET
/
web
/
scrape
/
sitemap
JavaScript
import BrandDev from 'brand.dev';

const client = new BrandDev({
  apiKey: process.env['BRAND_DEV_API_KEY'], // This is the default and can be omitted
});

const response = await client.brand.webScrapeSitemap({ domain: 'domain' });

console.log(response.domain);
{
  "success": true,
  "domain": "<string>",
  "urls": [
    "<string>"
  ],
  "meta": {
    "sitemapsDiscovered": 123,
    "sitemapsFetched": 123,
    "sitemapsSkipped": 123,
    "errors": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

domain
string
required

Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be automatically normalized and validated.

Response

Successful response

success
enum<boolean>
required

Indicates success

Available options:
true
domain
string
required

The normalized domain that was crawled

urls
string[]
required

Array of discovered page URLs from the sitemap (max 500)

meta
object
required

Metadata about the sitemap crawl operation