API Reference

Documents & News API

Search and retrieve sentiment metrics for news articles, social media posts, and AI-curated news stories across multiple sources.

Base: /api/v1/documentsFree7 endpoints

Overview

The Documents & News API provides access to SentiSense's real-time sentiment metrics pipeline. Every document is enriched with AI-powered sentiment analysis, entity extraction, and reliability scoring.

Data sources: News (600+ publishers), Reddit, X (Twitter), Substack

Key features:

  • Per-entity sentiment classification (e.g., an article about Apple and Google may be POSITIVE for Apple but NEGATIVE for Google)
  • Smart search with natural language query parsing
  • News clustering into "stories" that group related articles together
  • Publisher reliability scoring

Note: Document responses include sentiment metrics, reliability scores, source URLs, and timestamps. Use the url field to link through to the original article.


GET /ticker/{ticker}

Returns the latest news articles and social media posts mentioning a specific stock ticker.

Authentication: None required

Parameters:

Parameter Type Required Default Description
ticker path Yes - Stock ticker symbol (e.g., AAPL)
source string No all Filter by source: news, reddit, x, substack
days integer No 7 Lookback period in days (1-365)
hours integer No - Lookback in hours (overrides days if set)
limit integer No 200 Max results (capped at 200)

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/ticker/AAPL?source=news&days=3&limit=10"
from sentisense import SentiSenseClient
client = SentiSenseClient()
docs = client.get("/api/v1/documents/ticker/AAPL?source=news&days=3&limit=10")

Response Schema:

Field Type Description
documents array List of document objects (see Document schema below)
totalCount int Total matching documents
searchTicker string Ticker used for search
source string Source filter applied
startDate string Query start date (ISO)
endDate string Query end date (ISO)

Document object:

Field Type Description
id string Unique document ID
url string Direct link to source article
source string NEWS, REDDIT, X, SUBSTACK
published long Epoch timestamp (seconds)
averageSentiment double Overall sentiment score (-1.0 to 1.0)
reliability double Publisher reliability score
sentimentMap object Per-entity sentiment: {"AAPL": "POSITIVE", "GOOGL": "NEGATIVE"}

GET /ticker/{ticker}/range

Returns documents for a stock ticker within a specific date range. Useful for historical research.

Authentication: None required

Parameters:

Parameter Type Required Default Description
ticker path Yes - Stock ticker symbol
startDate date (ISO) Yes - Start date (e.g., 2025-01-01)
endDate date (ISO) Yes - End date (e.g., 2025-01-31)
source string No all Filter by source
limit integer No 100 Max results (capped at 200)

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/ticker/TSLA/range?startDate=2025-01-01&endDate=2025-01-31&limit=50"

GET /entity/{entityId}

Returns documents mentioning a knowledge base entity (person, product, organization). Entity IDs use URL-safe format with dashes instead of slashes.

Authentication: None required

Parameters:

Parameter Type Required Default Description
entityId path Yes - KB entity ID in URL-safe format (e.g., kb-person-67)
source string No all Filter by source
days integer No 7 Lookback in days
hours integer No - Lookback in hours (overrides days)
limit integer No 50 Max results (capped at 200)

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/entity/kb-person-67?days=14"

GET /search

Smart search with natural language query parsing. The query is analyzed to extract stock tickers, entity names, and free-text keywords, then used to find matching documents.

Authentication: None required

Parameters:

Parameter Type Required Default Description
query string Yes - Natural language query (e.g., "AAPL TSLA earnings")
source string No all Filter by source
days integer No 7 Lookback in days
limit integer No 200 Max results (capped at 500)

Query examples:

  • "AAPL" — Documents about Apple
  • "AAPL, NVDA" — Documents about Apple or NVIDIA
  • "Elon Musk, TSLA" — Documents about Elon Musk or Tesla
  • "earnings report" — Documents containing "earnings report"
  • "AAPL earnings beat" — Apple + text search for "earnings beat"

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/search?query=NVDA+earnings&days=3&limit=20"

GET /source/{source}

Returns the latest documents from a specific source type, across all stocks.

Authentication: None required

Parameters:

Parameter Type Required Default Description
source path Yes - Source type: news, reddit, x, substack
days integer No 7 Lookback in days
hours integer No - Lookback in hours
limit integer No 100 Max results (capped at 500)

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/source/reddit?days=1&limit=50"

GET /stories

Returns the latest AI-curated news stories. Stories are clusters of related articles grouped by topic, with AI-generated summaries and sentiment analysis.

Authentication: None required

Parameters:

Parameter Type Required Default Description
limit integer No 20 Max stories (capped at 50)
days integer No 7 Lookback in days (max 15)
offset integer No 0 Pagination offset
filterHours integer No - Filter to stories from last N hours

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/stories?limit=10"

Response Schema (Story object):

Field Type Description
cluster.id string Story ID
cluster.title string AI-generated story title
cluster.clusterSize int Number of source articles
cluster.averageSentiment double Aggregate sentiment (-1.0 to 1.0)
cluster.createdAt long Epoch millis
displayTickers array Ticker badges (e.g., ["Apple Inc (AAPL)"])
tickers array Raw tickers (e.g., ["AAPL"])
primaryEntityNames array Primary entity names
impactScore double Impact score (0.0-10.0)
representativeTimestamp long When the story broke (epoch millis)

GET /stories/ticker/{ticker}

Returns news stories (clusters) for a specific stock ticker.

Authentication: None required

Parameters:

Parameter Type Required Default Description
ticker path Yes - Stock ticker symbol
limit integer No 5 Max stories (capped at 20)

Example Request:

curl "https://app.sentisense.ai/api/v1/documents/stories/ticker/AAPL?limit=10"

Try It

Test endpoints directly from your browser. Paste your API key once — it's saved locally and shared across all widgets. Get a free key

GET/api/v1/documents/ticker/{ticker}

Get document metrics for a stock ticker

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/ticker/AAPL?limit=5&days=3"
Enter your API key to send requests

GET/api/v1/documents/ticker/{ticker}/range

Get document metrics for a ticker within a date range

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/ticker/AAPL/range"
Enter your API key to send requests

GET/api/v1/documents/entity/{entityId}

Get document metrics mentioning a KB entity

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/entity/kb-person-67"
Enter your API key to send requests

GET/api/v1/documents/search

Smart search with natural language queries

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/search?query=AAPL%20earnings"
Enter your API key to send requests

GET/api/v1/documents/source/{source}

Get latest document metrics from a specific source

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/source/news"
Enter your API key to send requests

GET/api/v1/documents/stories

Get top news stories with sentiment metrics

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/stories?limit=5"
Enter your API key to send requests

GET/api/v1/documents/stories/ticker/{ticker}

Get news stories for a specific stock

Try It
curl -H "X-SentiSense-API-Key: ssk_YOUR_KEY" \ "https://app.sentisense.ai/api/v1/documents/stories/ticker/AAPL"
Enter your API key to send requests