Parsers of users from VKontakte groups are programs that collect various information according to a given algorithm. There are various parsing services that help gather the right audience to set up targeted advertising on VKontakte.
Don't know which service to use? In today's article, we have collected a dozen programs for parsing the VKontakte audience, considering their advantages and prices. All you have to do is make a choice in favor of one of them.
Receive up to 18% of expenses on contextual and targeted advertising!
We recommend : Click.ru – marketplace of advertising platforms:
- More than 2,000 advertising agencies and freelancers are already working with the service.
- You can connect yourself in 1 day.
- Earn from the first ruble spent, without initial restrictions, without an entry barrier.
- Payments via WebMoney, to a card to an individual, reinvestment in advertising.
- You still have direct access to advertising accounts, a paradise for accounting for document flow and payments.
Start earning >> Advertising
"Cerebro"
Finds the target audience, downloads the user ID database. Subsequently, it can be exported and uploaded to the VKontakte advertising account as your own retargeting group. Cerebro can not only search for communities that contain the desired audience, but also collect IDs of discussion participants, community administrators, user friends, as well as by day birth. In my experience, when using Cerebro, the cost of a click is reduced by 2-4 times, depending on the topic. CTR increases due to high-quality selection of the audience to whom advertising can be shown.
How to find out the id of a group in VK if the link has been changed
The community administrator can change the group link. This is done in the settings. Go to the community, open the menu and click “Manage Community”.
Here in the “Page Address” section, it writes what we need. Click “Save”
At the same time, the unique numeric number for the group will not change. But now we won't see it in the browser address bar. How can we now get the required id?
Here you need to resort to one trick. On the main page of the group, click on the “Members” link.
In the window that opens, click on the “Search” icon.
We'll move on to the next page. Here you can search for people among community members. But this is not the function we are interested in.
Look in the address bar, what do you see there? URL of the VKontakte site, then the word search, which means search. And the word group, meaning in a group. Simply put, search in a group.
And in what group? Next, its numeric id will be indicated. And this is exactly what we are looking for.
Check that the link contains the numbers “120208137”. Add “Club” to them, and you get the familiar meaning.
Pepper.ninja
The functionality is similar to Cerebro, but there are several important features. For example, Pepper.ninja also works with Facebook, although it only searches by community audience. The service can also collect audiences from website pages where the VKontakte comment widget is installed.
Resources for OSINT VKontakte
The first resource we will start with is https://220vk.com
There are several useful functions here, from an OSINT point of view:
– On the main page we see when the user was last online and from what device he logged in. Also who he added or removed from friends; – An online tracker will help us find out when a user is online. This is useful to understand what mode a person has, when he is most active. Of course, this knowledge in itself does not provide much. But sometimes it can be useful, especially if we have to somehow interact with him or his contacts. – Outgoing likes – sometimes it’s very useful to know who a person likes. This can give insight into his social circle or people close to him; – Tab “Cities of Friends”. This is probably one of the most useful functions of this resource. It shows from which cities and how many friends a person has. As a rule, this allows us to fairly accurately determine which city our target is from. – Tabs are quite useful for finding friends, especially if a person has closed his page. Of course, it doesn’t always work, but it’s worth a try;
The remaining sections are situational and the need to use them appears extremely rarely. Therefore, I don’t see any point in dwelling on them too much.
https://vk.city4me.com
This resource is very similar to the previous one. But at the same time it harmoniously complements it, and therefore it is worth using both. Among the cool moments: it very clearly and conveniently shows the user’s activity, including what device he came from and how long he was online, and also tracks the activity of friends.
https://vkdia.com
An extremely useful service that analyzes the activity of friends and compares it with the activity of the target itself. Based on the comparison results, it produces hypothetical options with whom our object could communicate. If we monitor the desired page for a longer time, we can quite accurately determine the social circle of the person we are interested in.
"Barkov.net"
Selects users based on the intersection of community audiences. Gathers people who are members of groups with similar topics. Thus, we get a base only of those who are really interested in the topic. It takes into account activity on the wall and in discussions. Like Cerebro, the service counts absolutely all likes and reposts, as well as commentators, and filters the final list for the desired request. To work with a specific post, there is the “Activity in Post” function. Collects the IDs of all the user’s friends and subscribers on VKontakte.
GetTarget
The GetTarget service appeared at the end of last summer and has already received many good reviews from SMM specialists. It allows you not only to gather community audiences into groups for retargeting, but also to select from the total mass only new, still hot participants or, conversely, those who have already left the community. In your personal account interface, you can add communities, monitor your audience, and track statistics.
CloudTarget
In addition to the standard functionality for similar services, it tracks newcomers to the desired communities on the topic of interest. One of the fastest tools—parsing a database of up to 500,000 people—takes a few seconds.
The service can search for any number of communities using keywords and filters. The output includes information about the number of bots, the average number of posts per day, and the activity rate (ER).
PS To learn more about how to turn a community into an effective online marketing channel or become a target pro, sign up for the online intensive “SMM Manager”.
The opinions of the author and the editor may not coincide. Want to write a column for Netology? Read our terms of publication. To keep abreast of all the news and read new articles, join the Netology Telegram channel.
We receive a list of members of the VKontakte community of a certain gender and age
I was inspired to create this article by the publication “Getting vk.com community members in seconds.” My article was written by a beginner and reflects experience in solving one problem. The main purpose of writing this article for me is to collect opinions, feedback and criticism of the applied approach from more experienced colleagues. In addition, I hope that the information provided here will be useful to someone.
Not long ago, in one of the test tasks for the vacancy of a junior PHP programmer, I came across a simple, but interesting task for me.
“Make a script in PHP that returns a list of VKontakte user ids, separated by newline characters, who are men over 25 years old and belong to the group vk.com/habr.” Access to information from the VKontakte database is carried out using the VK API. It’s better to start getting acquainted with the VK API with the official documentation. In order to call the VKontakte API method, you need to make a POST or GET request via the HTTPS protocol to the following URL:
api.vk.com/method/METHOD_NAME?PARAMETERS&access_token=ACCESS_TOKEN, where METHOD_NAME is the name of the method from the list of API methods, PARAMETERS are the parameters of the corresponding method, ACCESS_TOKEN is the access key.
In our task we use the groups.getMembers method, which returns a list of community members. All method parameters are described in the documentation. The method does not require an access key. In the standard form, the response comes in the form of a JSON file. You can get data from no more than 1000 users in one request. To see the output of the method live, just enter a simple request in the address bar of your browser: api.vk.com/method/groups.getMembers?group_id=habr.
We get a JSON structure with the total number of members of the vk.com/habr community and the first thousand ids in the default list sorted in ascending order.
According to the conditions of the problem, we need to display the id of users of a certain gender and age. The obvious way is to use VK API queries to select group users along with their data on gender and age, and then analyze them in PHP code and display only the necessary ones. Another possible method - the execute method - allows you to pass a script in a special VKScript language in one request to manipulate data on the server and return the already processed data. I’ll say right away that I was unable to solve the problem using the execute method. Maybe someone will indicate such a solution in the comments.
Let's take the first path. The groups.getMembers method can return the user's gender using the sex value of the fields parameter, but it does not return age. Instead, the fields parameter has a bdate field - date of birth. In addition, in queries we select a thousand users each, which means that each subsequent query should return the next thousand. For this, there is an offset parameter, which shows at what position to start sampling. We will also indicate the API version in the request.
As a result, the request will look something like this: https://api.vk.com/method/groups.getMembers?group_id=habr&offset=0&fields=sex,bdate&version=5.27
To get a file via a link, PHP has the file_get_contents() function. It gets the content by reference and returns it as a string. Please note that in order for file_get_contents() to understand the HTTPS protocol, openssl support is needed in the web server.
Then the resulting JSON content can be converted into an array using the json_decode() function. The array will contain both id and gender. The date of birth may not be indicated at all. If the date of birth is still indicated, all that remains is to obtain the age from the date of birth.
Dates of birth in bdate are stored in format strings DD.MM.YYYY if the year of birth is specified, or DD.MM if the year of birth is not specified. To find out what format the string is actually in, I used the first thing that came to mind: count(explode(“.", $user_array['bdate'])) equals 2 or 3. This method works and I don’t think it’s the narrowest script place.
To calculate age by date of birth, I found the formula hashcode.ru/questions/137939#137940. The strtotime() function understands the format of the bdate field.
We check gender and age.
If they satisfy the condition, we print id. All code in PHP
// Request package number $packet = 0; // Request packet size $limit = 1000; do { // We start each request where we left off in the previous request. $offset = $packet * $limit; // Execute the request. // The result is a JSON file with the total number and user data. // For file_get_contents() to work with https, the openssl module // must be active on the apache web server. $contents = file_get_contents("https://api.vk.com/method/groups.getMembers?group_id=habr&offset=$offset&fields=sex,bdate&version=5.27") // Convert JSON to an array $members = json_decode($contents, true); // User data is stored in the users subarray. // Each users element is an associated array with data. foreach ($members['response']['users'] as $user_array) { // If the user specified a date of birth and the user is male... if ((isset($user_array['bdate'])) && ($user_array[ 'sex'] == 2)) { // … and if the date of birth has three components (DD.MM.YYYY)… if (count(explode(“.”, $user_array['bdate'])) == 3 ) { // then we calculate the age (I found the formula on the Internet) $age = floor((time()-strtotime($user_array['bdate']))/(60*60*24*365.25)); // If the age suits us, display the user id with a newline if ($age > 25) { echo $user_array['uid'] . ""; } } } } // Move on to the next package. $packet++; } while ($members['response']['count'] > $offset + $limit); This option works great for relatively small groups, but for groups of more than 100 thousand subscribers the script does not work completely - at some point for some reason the error “file_get_contents(...): failed to open stream: Connection timed out in … on line” appears ..." I tried increasing the script execution time and the web server timeout - it didn’t help. I couldn't find a pattern.
Then another option was found - to use cURL to download the request response. To apply this method, you need to install the libcurl library in the OS, for example, in Ubuntu -
sudo apt-get install libcurl3 and enable cURL support in PHP, for example, in Ubuntu - sudo apt-get install php5-curl Now you can open a curl session in a PHP script with the curl_init() function, set connection parameters (including URL) with the function curl_setopt() and download the contents of JSON files into a string using the curl_exec() function. Then you should close the session - curl_close(). The rest of the code remains unchanged:
All code with cURL in PHP
// Request packet number $packet = 0;
// Request packet size $limit = 1000; // Initialize cURL. // To work with cURL, the libcurl library // must be installed and cURL support in PHP must be enabled. $ch = curl_init(); do { // We start each request where we left off in the previous request. $offset = $packet * $limit; // Request parameters curl_setopt($ch, CURLOPT_URL, "https://api.vk.com/method/groups.getMembers?group_id=habr&offset=$offset&fields=sex,bdate&version=5.27"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Execute the request. // The result is a JSON file with the total number and user data. $content = curl_exec($ch); $members = json_decode($contents, true); // User data is stored in the users subarray. // Each users element is an associated array with data. foreach ($members['response']['users'] as $user_array) { // If the user specified a date of birth and the user is male... if ((isset($user_array['bdate'])) && ($user_array[ 'sex'] == 2)) { // … and if the date of birth has three components (DD.MM.YYYY)… if (count(explode(“.”, $user_array['bdate'])) == 3 ) { // then we calculate the age (I found the formula on the Internet) $age = floor((time()-strtotime($user_array['bdate']))/(60*60*24*365.25)); // If the age suits us, display the user id with a newline if ($age > 25) { echo $user_array['uid'] . ""; } } } } // Move on to the next package. $packet++; } while ($members['response']['count'] > $offset + $limit); // Close cURL curl_close ($ch); As I said, I think the execute method approach is possible, but I have not yet been able to get a satisfactory result in this direction.
PS Please do not think that I want to get a solution to a test task from the Habr audience. I sent the above options a long time ago and received a response. I just spent a lot of time on this task and would like to know if I was moving in the right direction and what other approaches could be used.