Implementation:FlowiseAI Flowise GetNodesByCategory
| Attribute | Value |
|---|---|
| Sources | packages/ui/src/api/nodes.js:L6 |
| Domains | Document_Store_Ingestion |
| Last Updated | 2026-02-12 14:00 GMT |
Overview
GetNodesByCategory is the API client function that retrieves all node component definitions within a specified category. In the document store ingestion workflow, it is used to fetch available text splitter components by passing the category name "Text Splitters".
Code Reference
Source Location
- File:
packages/ui/src/api/nodes.js, Line 6 - Repository: FlowiseAI/Flowise
Signature
const getNodesByCategory = (name) => client.get(`/nodes/category/${name}`)
This function sends a GET request to the /api/v1/nodes/category/{name} endpoint via the configured axios client instance. The category name is interpolated into the URL path.
Import
import nodesApi from '@/api/nodes'
The function is accessed as nodesApi.getNodesByCategory(name) after importing the default export from the nodes API module.
I/O Contract
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The category name to filter nodes by (e.g., "Text Splitters")
|
Outputs
| Field | Type | Description |
|---|---|---|
| data | SplitterComponent[] | Array of component definitions for the specified category |
| data[].name | string | Internal component identifier (e.g., recursiveCharacterTextSplitter)
|
| data[].label | string | Human-readable display name (e.g., Recursive Character Text Splitter)
|
| data[].icon | string | Icon identifier or URL for the component |
| data[].description | string | Description of the splitter's behavior |
| data[].inputParams | object[] | Array of input parameter definitions (chunk_size, chunk_overlap, separators, etc.) |
| data[].inputAnchors | object[] | Array of input anchor definitions for connections to other nodes |
The function returns a Promise<{data: SplitterComponent[]}> from the axios response.
Usage Examples
Fetching Text Splitter Components
import nodesApi from '@/api/nodes'
const loadTextSplitters = async () => {
const response = await nodesApi.getNodesByCategory('Text Splitters')
const splitters = response.data
splitters.forEach(splitter => {
console.log(`${splitter.label}: ${splitter.description}`)
// List configurable parameters
splitter.inputParams.forEach(param => {
console.log(` ${param.name} (${param.type}): ${param.label}`)
})
})
return splitters
}
Selecting a Specific Splitter by Name
import nodesApi from '@/api/nodes'
const getRecursiveSplitter = async () => {
const response = await nodesApi.getNodesByCategory('Text Splitters')
const splitter = response.data.find(
s => s.name === 'recursiveCharacterTextSplitter'
)
if (!splitter) throw new Error('Recursive Character Text Splitter not found')
// Extract default configuration from input params
const defaults = {}
splitter.inputParams.forEach(param => {
if (param.default !== undefined) {
defaults[param.name] = param.default
}
})
return { splitter, defaults }
}
Using for Other Categories
import nodesApi from '@/api/nodes'
// The same function works for any node category
const getEmbeddingNodes = async () => {
const response = await nodesApi.getNodesByCategory('Embeddings')
return response.data
}
Related Pages
- Principle:FlowiseAI_Flowise_Text_Splitter_Configuration
- Implementation:FlowiseAI_Flowise_GetDocumentLoaders -- Similar pattern for fetching loader components
- Implementation:FlowiseAI_Flowise_PreviewChunks -- Uses the selected splitter configuration for chunk preview
- Implementation:FlowiseAI_Flowise_GetVectorStoreProviders -- Similar pattern for fetching vector store providers