# GET v1/site/map

This endpoint retrieves information about previous site mapping requests, filterable by id or status

## Get Sitemap

> This endpoint retrieves sitemap requests in bulk by id or status.

```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":{"pagedResult_sitemapRequestResponse":{"type":"object","properties":{"total_pages":{"type":"integer","description":"The total number of pages available","format":"int32","nullable":true},"total_records":{"type":"integer","description":"The total number of records across all pages","format":"int32","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/sitemapRequestResponse"},"description":"The records for the current page","nullable":true},"page":{"type":"integer","description":"The page number to return (1-based)","format":"int32","default":1,"nullable":true},"page_size":{"type":"integer","description":"The number of records to return per page","format":"int32","default":30,"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":{"get":{"tags":["Sitemap Requests"],"summary":"Get Sitemap","description":"This endpoint retrieves sitemap requests in bulk by id or status.","operationId":"getSitemapRequests","parameters":[{"name":"ids","in":"query","description":"The unique identifiers of the sitemap requests to retrieve.","schema":{"type":"string"}},{"name":"status","in":"query","description":"The statuses of the sitemap requests to filter by. Valid values: pending, completed, failed","schema":{"type":"string"}},{"name":"pageSize","in":"query","description":"Items to return per page (default: 30).","schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number of the pagination (default: 1).","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"A collection of sitemap requests that match the criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pagedResult_sitemapRequestResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiErrorResponse"}}}}}}}}}
```
