Socialhose is a social-listening and media-monitoring API for turning large streams of public mentions into usable campaign intelligence. It helps backend applications answer questions like:
- What are people saying about a campaign, brand, organization, product, policy, person, or event?
- Which platforms are driving the conversation?
- Is sentiment improving or deteriorating?
- Which mentions have the most reach or engagement?
- Which keywords, topics, or entities are trending?
- Who should receive alerts or mailing-list updates?
The SDK wraps the Socialhose REST API with typed JavaScript/TypeScript methods for campaign discovery, analytics dashboards, mention search, mailing lists, and SDK-composed entity analytics. It handles API-key auth, browser-compatible headers, retries, timeouts, GET caching, and normalized response shapes so product code can focus on the analysis instead of raw HTTP plumbing.
## What you can build with it
Use `@socialhose/api` from server-side JavaScript/TypeScript to build:
- Social-listening dashboards for campaigns, topics, brands, people, organizations, or locations.
- Monitoring tools that search public mentions across supported platforms.
Node 18+ is required because the SDK uses built-in `fetch`, `Response`, and `AbortSignal.timeout`. You can pass a custom `fetch` implementation if needed.
Campaigns are the API's top-level monitoring containers. Use them to discover what this API key can access, resolve IDs, and scope analytics or mention search.
-`getOverview()` — total mentions, authors, estimated reach, sentiment distribution, platform breakdown, engagement, and growth.
-`getTimeline()` — time-series mention volume with sentiment and engagement buckets.
-`getSentiment()` — aggregate and platform-specific sentiment splits.
-`getShareOfVoice()` — compares campaigns by mention share, engagement, and sentiment.
-`getPlatforms()` — mention and engagement totals grouped by platform.
-`getTopKeywords()` — most frequent keywords with sentiment split.
-`getTrending()` — keywords whose volume changed against the previous period.
-`getTopMentions()` — high-impact mentions with reach, engagement, author, URL, and content preview.
### Mention search
Mentions are the underlying public posts/articles/items Socialhose has collected and classified. Search them by campaign, date, platform, sentiment, content, page, and ordering.
Use this for feeds, search results, moderation queues, source inspection, custom reports, or downstream enrichment.
### Entity analytics
Entity helpers build analytics around one search term even when native analytics endpoints are campaign-scoped. They use `/mentions/` facets to produce compact profiles for people, organizations, brands, products, places, hashtags, or arbitrary terms.
The SDK sends `Authorization: Api-Key <key>` and a browser-like `User-Agent` by default. The user-agent is intentional: the current Socialhose API edge rejects some non-browser requests.
Preferred publish path is the release workflow, which runs with npm provenance from CI. Before publishing, verify npm authentication and `@socialhose` scope access:
For the actual release, publish from CI with provenance enabled. If you must publish locally, first confirm whether npm provenance is supported in that environment.