This project is a Node.js application that automates the process of finding LinkedIn company profiles for a list of companies. It uses various technologies and APIs to efficiently search and retrieve LinkedIn URLs.
demo.mov
- Node.js: The runtime environment for executing the JavaScript code.
- ES Modules: The project uses ECMAScript modules (import/export syntax).
- fs/promises: For asynchronous file system operations.
- p-limit: To limit the number of concurrent operations.
- dotenv: For loading environment variables from a .env file.
- @langchain/openai: To interact with OpenAI's language models.
- @langchain/community: For document loaders and tools.
- langchain/agents: To create and execute AI agents.
- OpenAI API: Used for natural language processing tasks.
- Google Custom Search API: For performing web searches to find LinkedIn profiles.
- CSV Data Loading: The application reads company data from a CSV file.
- Concurrent Processing: Uses
p-limit
to manage concurrent API requests. - AI-powered Search: Utilizes OpenAI's GPT-4 model to interpret search results and extract LinkedIn URLs.
- Custom Search Integration: Implements Google Custom Search to find company profiles on LinkedIn.
- Error Handling: Includes basic error handling for individual company processing.
- Output Generation: Writes the results to a CSV file.
-
Clone the repository.
-
Install dependencies with
npm install
. -
Create a
.env
file with the following variables:OPENAI_API_KEY
: Your OpenAI API keyGOOGLE_API_KEY
: Your Google API keyGOOGLE_CSE_ID
: Your Google Custom Search Engine ID
-
Ensure you have a
data/companies.csv
file with company names.The CSV file should have the following structure:
- It must have a header row.
- The first column should contain the company names.
Run the script with:
node index.js
The script will process the companies and output the results to output.csv
.