> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/connect/n8n-api/discover.md).

# Discover

API capability discovery

## Discover available API capabilities

> Returns a filtered capability map based on the caller's API key scopes. Each resource includes the operations and endpoints accessible to the authenticated API key. Use query parameters to narrow the response.<br>

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Discover","description":"API capability discovery"}],"servers":[{"url":"/api/v1"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"unauthorized":{"description":"Unauthorized"}}},"paths":{"/discover":{"get":{"tags":["Discover"],"summary":"Discover available API capabilities","description":"Returns a filtered capability map based on the caller's API key scopes. Each resource includes the operations and endpoints accessible to the authenticated API key. Use query parameters to narrow the response.\n","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["schemas"]},"description":"Include additional data. Use \"schemas\" to inline request body schemas per endpoint, eliminating the need to fetch the full OpenAPI spec.\n"},{"name":"resource","in":"query","required":false,"schema":{"type":"string"},"description":"Filter to a specific resource (e.g. \"workflow\", \"tags\", \"credential\").\n"},{"name":"operation","in":"query","required":false,"schema":{"type":"string"},"description":"Filter to endpoints with a specific operation (e.g. \"read\", \"create\", \"list\").\n"}],"responses":{"200":{"description":"Discovery response with available resources and endpoints.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"},"description":"The API key's active scopes"},"resources":{"type":"object","additionalProperties":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"string"}},"endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"operationId":{"type":"string"},"requestSchema":{"type":"object","description":"Request body schema (only present when include=schemas and the endpoint accepts a request body).\n"}}}}}}},"filters":{"type":"object","description":"Available query parameter filters. The values arrays reflect what the caller's scopes permit.\n","additionalProperties":{"type":"object","properties":{"description":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}}},"specUrl":{"type":"string","description":"URL to the full OpenAPI specification"}}}}}}}},"401":{"$ref":"#/components/responses/unauthorized"}}}}}}
```


---

# 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://docs.n8n.io/connect/n8n-api/discover.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.
