Public API: authenticate, create and follow results

Use the versioned API for integrations. Keep credentials on your server and consult the current OpenAPI document before depending on a response shape.

Create a key and protect it

Create a public API key in API & settings and send it as an Authorization: Bearer header. The versioned routes are under /api/v1. The browser ownership token belongs to the web workflow; it is not the recommended credential for an external integration. Never embed an API key in client-side JavaScript, commit it to a repository or include it in an address query string.

Use a secret store or an environment variable on your backend. Restrict access to logs and redact authorization headers before sending diagnostics. Revoke a key that has been exposed and replace it in the integration. A missing, invalid or revoked key returns HTTP 401. Authentication does not remove usage quotas or grant access to another owner’s private reports.

Submit a small, explicit request

POST /api/v1/scans creates a scan for an HTTP or HTTPS URL, up to 2048 characters. The optional target_keyword accepts 2–80 characters. This example uses a placeholder environment variable, not a real credential. Replace the public URL with a resource you are authorized to test; do not include a secret or private access token in that URL.

An optional Idempotency-Key helps retry a creation request safely. Keep the same key for the same logical operation and payload; choose a new key for a new operation. The accepted format is 1–128 characters using letters, digits, dots, underscores, colons and hyphens. Do not assume that every endpoint supports idempotency or that a key replaces reading an error response.

curl -X POST https://urltune.com/api/v1/scans \
  -H "Authorization: Bearer $URLTUNE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: release-check-001" \
  -d '{"url":"https://example.com/","target_keyword":"example"}'

Follow the identifier, not a fixed delay

Read the returned resource identifier and use GET /api/v1/scans/{id} to follow it. Browser processing can finish after the initial technical stage. Do not assume that waiting a fixed number of seconds guarantees completion; inspect the current states and available result fields. Use bounded polling with increasing delays rather than a tight request loop.

For site work, POST /api/v1/crawls accepts a starting URL, optional sitemap_url and a limit from 2 to 100. Follow GET /api/v1/crawls/{id}. Listing routes provide cursor-based pagination; treat a returned cursor as opaque instead of generating the next one yourself. Design your integration to tolerate optional fields and explicitly unavailable analysis stages.

Handle quotas and validation before retrying

HTTP 422 indicates invalid input and should lead to a corrected request, not an automatic identical retry. HTTP 429 indicates a rate or usage restriction; honor Retry-After when supplied and inspect /api/v1/usage. API-key daily and per-minute limits are distinct from workload allowances. A private or missing resource can return 404 without confirming its existence to another owner.

Use the live reference at /api/docs and machine-readable specification at /api/docs/openapi.json for current schemas and endpoint details. Keep a request identifier and sanitized error details for support. Do not retry writes indefinitely after ambiguous network failures; combine bounded retries with supported idempotency and verify whether the original resource was created.