Learn how to create, secure, and use API keys for authenticating requests and integrating Cleversearch into your stack.
Usage: Use in backend services and server actions
Exposure: Never expose in client-side code
Usage: Use in browser integrations with restricted scope
Exposure: Safe for client-side use
Usage: Validate webhook payloads on your server
Exposure: Store in secure environment variables
Send your secret key in the Authorization header
curl https://api.cleversearch.ai/v1/analysis \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Keep keys out of source control
# .env.local
CLEVERSEARCH_SECRET_KEY=YOUR_SECRET_KEY
CLEVERSEARCH_PUBLISHABLE_KEY=YOUR_PUBLISHABLE_KEY
# Usage in server code
const apiKey = process.env.CLEVERSEARCH_SECRET_KEY;Validate webhook signatures before processing
import { verifyWebhook } from "@/lib/webhooks";
const isValid = verifyWebhook({
payload: requestBody,
signature: req.headers["x-cleversearch-signature"],
secret: process.env.CLEVERSEARCH_WEBHOOK_SECRET,
});Store keys in .env.local and never commit to git.
Use dedicated keys with reduced scopes for testing.
Use least-privilege keys and rotate on a schedule.
Rotate keys every 90 days or immediately after exposure.
Create keys scoped to only the resources they need.
Track API usage and set alerts for unusual activity.
Check that you are using the correct key and header format.
The key does not have permission for this endpoint.
Reduce request volume or contact support for higher limits.
Ready to connect your data and start optimizing? Follow the setup guides to complete your integration.
Key management should be predictable, auditable, and automated where possible.
Week 1: Foundation
Finish installation and validate data flow.
Output: Connected tracker, imported sitemap, baseline analysis report.
Week 2: Prioritization
Select high-impact pages and define task backlog.
Output: Prioritized optimization list with owners and due dates.
Week 3-4: Iteration
Ship updates and verify score + business impact.
Output: Before/after snapshots with measurable deltas.
Analyzed Coverage
>= 90% priority URLs analyzed monthly
Ensures optimization decisions are based on current data.
Score Movement
+8 to +15 points on target templates in 30-60 days
Validates that executed recommendations are improving quality.
Execution Velocity
At least 1 improvement cycle per week
Creates compounding gains from consistent iteration.