Professional SERP position tracking tool using DataForSEO API and PostgreSQL - Track keyword rankings, monitor competitors, and get automated alerts
npm install @magneteek/serp-tracker> Professional keyword position tracking tool for SEO agencies and marketers
Track your keyword rankings across Google search results with precision, automation, and beautiful visualizations. Built with DataForSEO API and PostgreSQL for reliable, cost-effective SERP monitoring.



---
---
``bashGlobal installation
npm install -g @magneteek/serp-tracker
$3
`bash
1. Set up database (Docker)
docker run --name serp-postgres \
-e POSTGRES_PASSWORD=yourpassword \
-e POSTGRES_DB=serp_tracker \
-p 5432:5432 -d postgres:152. Install schema
docker exec -i serp-postgres psql -U postgres -d serp_tracker < database/schema.sql3. Configure environment
cp .env.example .env
Edit .env with your credentials
4. Add your first project
npm run setup5. Start tracking
npm run track:high6. View results
npm run dashboard
`See INSTALLATION.md for detailed setup instructions
---
π Usage
$3
Interactive wizard (recommended):
`bash
npm run setup
`The wizard will guide you through:
1. Project name and domain
2. Target location and language
3. Competitor domains
4. Keywords with priorities (high/medium/low)
5. Initial tracking configuration
Manual configuration:
Edit
config/tracking-config.json and run:
`bash
npm run import
`$3
`bash
Track by priority
npm run track:high # Daily tracking
npm run track:medium # Weekly tracking
npm run track:low # Monthly trackingTrack specific project
serp-tracker track --project PROJECT_UUID --priority highDry run (test without API calls)
serp-tracker track --dry-run --priority high
`$3
`bash
Interactive dashboard
npm run dashboardOr use the CLI
serp-tracker dashboardFilter by project
serp-tracker dashboard --project PROJECT_UUIDShow only alerts
serp-tracker dashboard --alerts
`Example output:
`
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π SERP Tracker Dashboard
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ π Example Website
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Keyword Position Target Change Status
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
best seo tools #3 π₯ #1 β +2 3 above
keyword research #8 π #5 β 0 3 away
serp tracking #15 β #10 β -3 5 away
π Summary Statistics
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Total Keywords: 18
Average Position: 12.3
π₯ Top 3: 5 keywords
π Top 10: 8 keywords
`$3
Set up cron jobs:
`bash
High priority - daily at 2 AM
0 2 * cd /path/to/serp-tracker && npm run track:highMedium priority - weekly on Monday
0 9 1 cd /path/to/serp-tracker && npm run track:mediumLow priority - monthly on 1st
0 10 1 cd /path/to/serp-tracker && npm run track:lowSync to Notion - daily at 3 AM
0 3 * cd /path/to/serp-tracker && npm run sync:notion
`---
π° Pricing
$3
$0.00075 per keyword check (very affordable!)
| Priority | Frequency | Keywords | Monthly Cost |
|----------|-----------|----------|--------------|
| High | Daily (30 checks) | 10 | $0.225 |
| Medium | Weekly (4 checks) | 20 | $0.06 |
| Low | Monthly (1 check) | 30 | $0.0225 |
| Total | Mixed | 60 | ~$0.31/month |
Example Projects:
- Small site (20 keywords): ~$0.45/month
- Medium site (50 keywords): ~$1.13/month
- Agency (200 keywords): ~$4.50/month
Free trial: $1 credit = 1,333 keyword checks!
$3
The tracker includes intelligent caching that reduces costs by 70-80%:
- 1-hour cache for repeated checks
- Batch processing with delays
- Priority-based tracking frequencies
---
π οΈ Advanced Features
$3
Combine SERP position data with actual performance metrics:
`bash
npm run sync:gsc
`Benefits:
- Compare positions with actual clicks
- Identify CTR optimization opportunities
- Track impression share
- Validate position data with real metrics
$3
Create beautiful client-facing dashboards:
`bash
npm run sync:notion --setup # Initial setup
npm run sync:notion # Sync data
`Features:
- Automatic database creation
- Real-time position updates
- Alert notifications
- Trend visualizations
$3
Get instant alerts via Slack, Discord, or custom webhooks:
`javascript
// In .env
WEBHOOK_SLACK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
WEBHOOK_DISCORD_URL=https://discord.com/api/webhooks/YOUR/WEBHOOK
`Alert types:
- Critical: Position drops >10 positions
- Warning: Position drops >5 positions
- Opportunity: Keyword enters top 20
- Competitor: Competitor moves into top 3
---
π Project Structure
`
serp-tracker/
βββ bin/
β βββ serp-tracker.js # CLI entry point
βββ config/
β βββ tracking-config.json # Project configurations
β βββ cron-schedule.conf # Automation schedules
βββ database/
β βββ schema.sql # PostgreSQL schema
βββ lib/
β βββ serp-tracker.js # Core tracking engine
βββ scripts/
β βββ setup-project.js # Interactive setup wizard
β βββ track-priority-keywords.js # Main tracking script
β βββ dashboard.js # CLI dashboard
β βββ sync-gsc-data.js # GSC integration
β βββ sync-to-notion.js # Notion sync
βββ .env.example # Environment template
βββ INSTALLATION.md # Detailed setup guide
βββ package.json
`---
π§ͺ Development
$3
- Node.js v18+
- PostgreSQL 15+
- DataForSEO API account
$3
`bash
Clone repository
git clone https://github.com/yourusername/serp-tracker.git
cd serp-trackerInstall dependencies
npm installConfigure environment
cp .env.example .env
Edit .env with your credentials
Set up database
docker run --name serp-postgres \
-e POSTGRES_PASSWORD=devpassword \
-e POSTGRES_DB=serp_tracker_dev \
-p 5432:5432 -d postgres:15Install schema
docker exec -i serp-postgres psql -U postgres -d serp_tracker_dev < database/schema.sqlRun tests
npm test
`$3
`bash
Dry run (no API calls)
npm testTest specific project
node scripts/track-priority-keywords.js --dry-run --project PROJECT_UUIDTest dashboard
npm run dashboard
`---
π Database Schema
The tracker uses PostgreSQL with 6 main tables:
- tracked_keywords - Keywords being monitored
- position_history - Time-series position data
- gsc_performance - Google Search Console metrics
- competitor_positions - Competitor tracking data
- tracking_alerts - Generated alerts
- sync_log - Audit trail
$3
- Time-series partitioning for performance
- Analytical views for common queries
- Triggers for automated alert generation
- Foreign key relationships for data integrity
See
database/schema.sql for complete structure.---
π Security
- β
Environment-based credentials (never committed)
- β
Database connection encryption
- β
API key validation
- β
Rate limiting to prevent abuse
- β
Parameterized queries (SQL injection prevention)
Best practices:
1. Never commit
.env to version control
2. Use strong database passwords
3. Rotate API credentials regularly
4. Limit database access by IP
5. Use read-only database users for queries---
π€ Contributing
Contributions are welcome! Please follow these guidelines:
1. Fork the repository
2. Create a feature branch (
git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature`)- Follow existing code style
- Add tests for new features
- Update documentation
- Keep commits atomic and descriptive
---
This project is licensed under the MIT License - see the LICENSE file for details.
---
- DataForSEO - Reliable SERP data API
- PostgreSQL - Robust time-series database
- Notion - Beautiful dashboard integration
- ORCHESTRAI - Original project framework
---
- Documentation: INSTALLATION.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@orchestrai.com
---
- [ ] Bing and Yahoo SERP tracking
- [ ] Mobile app for iOS/Android
- [ ] Advanced competitor analysis
- [ ] AI-powered content recommendations
- [ ] Multi-user support with permissions
- [ ] Custom reporting and exports
- [ ] API for third-party integrations
- [ ] White-label dashboard
---
If this tool helps your SEO workflow, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting features
- π Contributing code
- π’ Sharing with others
---
Built with β€οΈ by ORCHESTRAI
npm β’ GitHub β’ Documentation