Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Apollo API

468 0
cancel
Showing results for 
Search instead for 
Did you mean: 
swmv
4 - Data Explorer
4 - Data Explorer

I want to link Apollo to Airtable so I can people search from within my base.

I got the Apollo organization data working with the code below to fetch company details:

let apiToken = 'API KEY HERE';

let table = base.getTable('TABLE NAME HERE');
let { records } = await table.selectRecordsAsync();

console.log(records);

for (let record of records) {
    let domain = record.getCellValue('Domain');
    let response = await remoteFetchAsync(`https://api.apollo.io/v1/organizations/enrich?domain=${domain}`, {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json',
            'Cache-Control': 'no-cache',
            'X-Api-Key': apiToken
        }
    });

    let data = await response.json();
    let organization = data.organization;

    await table.updateRecordAsync(record.id, {
        'Company Name': organization.name,
        'Linkedin URL': organization.linkedin_url,
        'Address': organization.street_address,
        'City': organization.city,
        'Country': organization.country,
        'Description': organization.short_description,
        'Headcount': organization.estimated_num_employees,
        'Industries': organization.industry,
        'Founded': organization.founded_year
    });
}

 I just can't get the people search to work. Has anyone done this successfully and have code they can share?

I want to put in a company name and split out e.g. the CEO or CFO name, email, etc. at that company.

TIA for any help!

0 Replies 0