Investor portfolio to CSV
Fetch Sequoia Capital's full investor profile and export its portfolio companies. Replace the slug for another investor. Full depth uses credits; see the API reference for current costs.
Set INDEXED_API_KEY first. The examples stop if the portfolio did not load completely. The CSV reflects the portfolio returned by this profile, not a complete history of every investment.
curl (requires jq)
curl --fail-with-body 'https://indexed.vc/api/v1/investors/sequoia-capital?depth=full' \
-H "X-API-Key: $INDEXED_API_KEY" |
jq -er 'if .data.load_states.portfolio.status != "ok" then error("portfolio unavailable or partial") else (["company_name", "company_slug", "hq_country"] | @csv), (.data.portfolio_companies[] | [.company_name, .company_slug, .hq_country] | @csv) end' > portfolio.csvNode.js
const response = await fetch('https://indexed.vc/api/v1/investors/sequoia-capital?depth=full', {
headers: { 'X-API-Key': process.env.INDEXED_API_KEY },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
if (data.load_states?.portfolio?.status !== 'ok') throw new Error('Portfolio unavailable or partial');
const csv = value => '"' + String(value ?? '').replaceAll('"', '""') + '"';
console.log(['company_name', 'company_slug', 'hq_country'].map(csv).join(','));
for (const company of data.portfolio_companies) {
console.log([company.company_name, company.company_slug, company.hq_country].map(csv).join(','));
}Python
import csv, json, os, sys, urllib.request
request = urllib.request.Request(
'https://indexed.vc/api/v1/investors/sequoia-capital?depth=full',
headers={'X-API-Key': os.environ['INDEXED_API_KEY']},
)
with urllib.request.urlopen(request, timeout=30) as response:
data = json.load(response)['data']
if data.get('load_states', {}).get('portfolio', {}).get('status') != 'ok':
raise RuntimeError('Portfolio unavailable or partial')
writer = csv.writer(sys.stdout)
writer.writerow(['company_name', 'company_slug', 'hq_country'])
for company in data['portfolio_companies']:
writer.writerow([company.get('company_name'), company.get('company_slug'), company.get('hq_country')])Redirect Node.js or Python output to portfolio.csv. The curl command writes that file directly.