Developer API

Send content to FactLens and get back a hosted analysis URL.

This is the same text-analysis backend already used by the FactLens mobile apps. Submit a URL, title, text excerpt, and source label to /api/share-content, then open the returned analysis page.

POST /api/share-content JSON request Async processing Hosted result URL
Current model: no API key required. Send a clear source value such as ios_app, android_app, web_browser, browser_plugin, or partner_api so FactLens can measure usage by channel.

Endpoint

Method: POST

Production: https://factlens.io/api/share-content

Test: https://test-analyse-share-content-a7f6177425e6.herokuapp.com/api/share-content

Content-Type: application/json

Result type: a hosted FactLens result URL returned immediately while analysis continues asynchronously.

What the API does

  • Accepts structured content from apps, browser clients, and partner integrations.
  • Normalizes URL, title, text, and source before processing.
  • Starts analysis asynchronously and returns immediately.
  • Creates a hosted FactLens result page you can open or store.
  • Stores every request so usage can be measured by source channel.

Recommended request fields

Field Required Description
url No Source URL to analyze.
title No Optional client-side title.
text No Optional excerpt or selected text.
source No Client label such as ios_app, android_app, web_browser, browser_plugin, or partner_api.

At least one of url or text should be provided.

Open OpenAPI spec

Example request

curl -X POST https://factlens.io/api/share-content \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.example.com/article",
    "title": "Example Article Title",
    "text": "Selected excerpt from the article.",
    "source": "partner_api"
  }'

Example response

{
  "status": "success",
  "received_content": "https://www.example.com/article\nSelected excerpt from the article.",
  "url": "https://factlens.io/550e8400-e29b-41d4-a716-446655440000",
  "processing": true,
  "received_payload": {
    "url": "https://www.example.com/article",
    "title": "Example Article Title",
    "text": "Selected excerpt from the article.",
    "source": "partner_api"
  }
}

The most important field is url. Open that page in your app, browser, or plugin after submission.

Integration flow

  1. POST JSON to /api/share-content.
  2. Receive a hosted FactLens result URL immediately.
  3. Open that URL in your app, browser, or partner workflow. It may still be processing for a short time.
  4. Let the user review sources, keywords, and the generated analysis page.

Validation and errors

If neither url nor text is provided, the API returns HTTP 400.

{
  "status": "error",
  "message": "No content, url, or text provided"
}

Current product status

The API is live and already used by FactLens mobile clients. The next step for broader external adoption is better public documentation and partner onboarding, not a brand new backend.