• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
charmaine

charmaine

twitterCompetitorMonitoring

Remix of jamiedubs/twitterCompetitorMonitoring
Unlisted
Like
1
twitterCompetitorMonitoring
Home
Code
3
backend
1
frontend
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
2
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://charmaine--9dfa14dc55d911f08fcaf69ea79377d9.web.val.run
README.md

Competitor Tweet Monitor

A web application for searching and monitoring tweets mentioning your competitors using powerful OR query statements.

Project Structure

├── backend/
│   └── index.ts (http)      # Main HTTP API and static file server
├── frontend/
│   └── index.html          # Web interface for searching tweets
└── README.md

Environment Variables

Required

  • TWITTER_BEARER_TOKEN: Your Twitter API bearer token for searching tweets

Getting a Twitter API Token

  1. Go to developer.twitter.com and create a developer account
  2. Create a new app in the Twitter Developer Portal
  3. Navigate to the "Keys and tokens" tab
  4. Generate a Bearer Token
  5. Set the TWITTER_BEARER_TOKEN environment variable in Val Town with this token

How to Use

  1. Set up the TWITTER_BEARER_TOKEN environment variable with your Twitter API bearer token.
  2. Visit the web interface to enter custom search queries.
  3. Use OR statements to search for multiple competitors at once.
  4. View real-time results from the last 7 days.

Query Examples

Multiple Twitter Accounts

"@competitor1" OR "@competitor2" OR "@competitor3"

Domain Names

"competitor.com" OR "rival.io" OR "alternative.ai"

Mixed Queries

"@openai" OR "chatgpt" OR "claude" OR "@anthropic" OR "openai.com"

Advanced Queries

("@competitor1" OR "competitor1.com") AND (product OR launch OR announcement)

Features

  • Interactive Web Interface: Easy-to-use form for entering custom queries
  • OR Query Support: Search multiple competitors simultaneously
  • Real-time Results: Get tweets from the last 7 days instantly
  • Rich Tweet Display: Shows author, content, metrics, and direct links
  • Quick Examples: Pre-built query templates for common use cases
  • Responsive Design: Works on desktop and mobile devices
  • Error Handling: Clear feedback for API issues or invalid queries

API Endpoints

  • GET / - Main web interface
  • POST /api/search - Search tweets with custom query
  • GET /api/health - Check API configuration status

Tweet Data Included

Each tweet result includes:

  • Author name and username
  • Tweet content
  • Creation timestamp
  • Engagement metrics (likes, retweets, replies)
  • Direct link to original tweet
  • Retweet indicator
HTTP
  • index.ts
    charmaine--9d…d9.web.val.run
Code
backendfrontendREADME.md
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.