> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.simplified.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.simplified.com/_mcp/server.

# Social · Analytics · Get analytics for social media posts

GET https://api.simplified.com/api/v1/service/social-media/analytics/posts

Retrieve analytics data for individual posts of a specific social media account within a date range.

Reference: https://docs.simplified.com/api-reference/social-media/analytics/get-social-media-analytics-posts

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key   `) — Header authentication of the form `Api-Key  <token>`
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `account_id` (integer, required) — Social media account ID
- `date_from` (date, required) — Start date in format YYYY-MM-DD
- `date_to` (date, required) — End date in format YYYY-MM-DD
- `page` (integer, optional, default: 1) — Page number for pagination
- `per_page` (integer, optional, default: 10) — Number of posts per page (max 100). Use with all_posts_count and pages_count from the response to paginate through all results.

## Response

### 200

Analytics data for posts

- `status` (enum, optional) — Analytics availability for the requested account. Values are returned UPPERCASE by the API (the gateway does not normalize them). When not `ENABLED` or `PROCESSING`, the rest of the response will typically be empty/null and the agent should surface a reconnect/enable CTA instead of rendering a chart.
  - Allowed values: `ENABLED`, `PROCESSING`, `DISABLED`, `ERROR`, `NO_PERMISSION`, `NOT_SUPPORTED`
- `account_active` (boolean, optional) — `false` when the social account itself is disconnected and needs a fresh OAuth reconnect (independent of `status`). When `false`, surface a "Reconnect account" CTA before any analytics data.
- `all_posts_count` (integer, optional)
- `current_page` (integer, optional)
- `pages_count` (integer, optional)
- `posts` (list of AnalyticsPostsResponsePostsItems, optional, nullable)

## Types

### AnalyticsPostsResponsePostsItems

- `id` (string, optional)
- `message` (string, optional, nullable)
- `publishedDate` (AnalyticsPostsResponsePostsItemsPublishedDate, optional, nullable)
- `postUrl` (string, optional, nullable)
- `postType` (string, optional, nullable) — e.g. IMAGE, VIDEO, TEXT
- `media` (list of AnalyticsPostsResponsePostsItemsMediaItems, optional, nullable)
- `metrics` (map from string to double, optional, nullable) — Metrics vary by social network

### AnalyticsPostsResponsePostsItemsPublishedDate

- `date` (string, optional) — Datetime string, e.g. 2026-03-01 12:24:16.000000
- `timezone_type` (integer, optional)
- `timezone` (string, optional)

### AnalyticsPostsResponsePostsItemsMediaItems

- `type` (string, optional)
- `url` (string, optional)

## Examples

**Response**

```json
{
  "status": "ENABLED",
  "account_active": true,
  "all_posts_count": 1,
  "current_page": 1,
  "pages_count": 1,
  "posts": [
    {
      "id": "string",
      "message": "string",
      "publishedDate": {
        "date": "string",
        "timezone_type": 1,
        "timezone": "string"
      },
      "postUrl": "string",
      "postType": "string",
      "media": [
        {
          "type": "string",
          "url": "string"
        }
      ],
      "metrics": {}
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.simplified.com/api/v1/service/social-media/analytics/posts"

querystring = {"account_id":"1","date_from":"date_from","date_to":"date_to"}

headers = {"Authorization": "Api-Key  <apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to';
const options = {method: 'GET', headers: {Authorization: 'Api-Key  <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Api-Key  <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to")
  .header("Authorization", "Api-Key  <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Api-Key  <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.simplified.com/api/v1/service/social-media/analytics/posts?account_id=1&date_from=date_from&date_to=date_to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```