CognitiveX Docs
API

POST /api/url/extract

Extract Url

POST /api/url/extract

Extract Url

Authentication: Authorization: Bearer <key> or X-API-Key: <key>. Create keys at developers.cognitivx.io/keys.

Parameters

NameInTypeRequiredDescription
X-Org-IDheaderstring | nullNo-

Request body

A JSON request body is required.

FieldTypeRequiredDescription
urlstringYes-
force_method"trafilatura" | "playwright" | nullNoOne of: trafilatura, playwright.

Example request

curl -X POST https://api.cognitivx.io/api/url/extract \
  -H "Authorization: Bearer icog_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "force_method": "trafilatura"
  }'

Example response

200 application/json

{
  "url_hash": "https://example.com",
  "url": "https://example.com",
  "canonical_url": "https://example.com",
  "title": "string",
  "article_text": "Parsa prefers limit/offset pagination",
  "chunks": [
    "string"
  ],
  "method": "string",
  "quality_score": 0,
  "metadata": {},
  "cached": false,
  "extracted_at": "2026-06-16T08:30:00Z"
}

Responses

StatusDescription
200Success. Returns the response body shown below.
422Request validation failed. detail lists each offending field.