Automate with the API
Everything the app does in the browser can be driven from your own code. There are two levels: a public scan endpoint that queues an audit without an account, and an authenticated v1 API for managing projects and reports.
Queue a scan without an account
The public endpoint takes a domain and queues a full audit:
curl -X POST https://app.laravelseo.com/api/v1/public/scan \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}' The response tells you the scan was queued and gives you the report id:
{
"message": "Scan queued successfully.",
"domain": "example.com",
"report_id": 219,
"status": "pending"
}
Poll GET /api/v1/public/scan/{domain} to follow the scan's status until the report is ready.
Get an API key
Log in, go to Account → API and generate a key. Send it with every v1 request as a bearer token. Keys are tied to your account, so every project and report you touch over the API is the same one you see in the dashboard.
The v1 resources
- Projects: list and delete the projects in your account (
GET /api/v1/projects). - Reports: full management of audit reports (
/api/v1/reports), including creating new ones. - Account: read your account details (
GET /api/v1/account).
Requests are throttled per key, which keeps batch jobs polite. The full endpoint reference lives in the app itself under Developers in the footer, with a page per resource covering parameters and responses.
A typical automation
- Nightly job:
POST /api/v1/public/scanfor each domain you watch. - Poll the scan status until the report is ready.
- Pull the report over the v1 API and store the score.
- Alert when a score drops below your floor, then read the report's high issues to see why.
Try it yourself
Everything in this tutorial runs in the live app.