Map
Discover URLs for a site (sitemap, search, and page links)
Map
Discover URLs for a site using sitemap, search, and page links
Authorization
AuthorizationRequiredBearer <token>JWT token for API authentication
In: header
Request Body
application/jsonRequiredurlRequiredstringThe URL to map
"uri"limitnumberMaximum number of URLs to return
5000Minimum: 1Maximum: 50000include_subdomainsbooleanInclude subdomain URLs
falseignore_sitemapbooleanSkip sitemap parsing
falsemax_agenumberCache max age (ms). Use 0 to skip cache reads; omit to use server default.
0use_indexbooleanWhether to use Page Cache index for URL discovery
trueResponse Body
Successful map response format containing discovered URLs
TypeScript Definitions
Use the response body type in TypeScript.
successRequiredbooleanIndicates the map request was successful
truedataRequiredarray<object>Array of discovered URLs
@minItems 0
Standard error response format for validation errors
TypeScript Definitions
Use the response body type in TypeScript.
successRequiredbooleanIndicates the request failed
falseerrorRequiredstringError message
detailsRequiredobjectValidation error details
Unauthorized response format for authentication errors
TypeScript Definitions
Use the response body type in TypeScript.
successRequiredbooleanIndicates the request failed due to authentication issues
falseerrorRequiredstringAuthentication error message
Payment required response format with credit information
TypeScript Definitions
Use the response body type in TypeScript.
successRequiredbooleanIndicates the request failed due to insufficient credits
falseerrorRequiredstringError message
current_creditsRequirednumberCurrent credit balance of the user
Internal server error response format
TypeScript Definitions
Use the response body type in TypeScript.
successRequiredbooleanIndicates the request failed due to server error
falseerrorRequiredstringServer error message
messageRequiredstringDetailed error message describing what went wrong
curl -X POST "https://api.anycrawl.dev/v1/map" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"limit": 5000
}'const body = JSON.stringify({
"url": "https://example.com",
"limit": 5000
})
fetch("https://api.anycrawl.dev/v1/map", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.anycrawl.dev/v1/map"
body := strings.NewReader(`{
"url": "https://example.com",
"limit": 5000
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.anycrawl.dev/v1/map"
body = {
"url": "https://example.com",
"limit": 5000
}
response = requests.request("POST", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){
"success": true,
"data": [
{
"url": "https://example.com/",
"title": "Home",
"description": "Example homepage"
}
]
}{
"success": false,
"error": "Validation error",
"details": {
"issues": [
{
"field": "engine",
"message": "Invalid enum value. Expected 'playwright' | 'cheerio' | 'puppeteer', received 'cheeri1o'",
"code": "invalid_enum_value"
}
],
"messages": [
"Invalid enum value. Expected 'playwright' | 'cheerio' | 'puppeteer', received 'cheeri1o'"
]
}
}{
"success": false,
"error": "Invalid API key"
}{
"success": false,
"error": "Insufficient credits",
"current_credits": -2
}{
"success": false,
"error": "Internal server error",
"message": "Job 0ae56ed9-d9a9-4998-aea9-2ff5b51b2e4e timed out after 30000 seconds"
}