> For the complete documentation index, see [llms.txt](https://gaffa.dev/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gaffa.dev/docs/api-reference/get-v1-site-map-id.md).

# GET v1/site/map/{id}

This endpoint retrieves information about a site mapping request.

## Get a sitemap request by ID

> This endpoint retrieves a sitemap request by its ID.

```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":{"response_sitemapRequestResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/sitemapRequestResponse"},"error":{"$ref":"#/components/schemas/apiErrorResponse"}}},"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},"sitemap_built_at":{"type":"string","description":"When the sitemap cache was originally built","format":"date-time","nullable":true},"filters_applied":{"type":"boolean","description":"Whether include/exclude filters were applied to the results","nullable":true},"started_at":{"type":"string","description":"The time in UTC when the request started.","format":"date-time","nullable":true},"completed_at":{"type":"string","description":"The time in UTC when the request finished.","format":"date-time","nullable":true},"running_time":{"type":"string","description":"The running time of the request","format":"timespan","nullable":true},"links":{"type":"array","items":{"$ref":"#/components/schemas/sitemapLinkResponse"},"description":"Links found in the sitemap. When a search_query was provided the list is ordered by similarity (best first) and each entry carries the extracted text and similarity score; otherwise entries are ordered alphabetically and only carry the URL.","nullable":true},"link_count":{"type":"integer","description":"Number of links found","format":"int32","nullable":true},"truncated":{"type":"boolean","description":"True when the returned links list is a subset of total_link_count — a limit or the response cap applied, or the build hit the link ceiling. For search queries this is expected: only the top-ranked matches up to the limit are returned.","nullable":true},"total_link_count":{"type":"integer","description":"Total number of links available before any truncation","format":"int32","nullable":true},"partial_failure":{"type":"boolean","description":"True when one or more sitemap documents could not be fetched, so the link set is partial","nullable":true},"failed_sitemaps":{"type":"array","items":{"$ref":"#/components/schemas/sitemapFailedFetchResponse"},"description":"When partial_failure is true, the sitemap documents that could not be fetched and why (capped to the first few failures)","nullable":true}},"description":"The result, if this response represents a success.","nullable":true},"sitemapLinkResponse":{"type":"object","properties":{"url":{"type":"string","description":"The URL","nullable":true},"extracted_text":{"type":"string","description":"Text extracted from the URL path (only present when ranked by a search_query)","nullable":true},"similarity_score":{"type":"number","description":"Similarity score (0-1, higher is more similar; only present when ranked by a search_query)","format":"double","nullable":true}}},"sitemapFailedFetchResponse":{"type":"object","properties":{"url":{"type":"string","description":"The sitemap document URL that could not be fetched","nullable":true},"error":{"type":"string","description":"Why the fetch failed","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}},"description":"The error, if this response represents a failure.","nullable":true}}},"paths":{"/v1/site/map/{id}":{"get":{"tags":["Sitemap Requests"],"summary":"Get a sitemap request by ID","description":"This endpoint retrieves a sitemap request by its ID.","operationId":"getSitemapRequestById","parameters":[{"name":"id","in":"path","description":"The unique identifier of the sitemap request to retrieve.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The sitemap request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_sitemapRequestResponse"}}}},"404":{"description":"Sitemap request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_sitemapRequestResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gaffa.dev/docs/api-reference/get-v1-site-map-id.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
