Vercel Integration
Connect RankVectors with your Vercel deployments
Overview
The Vercel integration automatically syncs content on deployment and works seamlessly with serverless functions.
Installation
- Install the RankVectors Vercel integration
- Connect your Vercel account
- Select projects to sync
- Configure webhook endpoints
Configuration
- Go to your Vercel dashboard
- Navigate to Integrations > RankVectors
- Authorize RankVectors
- Select which deployments to sync
Features
- Automatic Sync on Deploy: Content syncs on each deployment
- Serverless Support: Works with edge functions
- Preview Deployments: Sync preview environments
- API Routes: Use RankVectors in API routes
Usage
Once configured:
- Deploy your site as usual
- RankVectors automatically syncs content
- Generate suggestions via API or dashboard
- Implement links programmatically
API Usage in Vercel
Use RankVectors in your Vercel API routes:
// pages/api/rankvectors.js
import { RankVectors } from '@rankvectors/rankvectors-javascript'
export default async function handler(req, res) {
const client = new RankVectors({
apiKey: process.env.RANKVECTORS_API_KEY
})
// Sync content on deploy
if (req.method === 'POST') {
const result = await client.pages.sync(projectId, {
url: req.body.url,
content: req.body.content
})
res.json(result)
}
}
Environment Variables
Add your API key to Vercel environment variables:
RANKVECTORS_API_KEY=your_api_key_here
Webhooks
Set up webhooks to sync on deployment:
// api/webhooks/vercel.js
export default async function handler(req, res) {
// Verify webhook signature
// Sync content on deployment
}
Troubleshooting
⚠️
Ensure your API key is set in Vercel environment variables.
Common issues:
- Deploy not syncing: Check webhook configuration
- API key missing: Verify environment variables
- Edge function issues: Use compatible SDK version
Support
For Vercel-specific issues, contact support at support@rankvectors.com.