finlight Logo

Friday, July 11, 2025

Quick Start Guide: How to Use the finlight API v2 Like a Pro

Finlight - Content Manager

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:

ParameterTypeDescription
querystring Search keywords (Advanced filters possible).
sourcesstring[]Filter by one or more source domains.
excludeSourcesstring[]Exclude specific sources.
tickersstring[]Filter by stock ticker symbols.
includeContentbooleanReturn full article text. (Paid feature)
includeEntitiesbooleanGet company metadata enriched automatically. (Paid feature)
excludeEmptyContentbooleanOnly return articles with valid content. (Paid feature)
from / tostringFilter by date (YYYY-MM-DD or ISO format).
languagestringFilter by language (ISO 639-1 code).
orderstringASC or DESC (default is DESC).
pageSizenumberResults per page (max 100).
pagenumberPage 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

Quick Start Guide: How to Use the finlight API v2 Like a Pro - finlight.me