API Documentation

Integrate Fintool's financial analysis capabilities into your applications

Operational
v2.0
https://api.fintool.com

Overview

The Fintool API provides access to our advanced financial analysis capabilities through a simple REST interface. Our API processes natural language queries about public companies and returns comprehensive answers backed by authoritative financial documents including SEC filings, earnings transcripts, and financial statements.

Key Features

Chat EndpointGet comprehensive answers with citations
Search EndpointRetrieve top-ranked document chunks for RAG
Real-time StreamingServer-Sent Events for progressive responses
Citation SupportAll answers include source document references

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header using the Bearer scheme.

Authorization: Bearer YOUR_API_KEY

Contact our sales team to get access to the Fintool API and receive your authentication credentials.

POST /v2/chat

The primary endpoint for sending financial analysis queries. Send a conversation history and receive intelligent responses backed by comprehensive financial data with citations.

Request Body

ParameterTypeDescription
messagesarrayConversation history with role and content
streambooleanEnable Server-Sent Events streaming
filtersobjectFilter by tickers, doc_types, dates
include_citationsbooleanInclude citation details (default: true)

Request Example

curl -X POST https://api.fintool.com/v2/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{'"messages": [{"role": "user","content": "What was Tesla's revenue in Q4 2024?"}],"stream": false,"filters": {"tickers": ["TSLA"],"doc_types": ["10-K", "10-Q", "8-K"]}}'

Response

{"id": "msg_abc123","createdAt": "2025-01-21T18:25:09Z","type": "message","message": {"role": "assistant","content": "Tesla's Q4 2024 revenue was $25.2 billion **[tesla_10k_2024_revenue]**","metadata": {"session_data": "eyJzZXNzaW9uX2lkIjoi..."}},,"citations": [{"chunk_id": "tesla_10k_2024_revenue","document_title": "Tesla Inc. Form 10-K","page_number": 42,"relevance_score": 0.95}]}

POST /v1/search

Retrieve ranked document chunks for RAG integration. This endpoint returns the top chunks after reranking, allowing you to merge them with your own LLM responses.

Request Body

ParameterTypeDescription
querystringThe search query
filtersobjectFilter by tickers, doc_types, dates
top_knumberNumber of chunks to return (default: 10)
rerankbooleanApply reranking (default: true)

Request Example

{"query": "Tesla autonomous driving progress","filters": {"tickers": ["TSLA"],"doc_types": ["10-K", "10-Q", "8-K", "EARNINGS_CALL"]},,"top_k": 10,"rerank": true}

Response

{"chunks": [{"chunk_id": "TSLA_10K_2024_chunk_142","document_title": "Tesla Inc. Form 10-K","text": "Our Full Self-Driving (FSD) capability...","page_number": 28,"relevance_score": 0.96,"rerank_score": 0.94}],"total_chunks": 10,"processing_time_ms": 450}

Use Cases

  • RAG Integration: Use retrieved chunks as context for your own LLM
  • Custom Pipelines: Build your own analysis workflows with relevant data
  • Hybrid Search: Combine with your proprietary data for comprehensive answers

Streaming Responses

Enable real-time response streaming by setting stream: true. The API will send Server-Sent Events as the response is generated.

Streaming Request

curl -X POST https://api.fintool.com/v2/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{'"messages": [{"role": "user", "content": "Analyze Microsoft earnings"}],"stream": true}' --no-buffer

Server-Sent Events

event: messagedata: {"type": "message", "message": {"role": "assistant", "thinking": "Searching...", "content": "Analyzing..."}}event: messagedata: {"type": "message", "message": {"role": "assistant", "content": "Microsoft reported Q2 2025 revenue of $69.6B **[msft_q2_2025]**"}}

Python Example

import requests

# Chat endpoint
url = "https://api.fintool.com/v2/chat"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "messages": [
        {"role": "user", "content": "What is Apple's revenue growth?"}
    ],
    "stream": False,
    "filters": {"tickers": ["AAPL"], "doc_types": ["10-K", "10-Q"]}
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data["message"]["content"])

# Search endpoint
search_url = "https://api.fintool.com/v1/search"
search_payload = {
    "query": "Tesla autonomous driving",
    "filters": {"tickers": ["TSLA"]},
    "top_k": 5,
    "rerank": True
}

search_response = requests.post(search_url, headers=headers, json=search_payload)
chunks = search_response.json()["chunks"]

for chunk in chunks:
    print(f"Source: {chunk['document_title']}")
    print(f"Relevance: {chunk['relevance_score']}")

Best Practices

Include session_dataAlways return the session_data from previous responses to maintain conversation context.
Use streaming for better UXEnable streaming to show real-time progress and thinking.
Handle citations properlyParse citation markers **[chunk_id]** to provide users with source links.