Guides
Nightly crawl automation
Use the Developer API to queue a full-site crawl every night, wait for completion, and notify your team when scores drop or critical issues appear.
Queue at 2 AM UTC, poll until complete, optionally list shared reports.
Replace polling with job.completed / job.failed webhooks for Slack or PagerDuty.
Overview
A typical nightly workflow looks like this:
- Resolve the property ID (once) via
GET /properties. - Queue a scan with
POST /properties/:id/scans. - Poll
GET /jobs/:iduntil status iscompletedorfailed. - Optionally fetch shared reports with
reports:readif you publish audit links.
Full endpoint reference: Developer API docs.
Queue & poll
Send an optional body to cap crawl depth for faster nightly runs. Use an Idempotency-Key header so retries do not enqueue duplicate jobs. A 202 response includes data.job.id — poll every 30–60 seconds until the job completes.
curl -s -X POST \
-H "Authorization: Bearer $XF_API_KEY" \
-H "Idempotency-Key: nightly-$(date +%Y-%m-%d)-PROPERTY_ID" \
-H "Content-Type: application/json" \
-d '{"maxPages": 500, "maxDepth": 5}' \
https://api.xenonflare.com/api/v1/properties/$XF_PROPERTY_ID/scansPoll until complete
Most site scans finish within a few minutes depending on size and plan limits. See the Poll job tab above for a bash loop, or register webhooks for job.completed / job.failed.
Cron example
Run at 2:00 AM UTC on a server with curl and jq installed — use the Cron line tab above in your crontab. Store your API key in a secrets manager or environment variable; never commit it to version control.
Alerting on regressions
After the job completes, inspect data.job.result or compare scores in your own database. For stakeholder-facing summaries, create a share link in the web app and list reports via GET /reports with the reports:read scope.
Related
- CI pipeline integration
- Example scan diff
- Scheduled SEO monitoring
- Agency portfolio monitoring
- Developer API reference
- Idempotency guide
- Site audit API
- SEO automation API
Create an API key
Queue nightly scans from cron with jobs:write and jobs:read scopes on your API key.
Developer API access requires Starter, Growth, or Agency. Free tier includes the web app and free marketing tools — not API keys.