Friday, July 11, 2025
Quick Start Guide: How to Use the finlight API v2 Like a Pro
With the launch of API Version 2, querying financial news has never been more flexible or intuitive. Whether you're building an investment tool, automating insights, or researching market trends — the new POST-based query system is built for power and simplicity.
In this post, we’ll walk you through how to use it with curl, TypeScript, and even axios, so you can integrate Finlight seamlessly into your stack.
⚙️ Why POST? More Power, Less Pain
By switching to POST requests with JSON body parameters, we've unlocked the ability to support more advanced, structured queries — while keeping it simple for you to implement.
Here’s a minimal example using curl:
curl -X POST 'https://api.finlight.me/v2/articles' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY' \
-d '{ "query": "Nvidia" }'
🧑💻 Easy Integration in TypeScript or Python
Our official package makes integration effortless in TypeScript / Node.js (NPM) and Python. Here a example for the Typescript integration:
import { FinlightApi } from "finlight-client";
const api = new FinlightApi({ apiKey: 'YOUR_API_KEY' });
api.articles
.fetchArticles({ query: 'Nvidia' })
.then((articles) => console.log(articles))
.catch((error) => console.error(error));
Want to keep it custom? You can also call the endpoint directly with axios:
import axios from 'axios';
axios.post('https://api.finlight.me/v2/articles', {
query: 'high',
tickers: ['NVDA'],
language: 'en',
order: 'DESC',
pageSize: 10,
}, {
headers: {
'X-API-KEY': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
🧩 Query Parameters: Build It Your Way
Here’s a quick overview of what you can pass in the request body:
| Parameter | Type | Description |
|---|---|---|
| query | string | Search keywords (Advanced filters possible). |
| sources | string[] | Filter by one or more source domains. |
| excludeSources | string[] | Exclude specific sources. |
| tickers | string[] | Filter by stock ticker symbols. |
| includeContent | boolean | Return full article text. (Paid feature) |
| includeEntities | boolean | Get company metadata enriched automatically. (Paid feature) |
| excludeEmptyContent | boolean | Only return articles with valid content. (Paid feature) |
| from / to | string | Filter by date (YYYY-MM-DD or ISO format). |
| language | string | Filter by language (ISO 639-1 code). |
| order | string | ASC or DESC (default is DESC). |
| pageSize | number | Results per page (max 100). |
| page | number | Page number. |
📘 Explore the Docs
Our updated documentation has full examples, schema definitions, and live testing tools inside the finlight dashboard. Check it out here:
👉 https://docs.finlight.me
🚀 Ready to Build?
The finlight API v2 query system is built for developers who want flexibility without the boilerplate. Whether you're making a dashboard, a bot, or an algo — we’ve got your back.
Got feedback or want to showcase your use case? We’d love to feature you!
— The finlight Team
