da-data

n8n community node for selected DaData APIs

Package Information

Released: 3 mo ago
Downloads: 50 weekly / 1,117 monthly
Latest Version: 0.3.1
Author: Catalogicus International

Documentation

@catalogicus-international/n8n-nodes-da-data

Community nodes for selected DaData APIs.

Nodes

DaData

Use DaData in standard n8n workflows. It has normal workflow inputs and outputs and
does not require an AI Agent.

The node supports these party operations:

  • Party → Find by INN or OGRN;
  • Party → Suggest.

For Find by INN or OGRN, configure the INN, INN/KPP, or OGRN in Query, or leave
Query empty to read the request body from the current input item:

{
  "query": "7707083893",
  "count": 1,
  "branch_type": "MAIN",
  "type": "LEGAL",
  "status": ["ACTIVE"]
}

Suggest searches by INN, INN/KPP, OGRN, company name, entrepreneur or executive
name, and address. It supports party type, status, branch type, OKVED, location
restrictions, and location ranking:

{
  "query": "сбербанк",
  "count": 10,
  "type": "LEGAL",
  "status": ["ACTIVE"],
  "okved": ["64.19"],
  "locations": [{ "kladr_id": "77" }],
  "locations_boost": [{ "kladr_id": "54" }]
}

Existing workflow behavior is preserved: by default, each DaData suggestion becomes
one output item. Enable Return Full Response to return the complete response.

DaData Tool

Use DaData Tool only as a tool connected to an n8n AI Agent. The agent supplies one
structured object through the request argument.

For the standard party lookup, action is the DaData endpoint action and resource
is the endpoint resource:

{
  "action": "findById",
  "resource": "party",
  "body": {
    "query": "7707083893",
    "count": 1
  }
}

For party suggestions:

{
  "action": "suggest",
  "resource": "party",
  "body": {
    "query": "сбербанк",
    "count": 10,
    "status": ["ACTIVE"]
  }
}

For a generic HTTP request, use an HTTP method as action and put the complete
relative endpoint path in resource:

{
  "action": "GET",
  "resource": "some/endpoint",
  "queryParameters": {
    "status": "ACTIVE"
  },
  "pagination": {
    "enabled": true,
    "pageParameter": "page",
    "pageSizeParameter": "count",
    "page": 1,
    "pageSize": 100,
    "maxPages": 10,
    "itemsPath": "suggestions"
  }
}

Pagination is applied to GET requests. itemsPath is an optional dot-separated path
to the result array. Pagination stops when a page contains fewer items than
pageSize or when maxPages is reached.

Query parameters

The normal node shows the universal Query Parameters field and structured
Query Parameters (Fields) at the same time. The Tool node accepts the same data in
request.queryParameters (aliases: parameters and query).

The universal value supports:

  • an object or expression result;
  • a JSON string, including JSON serialized as a string multiple times;
  • objects with unquoted keys, such as { status: "ACTIVE", count: 10 };
  • shorthand, such as status=ACTIVE&count=10 or status:ACTIVE,count:10.

After parsing, the value must be an object. Arrays and primitive values produce a
clear validation error. Parameters with null, undefined, or an empty string are
removed.

Structured UI parameters are merged with the universal value. A non-empty UI value
has priority; an empty UI value does not overwrite a value from the universal field.

Credentials

Create an API token in DaData and add it to the DaData API credential. The default
base URL is:

https://suggestions.dadata.ru/suggestions/api/4_1/rs

Development

pnpm install
pnpm run lint
pnpm test

Resources

License

MIT

Discussion