Brand Sentiment Analyzer
Overview
This automation analyzes brand sentiment in online communities using AI. Give it a brand name, and it finds the most relevant Reddit communities to watch and prepares a sentiment report endpoint you can call from your tools. It’s built on FastAPI, uses AI behind the scenes (Gemini 2.5 via the CodeWords runtime), and is set up to expand into Twitter/X and LinkedIn sources. It’s a simple way to keep tabs on what people are saying about your brand—without manually hunting through posts.
Description
This automation turns a brand name into a sentiment report by combining social discussion sources into a single, structured output. It first uses AI technology to suggest the most relevant subreddits for that brand, then prepares a report endpoint you can call from your app or workflow. In parallel, it’s wired for future web crawling and social listening through your browser extension and a web crawler. After gathering the right communities to watch, it formats the result as a clean, markdown report so you can copy, share, or feed it into your dashboards for quick insights that guide marketing, support, and product decisions.
Key Features
AI subreddit discovery: Finds active, relevant Reddit communities for a given brand using Gemini 2.5 (flash) via the CodeWords runtime.
Simple API endpoint: One FastAPI POST endpoint (/) that accepts a brand name and returns a markdown report payload.
Structured outputs: Uses Pydantic models for clean, predictable request/response schemas you can rely on.
Ready for multi-source sentiment: Designed to expand to Reddit, Twitter/X, and LinkedIn by plugging in a web crawler and a browser extension.
Async-first design: Async OpenAI client and FastAPI make it fast and scalable for batch or on-demand use.
Built-in logging: CodeWords logger provides clear, contextual logs for each step of the analysis.
Environment-based config: Toggle behavior and credentials with environment variables, including an optional browser extension key for LinkedIn search.
Extensible codebase: Firecrawl and CodeWords clients are included to add real scraping, enrichment, and deeper analysis as you grow.
Instructions
Open the automation in CodeWords and add your environment values (API key, runtime URI, and optional browser extension key).
Start the automation and wait for the API to come online.
Send a POST request to/with a JSON body like { "brand_name": "Apple" }. You can do this from your app, Postman, or curl.
Check the response for the markdown sentiment report and the brand name you sent.
Review the suggested Reddit communities, and note ideas for adding Twitter/X or LinkedIn later.
Iterate as needed: adjust the brand name, try additional brands, or extend the code to pull real posts and update the report content.
Use Case
This automation is perfect for marketing and comms teams, founders, community managers, and product folks who want a quick, repeatable way to see where people talk about their brand and summarize the vibe. It’s great for weekly check-ins, launch monitoring, investor prep, or proactive support—without spending hours digging through threads.
Frequently Asked Questions
Last updated