A robust, deterministic web scraping and aggregation engine for tech events in Bengaluru. Powered by Anakin.io's API and built with Node.js, this system uses advanced Apollo State extraction and Cheerio DOM traversal to reliably scrape networking and technical events from Luma, Meetup, and Eventbrite.
graph TD
User([User / Scheduler])
subgraph Interfaces
CLI[CLI Orchestrator<br/>npm run scrape]
API[Express API<br/>npm start]
end
subgraph Core Scrapers
Luma(scrape-luma.js)
Meetup(scrape_meetup.js)
Eventbrite(scrape-eventbrite.js)
end
subgraph Data Processing
Parser[Heuristic Parsers<br/>Categorization & Scoring]
Anakin[Anakin.io URL Scraper API]
end
User -->|Runs Script| CLI
User -->|HTTP GET/POST| API
CLI --> Luma & Meetup & Eventbrite
API --> Luma & Meetup & Eventbrite
Luma & Meetup & Eventbrite --> Anakin
Anakin --> Parser
Parser -->|JSON Output| Brain[Brain Builder<br/>Vector Embeddings]
Brain -->|knowledge_base.json| User
User -->|Query| RAG[RAG Engine<br/>Gemini 1.5 Flash]
RAG -->|Answer| User
-
Install Dependencies
npm install
-
Environment Variables Create a
.envfile in the root directory:ANAKIN_API_KEY=your_actual_api_key_here GEMINI_API_KEY=your_google_ai_studio_key PORT=3000
Run the full suite using the newly added NPM script:
npm run scrape- This triggers
scrape-all.jswhich sequentially runs Luma, Meetup, and Eventbrite scrapers. - Temporary Output: It writes
luma_results.json,meetup_results.json, andeventbrite_results.jsonlocally. - Auto-Cleanup: The terminal will remain open in an interactive wait state. When you are done, press
Ctrl+Cor typeexitand the system will automatically securely delete the temporary JSON files. - AI Brain Building: After scraping, it automatically runs
brain-builder.jsto index the data for the RAG model.
Start the API server:
npm startThe server supports both GET and POST methods, allowing you to pass parameters via query strings or JSON body payloads.
Endpoints:
GET / POST /api/scrape/lumaGET / POST /api/scrape/meetup(AcceptslocationanddateRangeparams)GET / POST /api/scrape/eventbriteGET / POST /api/scrape/allGET / POST /api/chat(AI-powered natural language query)
Example RAG Query:
curl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{"query": "Are there any AI networking events in Bangalore this weekend?"}'Example POST request:
curl -X POST http://localhost:3000/api/scrape/meetup \
-H "Content-Type: application/json" \
-d '{"location": "in--Bangalore", "dateRange": "this-week"}'All incoming scraped data passes through the src/parsers engine, which applies:
- Geo-Mapping: Infers precise Latitude/Longitude coordinates based on Bangalore neighborhood names.
- Semantic Tagging: Auto-categorizes events (e.g.,
AI,Technical,Networking) based on title keywords. - Score Generation: Assigns a
networkingScoreandtechnicalScoreout of 10 to help prioritize highly valuable events.