N8N Tools VK icon

N8N Tools VK

Interact with VKontakte API

Posts → Search Posts

AI-generated

Overview

This node integrates with the VKontakte (VK) social network API, specifically providing functionality to search posts on VK. It allows users to query posts from a specified owner (user or group) and supports pagination through count and offset parameters.

Common scenarios where this node is beneficial include:

  • Monitoring posts from a particular user or community for content analysis.
  • Searching for posts containing specific keywords or topics.
  • Aggregating posts data for reporting or social media management tools.

Practical example:

  • A marketing team wants to track posts made by a competitor's VK group. They can use this node to search posts by the group's ID, retrieving recent posts in batches of 20, and paginate through older posts using the offset parameter.

Properties

Name Meaning
Owner ID The identifier of the post owner. Use a negative number to specify a group ID.
Count Number of posts to return in one request (pagination size).
Offset Number of posts to skip before starting to collect the result set (for pagination).

Output

The output is an array of JSON objects representing the posts returned by the VK API search method. Each item corresponds to a single post matching the search criteria.

The structure of each JSON object depends on VK's post data schema but typically includes fields such as post ID, owner ID, text content, date, attachments, likes, comments, and reposts.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for VKontakte OAuth2 authentication configured in n8n.
  • The node uses the VK API base URL https://api.vk.com/method.
  • No additional external dependencies are required beyond the VK API access.

Troubleshooting

  • Common issues:

    • Invalid or missing Owner ID may cause the API to return errors or empty results.
    • Exceeding VK API rate limits can lead to temporary blocking or error responses.
    • Incorrect count or offset values might result in unexpected pagination behavior.
  • Error messages:

    • "Unknown operation: searchPosts": This indicates that the operation name was not recognized; ensure the operation parameter is correctly set to "searchPosts".
    • API errors related to authorization usually mean the API key credential is invalid or expired; re-authenticate the credential.
    • Network or timeout errors suggest connectivity issues; verify internet connection and VK API availability.

Links and References

Discussion