Overview
The GTM Research Engine integrates with multiple external APIs to gather comprehensive research data. You’ll need API keys for three services: Google Gemini (AI), Tavily (Google Search), and NewsAPI (News data).Required API Keys
Google Gemini
AI-powered query generation and analysis
Tavily
Google Search API for web research
NewsAPI
News articles and press releases
Google Gemini API Key
Access Google AI Studio
Visit Google AI Studio and sign in with your Google account.
Google Gemini offers a generous free tier with up to 60 requests per minute.
Create API Key
- Click on “Get API Key” in the top navigation
- Select “Create API key in new project” or choose an existing project
- Copy the generated API key
Gemini API Details
What Gemini is used for
What Gemini is used for
The GTM Research Engine uses Google Gemini 2.5 Flash for:
- Query Generation: Creating intelligent search strategies based on research goals
- Confidence Scoring: Evaluating the relevance and quality of search results
- Technology Extraction: Identifying technologies and tools from evidence
- Result Analysis: Summarizing and contextualizing findings
Rate Limits & Pricing
Rate Limits & Pricing
Free Tier:
- 15 requests per minute
- 1,500 requests per day
- 1 million requests per month
- Higher rate limits available
- Pay-per-request pricing
- See Google AI Pricing for details
Tavily API Key
Sign Up for Tavily
Visit Tavily and create a free account.
Tavily provides a powerful Google Search API optimized for AI applications.
Get API Key
- Navigate to your Tavily Dashboard
- Copy your API key from the dashboard
- Note your plan’s rate limits
Tavily API Details
What Tavily is used for
What Tavily is used for
The GTM Research Engine uses Tavily for:
- Site-specific searches: Searching within company domains
- Boolean queries: Complex search strategies with AND/OR operators
- File type filtering: Finding PDFs, presentations, and documents
- News searches: Recent articles and announcements
- Deep web access: More comprehensive than standard search APIs
Rate Limits & Pricing
Rate Limits & Pricing
Free Tier:
- 1,000 API calls per month
- 5 requests per second
- 10,000 API calls per month
- 10 requests per second
- 100,000 API calls per month
- 20 requests per second
NewsAPI Key
Register for NewsAPI
Visit NewsAPI and create a free account.
NewsAPI provides access to news articles from over 150,000 sources worldwide.
Get API Key
- Complete the registration form
- Verify your email address
- Copy your API key from the confirmation page or account page
NewsAPI Details
What NewsAPI is used for
What NewsAPI is used for
The GTM Research Engine uses NewsAPI for:
- Press releases: Company announcements and product launches
- Funding news: Investment rounds and acquisitions
- Partnership announcements: Strategic collaborations
- Security incidents: Breach notifications and security updates
- Industry coverage: Market trends and competitive intelligence
Rate Limits & Pricing
Rate Limits & Pricing
Developer Plan (Free):
- 100 requests per day
- 1,000 requests per month
- Articles up to 30 days old
- Development/testing only
- 250,000 requests per month
- All historical articles
- Commercial use allowed
Complete Configuration Example
Here’s a complete.env file example with all required API keys:
.env
Validation & Testing
After configuring all API keys, validate your setup:Cost Management
Expected API Usage
For a typical research request with 5 companies:Gemini
~10-20 requests
Query generation + confidence scoring
Query generation + confidence scoring
Tavily
~20-100 requests
Depends on search depth and companies
Depends on search depth and companies
NewsAPI
~5-25 requests
One per company + depth level
One per company + depth level
Troubleshooting
API Key not found errors
API Key not found errors
Error:
ValueError: GEMINI_API_KEY environment variable is requiredSolutions:- Verify
.envfile exists in thebackenddirectory - Check for typos in environment variable names
- Ensure
.envis loaded (usepython-dotenv) - Restart the backend server after adding keys
Rate limit exceeded errors
Rate limit exceeded errors
Error:
429 Too Many Requests or similar rate limit errorsSolutions:- Reduce
max_parallel_searchesin requests (try 1-3) - Lower rate limits in
config.pyto match your API tier - Add delays between requests
- Upgrade to a higher API tier
config.py
Invalid API key errors
Invalid API key errors
Error:
401 Unauthorized or Invalid API KeySolutions:- Verify you copied the complete API key
- Check for extra spaces or newlines
- Regenerate the API key if necessary
- Ensure the key is active (not expired or revoked)
Next Steps
Start the Application
Run the backend and frontend servers
API Reference
Explore available endpoints and features