> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.simplified.com/api-reference/social-media/analytics/get-social-media-analytics-audience/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 audience analytics for a social media account GET https://api.simplified.com/api/v1/service/social-media/analytics/audience Retrieve audience analytics data (followers, demographics, growth) for a specific social media account within a date range. Reference: https://docs.simplified.com/api-reference/social-media/analytics/get-social-media-analytics-audience ## Authentication - `Authorization` header (required) (prefixed with ` Api-Key `) — Header authentication of the form `Api-Key ` - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, 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 - `tz` (string, optional) — Timezone (e.g. UTC, Europe/Warsaw) ## Response ### 200 Audience analytics data - `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. - `data` (AnalyticsAudienceResponseData, optional) — Audience data varies by social network and may be empty ## Types ### AnalyticsAudienceResponseData Audience data varies by social network and may be empty - `audience_page_fans_gender_age` (AnalyticsAudienceResponseDataAudiencePageFansGenderAge, optional) — Gender/age breakdown — may be an empty array or an object with age/gender keys - `audience_page_fans_country` (map from string to integer, optional) — Followers count by country code - `audience_page_fans_city` (map from string to integer, optional) — Followers count by city name ### AnalyticsAudienceResponseDataAudiencePageFansGenderAge Gender/age breakdown — may be an empty array or an object with age/gender keys ## Examples **Response** ```json { "status": "ENABLED", "account_active": true, "data": { "audience_page_fans_gender_age": {}, "audience_page_fans_country": {}, "audience_page_fans_city": {} } } ``` **SDK Code** ```python import requests url = "https://api.simplified.com/api/v1/service/social-media/analytics/audience" querystring = {"account_id":"1","date_from":"date_from","date_to":"date_to"} headers = {"Authorization": "Api-Key "} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.simplified.com/api/v1/service/social-media/analytics/audience?account_id=1&date_from=date_from&date_to=date_to'; const options = {method: 'GET', headers: {Authorization: 'Api-Key '}}; 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/audience?account_id=1&date_from=date_from&date_to=date_to" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Api-Key ") 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/audience?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 ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.simplified.com/api/v1/service/social-media/analytics/audience?account_id=1&date_from=date_from&date_to=date_to") .header("Authorization", "Api-Key ") .asString(); ``` ```php request('GET', 'https://api.simplified.com/api/v1/service/social-media/analytics/audience?account_id=1&date_from=date_from&date_to=date_to', [ 'headers' => [ 'Authorization' => 'Api-Key ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.simplified.com/api/v1/service/social-media/analytics/audience?account_id=1&date_from=date_from&date_to=date_to"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Api-Key "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Api-Key "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.simplified.com/api/v1/service/social-media/analytics/audience?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() ```