Skip to content
Documentation/Get started

Make your first API call

Create a key, verify one claim, and inspect the result.

Markdown

Create an API key

Create a key on the API Keys page. Keep it in an environment variable on your server. Never put it in frontend code or a public repository.

bash
export WEBCITE_API_KEY="YOUR_API_KEY"

Send a claim

This example requests source stances and a verdict. The fixed price is 4 credits. Examples are illustrative; they do not represent a recorded live verification.

bash
curl --fail-with-body https://api.webcite.co/api/v1/verify \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"claim":"The Eiffel Tower is 330 meters tall","include_stance":true,"include_verdict":true}'

Inspect the result

Read each entry in claim_groups. Keep the claim with its citations, domain_groups, and verdict. Record operation_id and usage.credits when returned. Do not use an absent verdict as evidence of support.

javascript
for (const group of data.claim_groups ?? []) {
  console.log(group.claim);
  console.log(group.verdict ?? "No verdict returned");
  for (const citation of group.citations ?? []) {
    console.log(citation.url, citation.verification);
  }
}

Continue your integration

The verify reference lists every request field and the response schema. For a long-running request, use streaming. Read credits and errors before adding retries.