API usage example

Login and get API token

Discover how to get your unique API key 

curl -X POST 'https://app.mentionmind.com/api/login.php' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'key=%your-api-key%'


Get the mentions list


cURL

curl --location 'https://app.mentionmind.com/api/mention.php?token=Hvmx1o6NKPeNalPA43KXhCHwnPVWmcno&func=getMentions&project_id=104'


php CURL

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://app.mentionmind.com/api/mention.php?token=Hvmx1o6NKPeNalPA43KXhCHwnPVWmcno&func=getMentions&project_id=104',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;


Python

import requests
url = "https://app.mentionmind.com/api/mention.php?token=Hvmx1o6NKPeNalPA43KXhCHwnPVWmcno&func=getMentions&project_id=104"
payload = {}
headers = {
  'Cookie': 'PHPSESSID=tmd4so8iqcueopnvuiipe0292d'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)


If everything is done correctly, you will receive a JSON response containing all your projects.

[
    {
        "id": 113890,
        "project_id": 104,
        "type": "topicMonitoring",
        "reddit_type": "post",
        "source": "reddit",
        "relevance_score": 0,
        "sentiment": 1,
        "title": "State police must make social media monitoring practices public, high court rules",
        "text_summary": null,
        "snippet": "",
        "url": "https://www.reddit.com/r/TrendingQuickTVnews/comments/15yj2my/state_police_must_make_social_media_monitoring/",
        "keywords": "social media monitoring",
        "excluded_keywords": "phone,wife,youtube",
        "status": 1,
        "favorites": 0,
        "author": "swagNextTuber",
        "created": "2023-08-23 00:22:54",
        "date_added": "2023-08-22 22:00:29",
        "product_description": ""
    },
    {
        "id": 113889,
        "project_id": 104,
        "type": "topicMonitoring",
        "reddit_type": "post",
        "source": "reddit",
        "relevance_score": 0,
        "sentiment": 1,
        "title": "[Politics] - State police must make social media monitoring practices public, high court rules | FOX",
        "text_summary": null,
        "snippet": "",
        "url": "https://www.reddit.com/r/AutoNewspaper/comments/15yjboy/politics_state_police_must_make_social_media/",
        "keywords": "social media monitoring",
        "excluded_keywords": "phone,wife,youtube",
        "status": 1,
        "favorites": 0,
        "author": "AutoNewspaperAdmin",
        "created": "2023-08-23 00:31:49",
        "date_added": "2023-08-22 22:00:29",
        "product_description": ""
    },
    {
        "id": 113891,
        "project_id": 104,
        "type": "topicMonitoring",
        "reddit_type": "post",
        "source": "reddit",
        "relevance_score": 0,
        "sentiment": 1,
        "title": "[Politics] - State police must make social media monitoring practices public, high court rules",
        "text_summary": null,
        "snippet": "",
        "url": "https://www.reddit.com/r/FOXauto/comments/15yimmt/politics_state_police_must_make_social_media/",
        "keywords": "social media monitoring",
        "excluded_keywords": "phone,wife,youtube",
        "status": 1,
        "favorites": 0,
        "author": "AutoNewsAdmin",
        "created": "2023-08-23 00:06:55",
        "date_added": "2023-08-22 22:00:29",
        "product_description": ""
    }
]