n8n API
Using n8n's public API, you can programmatically perform many of the same tasks as you can in the GUI. This section introduces n8n's REST API, including:
How to authenticate
Paginating results
Using the built-in API playground (self-hosted n8n only)
n8n provides an n8n API node to access the API in your workflows.
Choose your interaction method
REST API (this section)
Interact with n8n directly using HTTP requests. Ideal for:
Custom integrations and applications
Language-agnostic HTTP calls
Direct REST API usage in workflows
n8n CLI (recommended for developers)
Use n8n CLI for a command-line experience. It wraps the public API and is a good fit for:
Command-line automation and scripting
CI/CD pipeline integration
AI agent integration (Claude Code, Cursor, etc.)
Developers who prefer CLI tools
Learn about REST APIs
The API documentation assumes you are familiar with REST APIs. If you're not, these resources may be helpful:
KnowledgeOwl's guide to working with APIs: a basic introduction, including examples of how to call REST APIs.
IBM Cloud Learn Hub - What is an Application Programming Interface (API): this gives a general, but technical, introduction to APIs.
IBM Cloud Learn Hub - What is a REST API?: more detailed information about REST APIs.
MDN web docs - An overview of HTTP: REST APIs work over HTTP and use HTTP verbs, or methods, to specify the action to perform.
Last updated
Was this helpful?