Przejdź do treści

Quickstart

1. Account, project and API key

Log in, create (or pick) a project and create a project API key - see Authentication. The key (gsj_...) is shown once.

export GSPAMJUDGE_URL=http://127.0.0.1:8077
export GSPAMJUDGE_API_KEY=gsj_...            # from POST /v1/projects/{id}/keys

2. Judge one page

Send exactly one of url, html or text. rules (rule ids) is optional.

curl -s "$GSPAMJUDGE_URL/v1/judge" \
  -H "Authorization: Bearer $GSPAMJUDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/", "rules": ["SP-KWS-REPEAT", "QR-AIPHRASE"]}'

The response is a report with violations (spam policies), quality_signals (SQRG), labels (neutral info, e.g. YMYL), positives and not_assessed. Each item carries rule_id, score_raw and, for high scores, evidence. See Concepts. Unknown rule ids return 400 unknown_rule (Errors); list ids with GET /v1/rules (requires an API key or session) or the Rules catalog.

3. Batch (up to 10 pages)

curl -s "$GSPAMJUDGE_URL/v1/judge/batch" \
  -H "Content-Type: application/json" \
  -d '{"items": [{"url": "https://example.com/"}, {"url": "https://example.org/"}]}'

results[] holds {index, report, error} per page; one failed page does not fail the batch. Larger sets will go to asynchronous jobs.

4. Read stored reports

GET /v1/reports lists recent reports, GET /v1/reports/{id} returns one, and GET /v1/reports/{id}/export.pdf renders it as PDF.

5. Check your usage

Every checked page has a price in USD (Billing: Lite $0.0200, Basic $0.0650, fetch +$0.0015). GET /v1/usage shows the organization's monthly limit in USD (beta: $20), the balance and per-user/project counters; over the limit the API returns 429 quota_exceeded.