# Linkedin Events Scraper (`payai/linkedin-events-scraper`) Actor

Linkedin Event Scraper source all events by city
The scraper is configured for these 10 major US cities and many more:

- New York

- Los Angeles

- Chicago

- San Francisco

- Miami

- Austin

- Seattle

- Boston

- Denver

- Atlanta

- **URL**: https://apify.com/payai/linkedin-events-scraper.md

- **Developed by:** [PayAI](https://apify.com/payai) (community)

- **Categories:** Developer tools, Automation, Lead generation

- **Stats:** 22 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks

- **User rating**: 1.00 out of 5 stars

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## LinkedIn Professional Events Scraper for Apify

A specialized Apify actor designed to scrape professional networking events from LinkedIn by city using cookie authentication. This scraper focuses on finding business conferences, networking events, industry meetups, and other professional gatherings.

### 🍪 Cookie Authentication Method

This scraper uses LinkedIn session cookies to maintain authenticated access. This method is more reliable than password-based login and avoids 2FA issues.

#### How to Get Your LinkedIn Cookies:

1. **Log into LinkedIn** in Chrome or Firefox
2. **Open Developer Tools** (Press F12)
3. **Navigate to Application Tab** → Cookies → linkedin.com
4. **Find the `li_at` cookie** (this is your session cookie)
5. **Copy the cookie value** (a long string starting with "AQ...")
6. **Paste it** in the scraper's `liAtCookie` input field

**Optional**: Also copy the `JSESSIONID` cookie for better stability

#### Cookie Validity:
- LinkedIn cookies typically last 1-2 months
- If scraping stops working, get fresh cookies
- Keep your browser session active to maintain cookie validity

### Features

- 🏙️ **City-based search**: Search for professional events in any city
- 🏷️ **Multiple event categories**: 
  - Professional Networking
  - Business Conferences
  - Industry Meetups
  - Career Development
  - Startup Events
  - Tech Talks
  - Leadership Summits
  - Sales & Marketing Events
  - Finance & Investment Events
  - Entrepreneurship Events
- 📅 **Date range filtering**: This week, This month, Next 3 months, or All upcoming
- 🌐 **Event type filtering**: Online, In-person, Hybrid, or All
- 📊 **Detailed event data extraction**:
  - Event title and category
  - Date and time
  - Location and venue
  - Organizer information
  - Number of attendees
  - Event description
  - Event URL and image
- 🔄 **Pagination support**: Automatically navigates through multiple pages
- 🛡️ **Proxy support**: Built-in Apify proxy configuration

### Installation

#### Local Development

```bash
cd linkedin-events-scraper
npm install
````

#### Deploying to Apify

1. Install Apify CLI:

```bash
npm install -g apify-cli
```

2. Login to Apify:

```bash
apify login
```

3. Push the actor:

```bash
apify push
```

### Usage

#### Input Parameters

| Parameter | Type | Required | Description | Default |
|-----------|------|----------|-------------|---------|
| `location` | String | **Yes** | City to search for events (e.g., "San Francisco", "New York") | - |
| `eventCategories` | Array | No | Categories of professional events to search | \["Professional Networking", "Business Conference"] |
| `searchQuery` | String | No | Additional keywords for search | "professional networking" |
| `dateRange` | String | No | Date range for events | "This month" |
| `maxEvents` | Integer | No | Maximum number of events to scrape (1-100) | 20 |
| `eventType` | String | No | Type of events (All/Online/In-person/Hybrid) | "All" |
| `includeDescription` | Boolean | No | Scrape full event descriptions | true |
| `proxy` | Object | No | Proxy configuration | Apify proxy with RESIDENTIAL group |

#### Example Input

```json
{
  "location": "San Francisco",
  "eventCategories": ["Professional Networking", "Tech Talks", "Startup Events"],
  "dateRange": "Next 3 months",
  "maxEvents": 50,
  "eventType": "In-person",
  "includeDescription": true
}
```

#### Output Format

The scraper outputs data in the following format:

```json
{
  "title": "SF Tech Professionals Networking Night",
  "category": "Professional Networking",
  "date": "January 15, 2025",
  "time": "6:00 PM - 8:00 PM",
  "location": "San Francisco, CA",
  "city": "San Francisco",
  "venue": "TechHub SF",
  "organizer": "SF Tech Network",
  "attendees": "127 attending",
  "eventUrl": "https://www.linkedin.com/events/...",
  "imageUrl": "https://media.licdn.com/...",
  "description": "Join us for an evening of networking with tech professionals...",
  "eventType": "Professional",
  "price": "Free",
  "speakers": "John Doe, CTO at TechCorp",
  "detailsScraped": true,
  "scrapedAt": "2025-01-10T10:30:00.000Z"
}
```

### Running the Scraper

#### Local Testing

```bash
npm start
```

#### On Apify Platform

1. Go to your actor in Apify Console
2. Configure the input parameters
3. Click "Run"
4. View results in the Dataset tab

### Professional Event Categories

The scraper intelligently searches for various types of professional events:

- **Professional Networking**: Business networking events, professional mixers
- **Business Conference**: Industry conferences, business summits
- **Industry Meetup**: Sector-specific gatherings, professional communities
- **Career Development**: Career growth workshops, skill development sessions
- **Startup Events**: Entrepreneur meetups, pitch nights, startup networking
- **Tech Talks**: Technology conferences, developer meetups
- **Leadership Summit**: Executive conferences, management forums
- **Sales & Marketing**: Growth conferences, marketing summits
- **Finance & Investment**: FinTech events, investment summits
- **Entrepreneurship**: Founder meetups, business launch events

### Technical Details

- Built with Playwright for dynamic content handling
- Uses Cheerio for HTML parsing fallback
- Implements multiple extraction strategies for reliability
- Handles LinkedIn's various page layouts
- Includes retry logic and error handling
- Supports concurrent scraping with rate limiting

### Limitations

- LinkedIn may require authentication for some features
- Rate limiting may apply for large-scale scraping
- Some event details may require visiting individual event pages
- Results depend on LinkedIn's search algorithm and available data

### Error Handling

The scraper includes comprehensive error handling:

- Automatic retry for failed requests
- Fallback extraction methods
- Graceful degradation when details aren't available
- Detailed logging for debugging

### Support

For issues or questions, please create an issue in the repository or contact support through Apify.

### License

ISC License

# Actor input Schema

## `liAtCookie` (type: `string`):

Your LinkedIn session cookie (li\_at). Get it from browser DevTools > Application > Cookies > linkedin.com

## `jsessionId` (type: `string`):

Optional JSESSIONID cookie for better stability

## `searchQuery` (type: `string`):

Keywords to search for professional and networking events (e.g., 'professional networking', 'business conference', 'career fair')

## `eventCategories` (type: `array`):

Categories of professional events to search for

## `location` (type: `string`):

City to search for professional events (e.g., 'San Francisco', 'New York', 'Chicago')

## `dateRange` (type: `string`):

Date range for events

## `maxEvents` (type: `integer`):

Maximum number of events to scrape

## `eventType` (type: `string`):

Type of events to scrape

## `includeDescription` (type: `boolean`):

Whether to scrape full event descriptions (requires visiting each event page)

## `proxy` (type: `object`):

Proxy settings for the scraper (RESIDENTIAL recommended for LinkedIn)

## `useStealthMode` (type: `boolean`):

Enable advanced anti-detection measures

## `maxRetries` (type: `integer`):

Number of retry attempts for failed requests

## Actor input object example

```json
{
  "liAtCookie": "AQEDAQNz...",
  "searchQuery": "professional networking",
  "eventCategories": [
    "Professional Networking",
    "Business Conference"
  ],
  "location": "San Francisco",
  "dateRange": "This month",
  "maxEvents": 20,
  "eventType": "All",
  "includeDescription": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "useStealthMode": true,
  "maxRetries": 3
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "liAtCookie": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("payai/linkedin-events-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "liAtCookie": "" }

# Run the Actor and wait for it to finish
run = client.actor("payai/linkedin-events-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "liAtCookie": ""
}' |
apify call payai/linkedin-events-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=payai/linkedin-events-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Linkedin Events Scraper",
        "description": "Linkedin Event Scraper source all events by city \nThe scraper is configured for these 10 major US cities and many more:\n- New York\n- Los Angeles\n- Chicago\n- San Francisco\n- Miami\n- Austin\n- Seattle\n- Boston\n- Denver\n- Atlanta",
        "version": "1.0",
        "x-build-id": "9A2OACvdVMBCRGdaM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/payai~linkedin-events-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-payai-linkedin-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/payai~linkedin-events-scraper/runs": {
            "post": {
                "operationId": "runs-sync-payai-linkedin-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/payai~linkedin-events-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-payai-linkedin-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "liAtCookie": {
                        "title": "LinkedIn li_at Cookie",
                        "type": "string",
                        "description": "Your LinkedIn session cookie (li_at). Get it from browser DevTools > Application > Cookies > linkedin.com"
                    },
                    "jsessionId": {
                        "title": "LinkedIn JSESSIONID (Optional)",
                        "type": "string",
                        "description": "Optional JSESSIONID cookie for better stability"
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Keywords to search for professional and networking events (e.g., 'professional networking', 'business conference', 'career fair')",
                        "default": "professional networking"
                    },
                    "eventCategories": {
                        "title": "Event Categories",
                        "type": "array",
                        "description": "Categories of professional events to search for",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Professional Networking",
                                "Business Conference",
                                "Industry Meetup",
                                "Career Development",
                                "Startup Events",
                                "Tech Talks",
                                "Leadership Summit",
                                "Sales & Marketing",
                                "Finance & Investment",
                                "Entrepreneurship"
                            ]
                        },
                        "default": [
                            "Professional Networking",
                            "Business Conference"
                        ]
                    },
                    "location": {
                        "title": "Location (City)",
                        "type": "string",
                        "description": "City to search for professional events (e.g., 'San Francisco', 'New York', 'Chicago')"
                    },
                    "dateRange": {
                        "title": "Date Range",
                        "enum": [
                            "This week",
                            "This month",
                            "Next 3 months",
                            "All upcoming"
                        ],
                        "type": "string",
                        "description": "Date range for events",
                        "default": "This month"
                    },
                    "maxEvents": {
                        "title": "Maximum Events",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of events to scrape",
                        "default": 20
                    },
                    "eventType": {
                        "title": "Event Type",
                        "enum": [
                            "All",
                            "Online",
                            "In-person",
                            "Hybrid"
                        ],
                        "type": "string",
                        "description": "Type of events to scrape",
                        "default": "All"
                    },
                    "includeDescription": {
                        "title": "Include Full Description",
                        "type": "boolean",
                        "description": "Whether to scrape full event descriptions (requires visiting each event page)",
                        "default": true
                    },
                    "proxy": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the scraper (RESIDENTIAL recommended for LinkedIn)",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    },
                    "useStealthMode": {
                        "title": "Use Stealth Mode",
                        "type": "boolean",
                        "description": "Enable advanced anti-detection measures",
                        "default": true
                    },
                    "maxRetries": {
                        "title": "Maximum Retries",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of retry attempts for failed requests",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
