reviews
Get, reply, and delete reviews on your social networks.
Reviews API Endpoint
❗Click the › in the endpoint to view details.
Get, reply, and delete reviews on your connected social accounts including Facebook page ratings and Google Business Profile reviews. In Beta.
See here for Review API implementation details.
Premium or Business plan required.
Get All Reviews
GET
https://app.ayrshare.com/api/reviews
Retrieve all the reviews for the specified platform. Currently only Facebook Page rating reviews and Google Business Profile reviews.
Query Parameters
Name | Type | Description |
---|---|---|
platform* | string | Values: |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Format: |
Profile-Key | string | Profile Key of a user profile. |
{
"facebook": [
{
"created": "2023-07-11T21:14:41.000Z",
"id": "376602035206384",
"rating": "positive", // Rating postive, negative
"review": "Makes things easy for connecting social accounts and publishing.",
"reviewer": {
"name": "Sue Smith",
"id": "7283511115003",
"profile": {
"height": 50,
"isSilhouette": false,
"url": "https://platform-lookaside.fbsbx.com/platform/profilepic/",
"width": 50
}
}
},
{
"created": "2023-04-19T02:45:05.000Z",
"id": "376602035206385",
"rating": "positive", // Rating postive, negative
"review": "What an amazing product",
"reviewer": {
"name": "John Smith",
"id": "7501289573254",
"profile": {
"height": 50,
"isSilhouette": false,
"url": "https://platform-lookaside.fbsbx.com/platform/profilepic/",
"width": 50
}
}
}
],
"lastUpdated": "2024-02-05T22:47:42.996Z",
"nextUpdate": "2024-02-05T22:58:42.996Z"
},
{
"gmb": [
{
"created": "2023-07-11T21:23:57.707819Z",
"id": "AbFvOqkkVAAQYEe2o5asfICQAGTTG",
"rating": "FIVE", // Rating ONE, TWO, THREE, FOUR, FIVE
"review": "Been a great experience - like the documentation, example coding, and help desk.",
"reviewReply": {
"reply": "Thank you for the great thoughts.",
"updated": "2024-02-05T22:36:17.989625Z"
},
"reviewer": {
"name": "Mads Max",
"profile": "https://lh3.googleusercontent.com/a-/ALV-UjV-MlTLJh9CdosuaS_28Dx2aOZi"
},
"updated": "2023-07-11T21:23:57.707819Z"
},
{
"created": "2023-05-09T19:27:04.839089Z",
"id": "FFFvOqkkVAAQYEe2o5asfICQAGTTG",
"rating": "FIVE", // Rating ONE, TWO, THREE, FOUR, FIVE
"review": "Great service, really useful product, well-crafted",
"reviewReply": {},
"reviewer": {
"name": "V the Man",
"profile": "https://lh3.googleusercontent.com/a-/ALV-UjULaIDBWwT"
},
"updated": "2023-05-09T19:27:04.839089Z"
},
{
"created": "2023-05-02T19:04:54.814104Z",
"id": "BBBOqkkVAAQYEe2o5asfICQAGTTG",
"rating": "FIVE",
"review": "Ayrshare has been a top-notch product and much needed for CRM. We integrated the API a while back and the code samples in the docs provided by the team have been great. I've also been happy with the new features they've added like on TikTok and Instagram as well as with their support during the integration process.",
"reviewReply": {},
"reviewer": {
"name": "David Manning",
"profile": "https://lh3.googleusercontent.com/a-/ALV-UjXph_y96HMlmDJMJaEHJ1vGkFseinq1UasKOy"
},
"updated": "2023-05-02T19:04:54.814104Z"
},
{
"created": "2023-04-16T22:30:14.481018Z",
"id": "CCCvOqkkVAAQYEe2o5asfICQAGTTG",
"rating": "FIVE",
"review": "I've been using Ayrshare's API for my real estate SaaS platform for a while now and it has been great. Appreciated the help on my coding bug and really excited try the TikTok direct publishing with my users.",
"reviewReply": {
"reply": "Thank you.",
"updated": "2023-04-16T22:41:10.885472Z"
},
"reviewer": {
"name": "Jason Gould",
"profile": "https://lh3.googleusercontent.com/a-/ALV-UjUnpfGdErOQUC4zz6Bg3HwFHZz4Lly9gMOJA"
},
"updated": "2023-04-16T22:30:14.481018Z"
}
],
"averageRating": 4.12, // Facebook will be 1, 0, or -1 corresponding to positive, neutral, or negative
"totalReviewCount": 5,
"lastUpdated": "2024-02-05T23:05:10.091Z",
"nextUpdate": "2024-02-05T23:16:10.091Z"
}
{
"action": "reviews",
"status": "error",
"code": 350,
"message": "Error getting reviews. Please verify there are reviews for this social network."
}
Request Examples
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/reviews?platform=gmb
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews?platform=gmb", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://app.ayrshare.com/api/reviews?platform=gmb', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews?platform=gmb';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace UserGETRequest_charp
{
class User
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews?platform=gmb";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}
Get a Single Review
GET
https://app.ayrshare.com/api/reviews/:id
Retrieve a single review. Currently only Google Business Profile reviews.
Path Parameters
Name | Type | Description |
---|---|---|
id* | string | The review ID. |
Query Parameters
Name | Type | Description |
---|---|---|
platform* | string | Values: |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Format: |
Profile-Key | string | Profile Key of a user profile. |
{
"gmb": [
{
"created": "2023-07-11T21:23:57.707819Z",
"rating": "FIVE", // Rating ONE, TWO, THREE, FOUR, FIVE
"review": "Been a great experience - like the documentation, example coding, and help desk.",
"reviewReply": {
"reply": "Thank you for the great thoughts.",
"updated": "2024-02-05T22:36:17.989625Z"
},
"reviewer": {
"name": "Mads Max",
"profile": "https://lh3.googleusercontent.com/a-/ALV-UjV-MlTLJh9CdosuaS"
},
"updated": "2023-07-11T21:23:57.707819Z"
}
],
"lastUpdated": "2024-02-05T23:27:03.147Z",
"nextUpdate": "2024-02-05T23:38:03.147Z"
}
{
"action": "analytics",
"status": "error",
"code": 323,
"message": "Error getting Google Business Profile analytics. Please try again later or contact us."
}
Request Examples
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace UserGETRequest_charp
{
class User
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}
Reply to a Review
POST
https://app.ayrshare.com/api/reviews
Add a reply to a review. Currently only Facebook or Google Business Profile reviews.
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Format: |
Profile-Key | string | Profile Key for a user profile. |
Request Body
Name | Type | Description |
---|---|---|
platform* | string | Values: |
reviewId* | string | The review ID. |
reply* | string | The String text for the review reply. |
{
"gmb": {
"action": "reply",
"status": "success",
"id": "AbFvOqmQJ4xMTl2mjZl0h83TcOj",
"reply": "This one is great",
"platform": "gmb",
}
},
{
"facebook": {
"status": "success",
"platform": "facebook",
"id": "376602035206384_737529881909727",
"reply": "This one is great too",
"action": "reply"
}
}
{
"gmb": {
"action": "reviews",
"status": "error",
"code": 349,
"message": "Error adding review. Please verify the review is still available.",
"details": "Requested entity was not found."
}
}
Request Examples
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"reviewId": "Ut1fWU6XkqkMayHGnJZ", "platform": "gmb", "reply": "An amazing review!"}' \
-X POST https://app.ayrshare.com/api/reviews
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
reviewId: "Ut1fWU6XkqkMayHGnJZ", // required
platform: "gmb", // required
reply: "An amazing review!", //required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'reviewId': 'Ut1fWU6XkqkMayHGnJZ',
'platform': 'gmb',
'reply': 'An amazing review!'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://app.ayrshare.com/api/reviews',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode([
'reviewId' => 'Ut1fWU6XkqkMayHGnJZ', // Replace with your actual review ID
'platform' => 'gmb',
'reply' => 'An amazing review!'
]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace PostPOSTRequest_charp
{
class Post
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"reviewId\" : \"Ut1fWU6XkqkMayHGnJZ\","
+ "\"platform\" : \"gmb\"",
+ "\"reply\" : [ \"An amazing review!\" ]}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}
Delete a Review Reply
DELETE
https://app.ayrshare.com/api/reviews
Delete a reply you did on a review. You must be the owner of the reply to delete. Currently only Google Business Profile review.
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Format: |
Profile-Key | string | Profile Key of a user profile |
Request Body
Name | Type | Description |
---|---|---|
platform* | string | Values: |
reviewId* | string | The review id of the reply to delete. |
{
"gmb": {
"action": "delete",
"status": "success",
"id": "AbFvOqmQJ4xMTl2mjZl0h83TcOj_tbjK742M9xobS_MCTLgDjplzi4dBGAsn-71ASv_RGwO5JQOtRA"
}
}
{
"gmb": {
"action": "reviews",
"status": "error",
"code": 349,
"message": "Error adding review. Please verify the review is still available.",
"details": "Requested entity was not found."
}
}
Request Examples
curl \
-H "Authorization: Bearer API_KEY" \
-d '{"reviewId": "Ut1fWU6XkqkMayHGnJZ", "platform": "gmb"}' \
-X DELETE https://app.ayrshare.com/api/reviews
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
reviewId: "Ut1fWU6XkqkMayHGnJZ", // required
platform: "gmb", // required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'reviewId': 'Ut1fWU6XkqkMayHGnJZ',
'platform': 'gmb'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://app.ayrshare.com/api/reviews',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode([
'reviewId' => 'Ut1fWU6XkqkMayHGnJZ', // Replace with your actual review ID
'platform' => 'gmb'
]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_DELETE => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace PostPOSTRequest_charp
{
class Post
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "DELETE";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"reviewId\" : \"Ut1fWU6XkqkMayHGnJZ\","
+ "\"platform\" : \"gmb\""}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}
Last updated