API Documentation
Access AI-powered market intelligence programmatically. Integrate TubeIQ's analysis into your trading systems, dashboards, and applications.
1. Get Your API Key
Navigate to Settings → API Keys and click "Create API Key". Copy the generated key.
2. Make Your First Request
curl -H "X-API-Key: your-api-key-here" \ https://ytinsights-oxmptvke.manus.space/api/public/analysis
3. Process the Response
All responses include stock analysis with confidence scores, video metadata, and timestamps.
https://ytinsights-oxmptvke.manus.space/api/publicAPI Key Header
Include your API key in the X-API-Key header:
X-API-Key: your-api-key-here
Note: Public access is available for testing, but API key authentication is recommended for production use.
/api/public/analysisRetrieve stock market analysis results grouped by ticker type (NIFTY, GIFTNIFTY, STOCKS, OTHER). Supports pagination and incremental fetching.
Query Parameters
since (optional) - ISO 8601 timestamp. Returns only analysis processed after this time. Example: 2025-11-19T10:00:00Zlimit (optional) - Number of results per page (1-500, default: 100)offset (optional) - Number of results to skip (for pagination, default: 0)ticker (optional) - Filter by ticker symbol (e.g., NIFTY, RELIANCE)sentiment (optional) - Filter by sentiment (bullish, bearish, neutral)Basic Request
curl -H "X-API-Key: your-api-key-here" \ https://ytinsights-oxmptvke.manus.space/api/public/analysis
Incremental Fetching (Recommended)
# Get only new analysis since last check curl -H "X-API-Key: your-api-key-here" \ "https://ytinsights-oxmptvke.manus.space/api/public/analysis?since=2025-11-19T10:00:00Z&limit=50"
Pagination Example
# Page 1 (first 50 results) curl "https://ytinsights-oxmptvke.manus.space/api/public/analysis?limit=50&offset=0" # Page 2 (next 50 results) curl "https://ytinsights-oxmptvke.manus.space/api/public/analysis?limit=50&offset=50"
Response Example
{
"success": true,
"data": {
"NIFTY": [
{
"id": 3120001,
"ticker": "NIFTY",
"tickerType": "Index",
"sentiment": "Bullish",
"period": "Short Term",
"levels": {
"support": [23850, 23600],
"resistance": [26000, 26500],
"targets": [27000]
},
"strategy": "Wait for policy clarity...",
"opinion": "Market looks positive for short term trades",
"outlookSummary": "The NIFTY outlook remains...",
"timestamps": ["04:20", "05:00"],
"videoTitle": "Pre Market Report 03-Dec-2023",
"videoLink": "https://www.youtube.com/watch?v=sPvsDXK",
"channelName": "The Market Expert",
"creatorId": "UCxxx1234567890",
"creatorProfileImage": "https://yt3.googleusercontent.com/...",
"subscriberCount": 125000,
"postedOn": "2025-11-19T04:30:00.000Z",
"generalSummary": "Market outlook positive...",
"createdAt": "2025-11-19T04:30:00.000Z"
}}
],
"STOCKS": [...],
"GIFTNIFTY": [],
"OTHER": []
},
"timestamp": "2025-11-19T05:30:00.000Z"
}Stock Analysis Object
| Field | Type | Description |
|---|---|---|
ticker | string | Stock/index ticker symbol |
sentiment | string | Bullish, Bearish, Neutral (standardized values only) |
period | string | Intraday, Swing, Short Term, Long Term (single value, defaults to Intraday) |
levels | object | Support, resistance, and target levels as numeric arrays |
opinion | string | Analyst's opinion in natural language |
creatorId | string | YouTube channel ID of the content creator |
creatorProfileImage | string | URL to creator's profile/thumbnail image |
subscriberCount | number | Creator's latest subscriber count |
confidenceScore | number | Analysis confidence (0-100) |
videoTitle | string | Title of the YouTube video |
channelName | string | YouTube channel/advisor name |
postedOn | string | Video published date/time (ISO 8601) |
Confidence Score Interpretation
High Confidence
Clear statements with specific levels and detailed recommendations
Medium Confidence
Moderate clarity with some specific details
Low Confidence
Vague mentions or limited detail
const axios = require('axios');
const API_KEY = 'your-api-key-here';
const BASE_URL = 'https://ytinsights-oxmptvke.manus.space/api/public';
async function getHighConfidenceAnalyses() {
try {
const response = await axios.get(`${BASE_URL}/analysis`, {
headers: { 'X-API-Key': API_KEY }
});
const data = response.data.data;
// Filter high confidence analyses
for (const category in data) {
data[category].forEach(analysis => {
if (analysis.confidenceScore >= 80) {
console.log(`Ticker: ${analysis.ticker}`);
console.log(`Sentiment: ${analysis.sentiment}`);
console.log(`Confidence: ${analysis.confidenceScore}%`);
console.log(`Video: ${analysis.videoTitle}`);
console.log('---');
}
});
}
} catch (error) {
console.error('Error:', error.message);
}
}
getHighConfidenceAnalyses();1Your First API Call (The Simplest Way)
What it does: Gets the latest 100 stock recommendations from YouTube market advisors.
// Replace 'your-api-key-here' with your actual API key
const API_KEY = 'your-api-key-here';
// Make the API call
const response = await fetch('https://ytinsights-oxmptvke.manus.space/api/public/analysis', {
headers: { 'X-API-Key': API_KEY }
});
// Get the data
const data = await response.json();
console.log(data); // See all the stock recommendations!💡 What you'll get:
Up to 100 most recent stock recommendations with ticker, sentiment (bullish/bearish), confidence score, video link, and advisor name.
2Pagination: Get Only What You Need
Think of it like: Reading a book page by page instead of the whole book at once.
📚 Example: Get only 20 results at a time
// Get first 20 results (page 1)
const response = await fetch(
'https://ytinsights-oxmptvke.manus.space/api/public/analysis?limit=20&offset=0',
{ headers: { 'X-API-Key': API_KEY } }
);
// Get next 20 results (page 2)
const response2 = await fetch(
'https://ytinsights-oxmptvke.manus.space/api/public/analysis?limit=20&offset=20',
{ headers: { 'X-API-Key': API_KEY } }
);🧐 Simple explanation:
limit=20means "give me 20 results"offset=0means "start from the beginning"offset=20means "skip first 20, start from 21st"
3Incremental Fetching: Get Only NEW Data
The Problem: If you call the API every hour, you'll get the same 100 results again and again. That's wasteful!
The Solution: Use the since parameter to say "only give me data created AFTER this time".
🕒 Example: Get only data from the last hour
// FIRST TIME: Get all data and remember when you got it
const firstCall = await fetch(
'https://ytinsights-oxmptvke.manus.space/api/public/analysis',
{ headers: { 'X-API-Key': API_KEY } }
);
const firstData = await firstCall.json();
// Save the current time
const lastCheckTime = new Date().toISOString();
// Example: "2025-11-19T10:30:00Z"
// --- Wait 1 hour ---
// SECOND TIME: Get only NEW data since last check
const secondCall = await fetch(
`https://ytinsights-oxmptvke.manus.space/api/public/analysis?since=${lastCheckTime}`,
{ headers: { 'X-API-Key': API_KEY } }
);
const newDataOnly = await secondCall.json();
// This will only have recommendations created in the last hour!✨ Real-world analogy:
It's like asking "What's new since I last checked?" instead of "Tell me everything again". Much faster and you don't waste bandwidth downloading the same data repeatedly!
4Filtering: Get Specific Stocks or Sentiments
Think of it like: Searching for a specific book in a library instead of browsing all books.
🎯 Example: Get only NIFTY recommendations
const response = await fetch(
'https://ytinsights-oxmptvke.manus.space/api/public/analysis?ticker=NIFTY',
{ headers: { 'X-API-Key': API_KEY } }
);🟢 Example: Get only BULLISH recommendations
const response = await fetch(
'https://ytinsights-oxmptvke.manus.space/api/public/analysis?sentiment=bullish',
{ headers: { 'X-API-Key': API_KEY } }
);✨ Example: Combine multiple filters
// Get bullish NIFTY recommendations from last hour, max 10 results
const response = await fetch(
`https://ytinsights-oxmptvke.manus.space/api/public/analysis?ticker=NIFTY&sentiment=bullish&since=${lastCheckTime}&limit=10`,
{ headers: { 'X-API-Key': API_KEY } }
);⚠️Common Mistakes to Avoid
❌ Calling API too frequently
Problem: Calling every second wastes your rate limit (60 requests/minute)
✅ Solution: Call every 30-60 minutes. New data only appears every 1-2 hours anyway!
❌ Forgetting to save lastCheckTime
Problem: You'll download all 100 results every time instead of just new ones
✅ Solution: Save timestamp in localStorage or database after each API call
❌ Not handling API errors
Problem: Your app crashes when API is down or key is invalid
✅ Solution: Always use try-catch blocks and check response.ok before using data
📝 Quick Reference: All Parameters
| Parameter | What it does | Example |
|---|---|---|
limit | How many results to return | limit=20 |
offset | How many to skip (for pagination) | offset=40 |
since | Get only data created after this time | since=2025-11-19T10:00:00Z |
ticker | Filter by stock/index symbol | ticker=NIFTY |
sentiment | Filter by market sentiment | sentiment=bullish |
For questions, issues, or feature requests, please contact:
TubeIQ Analytics Pvt. Ltd.
27, Benjamin Street, Near Dalal Street
Fort, Mumbai - 400001
Email: [email protected]