Skip to main content
POST
https://api.whizo.ai
/
v1
/
map
Map API
curl --request POST \
  --url https://api.whizo.ai/v1/map \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "options": {
    "options.maxDepth": 123,
    "options.maxPages": 123,
    "options.sameDomain": true,
    "options.includePatterns": [
      {}
    ],
    "options.excludePatterns": [
      {}
    ],
    "options.respectRobots": true,
    "options.search": "<string>",
    "options.timeout": 123,
    "options.engine": "<string>",
    "options.includeMetadata": true,
    "options.metadataLimit": 123
  }
}
'
{
  "success": true,
  "data": {
    "domain": "example.com",
    "rootUrl": "https://example.com",
    "totalPages": 45,
    "maxDepthReached": 2,
    "urls": [
      {
        "url": "https://example.com",
        "depth": 0,
        "statusCode": 200,
        "title": "Example Domain - Home",
        "discoveredAt": "2025-01-15T10:00:00Z",
        "parentUrl": null
      },
      {
        "url": "https://example.com/about",
        "depth": 1,
        "statusCode": 200,
        "title": "About Us",
        "discoveredAt": "2025-01-15T10:00:05Z",
        "parentUrl": "https://example.com"
      },
      {
        "url": "https://example.com/contact",
        "depth": 1,
        "statusCode": 200,
        "title": "Contact Us",
        "discoveredAt": "2025-01-15T10:00:06Z",
        "parentUrl": "https://example.com"
      }
    ],
    "summary": {
      "totalUrls": 45,
      "successfulUrls": 42,
      "failedUrls": 2,
      "redirectUrls": 1,
      "mappingTime": 12.5,
      "creditsUsed": 5
    }
  }
}
The Map API discovers all accessible URLs within a website, creating a comprehensive sitemap of your target domain. Perfect for SEO audits, content inventory, migration planning, and understanding website architecture.

Authentication

Authorization
string
required
Bearer token using your API key: Bearer YOUR_API_KEY

Request Body

url
string
required
The root URL to begin mapping. Must be a valid HTTP/HTTPS URL.
options
object
Configuration options for mapping behavior

Response

success
boolean
Indicates if mapping was successful
data
object
Mapping results and discovered URLs

Examples

Basic Website Mapping

curl -X POST "https://api.whizo.ai/v1/map" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "maxDepth": 2,
      "maxPages": 100,
      "sameDomain": true
    }
  }'
{
  "success": true,
  "data": {
    "domain": "example.com",
    "rootUrl": "https://example.com",
    "totalPages": 45,
    "maxDepthReached": 2,
    "urls": [
      {
        "url": "https://example.com",
        "depth": 0,
        "statusCode": 200,
        "title": "Example Domain - Home",
        "discoveredAt": "2025-01-15T10:00:00Z",
        "parentUrl": null
      },
      {
        "url": "https://example.com/about",
        "depth": 1,
        "statusCode": 200,
        "title": "About Us",
        "discoveredAt": "2025-01-15T10:00:05Z",
        "parentUrl": "https://example.com"
      },
      {
        "url": "https://example.com/contact",
        "depth": 1,
        "statusCode": 200,
        "title": "Contact Us",
        "discoveredAt": "2025-01-15T10:00:06Z",
        "parentUrl": "https://example.com"
      }
    ],
    "summary": {
      "totalUrls": 45,
      "successfulUrls": 42,
      "failedUrls": 2,
      "redirectUrls": 1,
      "mappingTime": 12.5,
      "creditsUsed": 5
    }
  }
}

Advanced Mapping with Pattern Filtering

curl -X POST "https://api.whizo.ai/v1/map" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://blog.example.com",
    "options": {
      "maxDepth": 3,
      "maxPages": 200,
      "includePatterns": ["/blog/*", "/articles/*"],
      "excludePatterns": ["/admin/*", "*.pdf", "/api/*"],
      "respectRobots": true,
      "engine": "playwright"
    }
  }'
{
  "success": true,
  "data": {
    "domain": "blog.example.com",
    "rootUrl": "https://blog.example.com",
    "totalPages": 87,
    "maxDepthReached": 3,
    "urls": [
      {
        "url": "https://blog.example.com",
        "depth": 0,
        "statusCode": 200,
        "title": "Blog Home",
        "discoveredAt": "2025-01-15T10:00:00Z"
      },
      {
        "url": "https://blog.example.com/blog/getting-started",
        "depth": 1,
        "statusCode": 200,
        "title": "Getting Started Guide",
        "discoveredAt": "2025-01-15T10:00:02Z",
        "parentUrl": "https://blog.example.com"
      },
      {
        "url": "https://blog.example.com/articles/web-scraping-101",
        "depth": 1,
        "statusCode": 200,
        "title": "Web Scraping 101",
        "discoveredAt": "2025-01-15T10:00:03Z",
        "parentUrl": "https://blog.example.com"
      }
    ],
    "summary": {
      "totalUrls": 87,
      "successfulUrls": 85,
      "failedUrls": 1,
      "redirectUrls": 1,
      "mappingTime": 34.2,
      "creditsUsed": 9
    }
  }
}

Mapping with Search Filter

curl -X POST "https://api.whizo.ai/v1/map" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "maxDepth": 3,
      "search": "product",
      "maxPages": 50
    }
  }'

Mapping with Metadata Extraction

