Create Tracking
Create a new tracking configuration to monitor specific Twitter/X accounts, keywords, hashtags, and topics based on your criteria.Endpoint
HTTP Request
Request Body
Request Parameters
Required Parameters
name
- Type: String
- Description: Human-readable name for the tracking configuration
- Max Length: 255 characters
- Example:
JavaScript Programming Tracker
type
- Type: String
- Description: Type of tracking configuration
- Options:
keyword: Track specific keywords and hashtagsuser: Track specific user accountstopic: Track broader topics and trends
- Example:
keyword
config
- Type: Object
- Description: Main tracking configuration
- Properties: Varies by tracking type
Configuration Properties
Keyword Tracking (type: “keyword”)
- keywords: Array of keywords to track
- hashtags: Array of hashtags to track
- users: Array of specific users to include
- language: Language code (e.g., “en”, “es”, “fr”)
- min_followers: Minimum follower count for users
- verified_only: Only track verified users
- exclude_retweets: Exclude retweets from results
User Tracking (type: “user”)
- users: Array of usernames to track
- include_retweets: Include user’s retweets
- include_replies: Include user’s replies
- track_mentions: Track mentions of tracked users
Topic Tracking (type: “topic”)
- topic: Main topic to track
- related_terms: Related terms and keywords
- trending_threshold: Minimum mentions for trending detection
- sentiment_analysis: Enable sentiment analysis
Optional Parameters
filters
- Type: Object
- Description: Additional filtering criteria
- Properties:
- sentiment: Filter by sentiment (“positive”, “negative”, “neutral”)
- engagement_min: Minimum engagement count
- date_range: Date range for tracking
delivery
- Type: Object
- Description: Data delivery configuration
- Properties:
- method: Delivery method (“webhook”, “api”, “stream”)
- webhook_id: Webhook ID for webhook delivery
- batch_size: Number of items per batch
- frequency: Delivery frequency (“realtime”, “hourly”, “daily”)
active
- Type: Boolean
- Description: Whether tracking should be immediately active
- Default:
true - Example:
true
description
- Type: String
- Description: Detailed description of tracking purpose
- Max Length: 1000 characters
- Example:
Track JavaScript programming content from verified users
Response Format
Success Response (201 Created)
Error Response (400 Bad Request)
Implementation Examples
JavaScript (Node.js)
Python
cURL
Advanced Configurations
Boolean Logic Tracking
Geographic Filtering
Sentiment-Based Tracking
Error Handling
Common Error Codes
400 Bad Request
- Invalid Configuration: Tracking configuration is malformed
- Missing Required Fields: Required parameters are missing
- Invalid Values: Parameter values are invalid
401 Unauthorized
- Invalid API Key: API key is missing or invalid
- Insufficient Permissions: API key lacks tracking creation permissions
409 Conflict
- Duplicate Tracking: Similar tracking configuration already exists
- Tracking Limit: Maximum number of tracking configurations reached
429 Too Many Requests
- Rate Limit: Too many tracking creation requests
- Retry After: Check
Retry-Afterheader for retry time
Error Handling Implementation
Best Practices
Configuration Design
- Specific Criteria: Use specific, relevant keywords and filters
- Performance Optimization: Avoid overly broad tracking criteria
- Testing: Test tracking configurations with small datasets first
- Documentation: Document tracking purposes and configurations
Resource Management
- Monitoring: Monitor tracking performance and data volume
- Optimization: Regularly review and optimize tracking configurations
- Cost Management: Consider data volume and processing costs
- Scaling: Plan for scaling based on data volume
Data Quality
- Validation: Validate tracking configuration before creation
- Quality Checks: Monitor data quality and completeness
- Filter Refinement: Continuously refine filters for better results
- Performance Monitoring: Track tracking effectiveness and ROI