# POST v1/site/map

This endpoint creates a new site mapping request and returns the result.

## Create a new sitemap request

> This endpoint processes a website's sitemap and returns all URLs found within it.

```json
{"openapi":"3.0.1","info":{"title":"Gaffa API Open API Definition","version":"1.0.0"},"servers":[{"url":"https://api.gaffa.dev"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"sitemapRequestInput":{"type":"object","properties":{"url":{"type":"string","description":"The url you want our sitemap reader to process on your behalf"},"max_cache_age":{"type":"integer","description":"Maximum cache age in seconds for this request. If a cached result exists within this timeframe, it will be returned. Default is 0 (no cache).","format":"int32","nullable":true}}},"sitemapRequestResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the sitemap request","nullable":true},"url":{"type":"string","description":"URL of the request","nullable":true},"state":{"type":"string","description":"The status of the request","nullable":true},"credit_usage":{"type":"integer","description":"The number of credits used by the request","format":"int32","nullable":true},"error":{"type":"string","description":"The name of the error type","nullable":true},"error_reason":{"type":"string","description":"More detail about the error","nullable":true},"from_cache":{"type":"boolean","description":"If this request was served from the cache","nullable":true},"started_at":{"type":"string","description":"The time in UTC when the request started.","format":"date-time"},"completed_at":{"type":"string","description":"The time in UTC when the request finished.","format":"date-time"},"running_time":{"type":"string","description":"The running time of the request","format":"timespan"},"links":{"type":"array","items":{"type":"string"},"description":"List of URLs found in the sitemap","nullable":true},"link_count":{"type":"integer","description":"Number of links found","format":"int32","nullable":true}}},"apiErrorResponse":{"type":"object","properties":{"type":{"type":"string","description":"The type of object this is concerning","nullable":true},"id":{"type":"string","description":"The id of the item concerned.","nullable":true},"code":{"type":"string","description":"Error code.","nullable":true},"message":{"type":"string","description":"Error description.","nullable":true}}}}},"paths":{"/v1/site/map":{"post":{"tags":["Sitemap Requests"],"summary":"Create a new sitemap request","description":"This endpoint processes a website's sitemap and returns all URLs found within it.","operationId":"createSitemapRequest","requestBody":{"description":"Sitemap request input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sitemapRequestInput"}}},"required":true},"responses":{"200":{"description":"The sitemap request response detailing the URLs found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sitemapRequestResponse"}}}},"408":{"description":"The sitemap request timed out after 60 seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiErrorResponse"}}}},"503":{"description":"The requested site is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiErrorResponse"}}}}}}}}}
```
