Data source: Curated dataset (S&P Dow Jones Indices)
Overview
S&P 500 Companies wraps Curated dataset (S&P Dow Jones Indices), handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-sp500": {
"url": "https://context.gnist.ai/mcp/sp500/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (4)
get_sp500_company
Get detailed information about an S&P 500 company by ticker symbol. Returns company name, GICS sector, sub-industry, headquarters, founding year, and SEC CIK number.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker | string | required | Stock ticker symbol (e.g. AAPL, MSFT, GOOGL). |
curl -X POST "https://context.gnist.ai/mcp/sp500/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_sp500_company", "arguments": {"ticker": "AAPL"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/sp500/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'ticker': 'AAPL'}, 'name': 'get_sp500_company'}},
)
print(resp.json())
search_sp500_companies
Search the S&P 500 companies database.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search by company name or ticker symbol. |
limit | integer | optional | Maximum results to return. (default: 20) |
curl -X POST "https://context.gnist.ai/mcp/sp500/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_sp500_companies", "arguments": {"query": "renewable energy"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/sp500/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'renewable energy'},
'name': 'search_sp500_companies'}},
)
print(resp.json())
list_sp500_by_sector
List S&P 500 companies by GICS sector.
| Parameter | Type | Required | Description |
|---|---|---|---|
sector | string | required | GICS sector (e.g. Information Technology, Health Care, Financials). |
limit | integer | optional | Maximum results to return. (default: 50) |
curl -X POST "https://context.gnist.ai/mcp/sp500/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_sp500_by_sector", "arguments": {"sector": "Information"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/sp500/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'sector': 'Information'},
'name': 'list_sp500_by_sector'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/sp500/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/sp500/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_sp500_companies to find items, then get_sp500_company to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does S&P 500 Companies provide?
S&P 500 companies — ticker, sector, sub-industry, headquarters, and CIK numbers. It exposes 4 tools: get_sp500_company, search_sp500_companies, list_sp500_by_sector, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the S&P 500 Companies API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.