Extract rich metadata (title + description) for discovered URLs:
curl -X POST "https://api.whizo.ai/v1/map" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "maxDepth": 2,
      "maxPages": 50,
      "includeMetadata": true,
      "metadataLimit": 20
    }
  }'
{
  "success": true,
  "data": {
    "domain": "example.com",
    "rootUrl": "https://example.com",
    "totalPages": 35,
    "maxDepthReached": 2,
    "urls": [
      {
        "url": "https://example.com",
        "depth": 0,
        "statusCode": 200,
        "title": "Example Domain - Leading Provider of Web Services",
        "description": "Example Domain offers comprehensive web hosting, domain registration, and cloud solutions for businesses of all sizes. Get started today!",
        "discoveredAt": "2025-01-15T10:00:00Z",
        "parentUrl": null
      },
      {
        "url": "https://example.com/about",
        "depth": 1,
        "statusCode": 200,
        "title": "About Us - Our Story and Mission",
        "description": "Learn about Example Domain's 10-year journey in providing reliable web hosting services to over 50,000 customers worldwide.",
        "discoveredAt": "2025-01-15T10:00:05Z",
        "parentUrl": "https://example.com"
      },
      {
        "url": "https://example.com/services",
        "depth": 1,
        "statusCode": 200,
        "title": "Our Services - Web Hosting & Cloud Solutions",
        "description": "Explore our range of web hosting plans, cloud storage options, and managed services designed to help your business thrive online.",
        "discoveredAt": "2025-01-15T10:00:06Z",
        "parentUrl": "https://example.com"
      }
    ],
    "summary": {
      "totalUrls": 35,
      "successfulUrls": 33,
      "failedUrls": 1,
      "redirectUrls": 1,
      "mappingTime": 15.8,
      "creditsUsed": 4
    }
  }
}

Mapping Strategies

Shallow vs Deep Mapping

Shallow Mapping (depth 1-2)
  • Fast discovery of main pages
  • Good for homepage and primary navigation
  • Lower credit cost
  • Recommended for initial site exploration
{
  "url": "https://example.com",
  "options": {
    "maxDepth": 1,
    "maxPages": 50
  }
}
Deep Mapping (depth 3-5)
  • Comprehensive site discovery
  • Finds nested content and deep pages
  • Higher credit cost
  • Recommended for full site audits
{
  "url": "https://example.com",
  "options": {
    "maxDepth": 4,
    "maxPages": 500
  }
}

Pattern-Based Mapping

Use patterns to focus on specific sections:
{
  "url": "https://ecommerce.com",
  "options": {
    "includePatterns": [
      "/products/*",
      "/categories/*",
      "/collections/*"
    ],
    "excludePatterns": [
      "/cart",
      "/checkout",
      "/account/*"
    ]
  }
}

Credit Costs

Mapping costs vary based on pages discovered:
FeatureCost
Basic mapping (per page)0.1 credits
JavaScript rendering+0.05 credits per page
Deep crawling (depth 4-5)+0.02 credits per page
Examples:
  • Mapping 100 pages at depth 2: 10 credits
  • Mapping 500 pages with JavaScript: 75 credits
  • Deep mapping (depth 5) of 200 pages: 24 credits

Error Responses

error
object

Common Errors

Status CodeError CodeDescription
400invalid_urlThe starting URL is invalid or unreachable
400invalid_optionsMapping parameters are invalid
401unauthorizedInvalid or missing API key
402insufficient_creditsNot enough credits for mapping
429rate_limitedRate limit exceeded
500mapping_failedMapping process failed
{
  "success": false,
  "error": {
    "code": "invalid_url",
    "message": "The starting URL is not accessible",
    "details": {
      "url": "https://invalid-site.com",
      "statusCode": 404,
      "reason": "Page not found"
    }
  }
}

Rate Limits

Map API rate limits by plan:
  • Free: 2 mappings per hour, 10 per day
  • Starter: 10 mappings per hour, 50 per day
  • Pro: 50 mappings per hour, 200 per day
  • Enterprise: Custom limits

Use Cases

Discover all pages for comprehensive SEO analysis:
  • Find all URLs for indexing status check
  • Identify orphaned pages without internal links
  • Detect broken links and 404 errors
  • Map site structure for optimization
Create complete content inventories:
  • List all blog posts and articles
  • Catalog product pages
  • Document landing pages
  • Track content growth over time
Plan website migrations and redirects:
  • Map existing URL structure
  • Create redirect mapping
  • Identify pages to migrate
  • Plan new site architecture
Understand competitor site structures:
  • Discover competitor pages
  • Analyze site organization
  • Identify content strategies
  • Find competitive opportunities
Identify all accessible pages:
  • Find all public endpoints
  • Discover admin pages
  • Locate sensitive URLs
  • Map attack surface

Best Practices

  1. Start shallow, go deeper if needed - Begin with depth 1-2 for quick overview
  2. Use pattern filtering - Focus on relevant sections with includePatterns
  3. Respect robots.txt - Keep respectRobots true for ethical scraping
  4. Set reasonable limits - Use maxPages to control costs and runtime
  5. Choose appropriate engine - Use lightweight for fast discovery, playwright for JavaScript-heavy sites
  6. Monitor progress - Check summary statistics in response for insights
  7. Use search filters - Narrow results with search parameter when looking for specific content
  8. Handle external links - Set sameDomain based on your needs

Performance Tips

Optimal Settings by Site Size

Site SizemaxDepthmaxPagesEngineEst. Time
Small (< 50 pages)350lightweight10-20 sec
Medium (50-200 pages)2-3200lightweight30-60 sec
Large (200-1000 pages)2500lightweight2-5 min
Enterprise (1000+ pages)21000playwright5-15 min

Speeding Up Mapping

  • Use engine: 'lightweight' for fastest discovery
  • Reduce maxDepth to discover fewer levels
  • Use includePatterns to focus on specific sections
  • Set lower timeout for faster failure handling
  • Avoid JavaScript rendering when not needed