Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Every call but sprout-social.metadata.client takes a customer_id in the path: read it from sprout-social.metadata.client first.
- Profile ids (customer_profile_id) come from sprout-social.metadata.profiles; analytics and messages filters need them.
- Rate limits: 60 requests a minute, refilled at one a second, and 250,000 a month; X-RateLimit-Limit and X-RateLimit-Remaining report where you stand; over the limit a call gets a 429.
- Filters are strings in Sprout’s own syntax: field.op(values), e.g. customer_profile_id.eq(1234, 5678) or created_time.in(2024-04-01T00:00:00..2024-04-30T23:59:59); ’..’ includes the end, ’…’ excludes it.
- Publishing, media upload and case changes are writes and are not in this entry; listening topics and cases are not listed either.
Endpoints
List my customers
List connected profiles
List groups
List message tags
Get profile analytics
- A POST that only reads: the query goes in the JSON body.
- Days follow each network’s own clock: UTC for X, LinkedIn, Pinterest and TikTok; Pacific time for Facebook, Instagram and YouTube.
- Rows come back by day and profile; paging.total_pages says how many pages there are.
Get post analytics
- A POST that only reads: the query goes in the JSON body.
- Page paging stops at 10,000 posts. Past that, sort by guid:asc, include guid in fields, filter guid.gt(<last guid>) instead of sending page, and repeat until data is empty.
- Google Business Profile posts reach back 30 days only; review sites (Yelp, Trustpilot, TripAdvisor, Glassdoor) are not available.
List inbox messages
- A POST that only reads: the query goes in the JSON body; it neither replies nor marks anything.
- Cursor paging only: send page_cursor until an answer comes back with no paging object. There is no page number.
- Direct messages come with text and metadata, but their media links do not work.