Social Media API
Stream Social Media Data From Major Platforms
Read profiles, pages, posts and hashtags on Facebook, Instagram, LinkedIn, Reddit, TikTok, Glassdoor and the BBB, and stream their content.
The Social Media API reads public profiles, pages, posts and hashtags on Facebook, Instagram, LinkedIn, Reddit, TikTok, Glassdoor and the BBB. Get a resource's details, or stream its content: posts, comments, followers, reactions, ads, interviews or complaints, all in one standardized format.
Key facts
- One-time jobs, or subscriptions that keep collecting new content and push it to your webhook
- Examples: an Instagram user's posts, a TikTok video's comments, a Facebook advertiser's ads, Glassdoor interviews, BBB complaints
- Resource details from 50 credits; streaming from 75 credits + 3 per item
How it works
Up and running in three steps
-
1
Pick a resource
Choose a network, a resource such as a user, page, post or hashtag, and the content you want: posts, comments, followers, ads and more.
-
2
Run a job or subscribe
Collect the content once, or subscribe to keep receiving new content as it is published.
-
3
Receive the data
Read it over the API or get it pushed to your webhook, in the same format for every network.
Example
Request and response
curl --location 'https://api.zembra.io/social/job/instagram/user/zembra/posts' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"internalId": "",
"sizeLimit": null,
"dateLimit": null
}'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.zembra.io/social/job/instagram/user/zembra/posts");
request.Headers.Add("Authorization", "Bearer {token}");
var content = new StringContent("{
\"internalId\": \"\",
\"sizeLimit\": null,
\"dateLimit\": null
}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.zembra.io/social/job/instagram/user/zembra/posts"
method := "POST"
payload := strings.NewReader(`{
"internalId": "",
"sizeLimit": null,
"dateLimit": null
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer {token}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{
\"internalId\": \"\",
\"sizeLimit\": null,
\"dateLimit\": null
}");
Request request = new Request.Builder()
.url("https://api.zembra.io/social/job/instagram/user/zembra/posts")
.method("POST", body)
.addHeader("Authorization", "Bearer {token}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"internalId": "",
"sizeLimit": null,
"dateLimit": null
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.zembra.io/social/job/instagram/user/zembra/posts", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$client = new Client();
$headers = [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json'
];
$body = '{
"internalId": "",
"sizeLimit": null,
"dateLimit": null
}';
$request = new Request('POST', 'https://api.zembra.io/social/job/instagram/user/zembra/posts', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
import requests
import json
url = "https://api.zembra.io/social/job/instagram/user/zembra/posts"
payload = json.dumps({
"internalId": "",
"sizeLimit": None,
"dateLimit": None
})
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.zembra.io/social/job/instagram/user/zembra/posts")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer {token}"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"internalId": "",
"sizeLimit": nil,
"dateLimit": nil
})
response = https.request(request)
puts response.read_body
Response
{
"message": "Streaming Instagram posts order received for user < zembra >. Please allow a few minutes before requesting data.",
"data": {
"job": {
"jobId": "",
"network": "instagram",
"slug": "zembra",
"resource": "user",
"content": "posts",
"internalId": "",
"requestedAt": "2023-01-01T00:00:00Z",
"expiresAt": "2023-01-01T00:00:00Z",
"sizeLimit": 100,
"dateLimit": null,
"cost": 150,
"active": false
},
"target": {
"slug": "zembra",
"remoteId": "32146585423198958",
"displayUrl": "https://instagram.com/instagram/profile.jpg",
"url": "https://instagram.com/zembra/",
"link": "https://my.zembratech.com/dashboard/instagram/users/MWJmZTc5MDZjMzg5OGI3OGMyNjJiODNjOGJjMWI3Y2Q/posts",
"network": "instagram",
"resource": "user",
"rawData": []
}
}
}
{
"message": "Invalid resource for selected network"
}
{
"message": "Invalid bearer token"
}
{
"message": "Cannot process request: balance too low!"
}
{
"message": "Requested network [Facebook] is not enabled for your account"
}
{
"message": "Requested post was not found on Instagram."
}
Supported platforms
7 platforms, one format#
Use cases
What teams build with it
Social listening
Follow what people say about a brand on posts, comments and hashtags.
Competitive intelligence
Track competitors' posts, followers and Facebook ads.
Employer branding
Collect Glassdoor interviews to understand candidate experience.
Customer complaints
Monitor BBB complaints alongside reviews.
FAQ
Common questions
Which networks are supported?
Facebook, Instagram, LinkedIn, Reddit, TikTok, Glassdoor and the Better Business Bureau.
What can I collect?
For example an Instagram user's posts or followers, a TikTok video's comments, a Facebook advertiser's ads, a subreddit's posts, Glassdoor interviews and BBB complaints.
How do subscriptions work?
Zembra rechecks the resource regularly and pushes new content to your webhook in small batches, so you never have to poll.
Pay only for what you use
Every Zembra service is paid with the same credits, and the more you use, the less each credit costs.
Start today for free
Create an account and get 10,000 free credits to try the Social Media API and every other Zembra service.