Cookie & Session Manager avatar

Cookie & Session Manager

Pricing

from $50.00 / 1,000 session manageds

Go to Apify Store
Cookie & Session Manager

Cookie & Session Manager

A general-purpose cookie/session manager that captures, stores, validates & refreshes browser cookies for any website. Many scrapers need authenticated sessions to access data behind login walls. Manually exporting cookies from your browser is tedious & they expire frequently. This actor solves that

Pricing

from $50.00 / 1,000 session manageds

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Share

A general-purpose cookie/session manager that captures, stores, validates, and refreshes browser cookies for any website. Other Apify actors can read stored cookies by key instead of requiring users to manually export and paste cookies.

Why use this?

Many scrapers need authenticated sessions to access data behind login walls. Manually exporting cookies from your browser is tedious and they expire frequently. This actor solves that by:

  1. Capturing cookies through an interactive browser session (you log in via Apify's live view)
  2. Storing them in a persistent Named Key-Value Store
  3. Validating stored sessions to check if they're still active
  4. Refreshing expired sessions automatically with saved credentials

Your other actors simply call Actor.openKeyValueStore('cookie-sessions') and read cookies by key.

Supported Platforms

Built-in login detection for:

PlatformLogin URLSuccess Detection
Nextdoornextdoor.com/loginFeed page loaded
LinkedInlinkedin.com/loginGlobal nav visible
Facebookfacebook.com/loginBanner visible
Instagraminstagram.com/accounts/loginNav element loaded
TikToktiktok.com/loginFor You page loaded
Yelpyelp.com/loginUser account menu visible
CustomAny URL you provideYour CSS selector or URL pattern

Modes

Mode 1: Capture (Interactive Login)

Opens a real browser you can see via Apify's Live View (or VNC). Navigate to the login page, log in manually, and the actor captures all cookies once it detects a successful login.

{
"mode": "capture",
"platform": "nextdoor",
"storageKey": "nextdoor-john",
"waitForLoginSecs": 120
}

Mode 2: Validate

Reads stored cookies and checks if the session is still valid by navigating to the platform and looking for authenticated content.

{
"mode": "validate",
"platform": "nextdoor",
"storageKey": "nextdoor-john"
}

Mode 3: Refresh (Automated Re-login)

Performs a headless automated login with saved credentials, captures fresh cookies, and overwrites the stored ones. Schedule this to run every few days to keep sessions alive.

{
"mode": "refresh",
"platform": "nextdoor",
"storageKey": "nextdoor-john",
"email": "john@example.com",
"password": "your-password"
}

Using Stored Cookies in Other Actors

Once cookies are captured, any Apify actor can read them:

import { Actor } from 'apify';
// Open the same named store
const store = await Actor.openKeyValueStore('cookie-sessions');
const sessionData = await store.getValue('nextdoor-john');
if (sessionData?.cookies) {
// Use with Playwright
const context = await browser.newContext();
await context.addCookies(sessionData.cookies);
// Now navigate — you're logged in!
const page = await context.newPage();
await page.goto('https://nextdoor.com/feed/');
}

Output Format

{
"platform": "nextdoor",
"storageKey": "nextdoor-john",
"kvStoreName": "cookie-sessions",
"mode": "capture",
"success": true,
"cookieCount": 15,
"sessionValid": true,
"capturedAt": "2026-03-28T10:00:00Z",
"expiresEstimate": "2026-04-11T10:00:00Z",
"platformDetected": true,
"message": "Cookies captured and stored. Use storageKey 'nextdoor-john' in your scraper actors."
}

Scheduling Auto-Refresh

Set up an Apify Schedule to run the actor in refresh mode every 3 days to keep sessions alive:

  1. Go to Schedules in your Apify dashboard
  2. Create a new schedule with cron: 0 6 */3 * * (every 3 days at 6 AM)
  3. Set the actor input to refresh mode with your credentials

Pricing

$0.05 per session managed (capture, validate, or refresh operation).

Plus standard Apify platform costs (compute, proxy, storage).

These actors have built-in Cookie Manager support — just set cookieStorageKey in their input:

LinkedIn (10 actors)

ActorWhat It Does
LinkedIn Post ScraperScrape viral posts by hashtag, keyword, or profile
LinkedIn Profile ScraperExtract full profile data (experience, education, skills)
LinkedIn Post Engagers ScraperGet people who liked/commented on a post
LinkedIn Company Followers ScraperExtract company page followers
LinkedIn Event Attendees ScraperGet attendees of LinkedIn events
LinkedIn Jobs ScraperScrape job listings with company data
LinkedIn PosterPost content to LinkedIn profiles and company pages
LinkedIn Sales Navigator ScraperExtract Sales Navigator search results and leads
LinkedIn EngageAuto-engage (like, comment) on targeted posts
LinkedIn Voice TrainerCollect writing samples for AI voice training

Instagram (3 actors)

ActorWhat It Does
Instagram PosterPost photos, carousels, and reels to Instagram
Instagram ScraperExtract profiles, posts, and engagement data
Instagram Lead GeneratorFind leads from followers and engagers

TikTok (3 actors)

ActorWhat It Does
TikTok PosterPost videos to TikTok
TikTok ScraperExtract profiles, videos, and engagement data
TikTok Shop ScraperScrape TikTok Shop product catalogs and vendors

Facebook (2 actors)

ActorWhat It Does
Facebook PosterPost to Facebook pages and profiles
Facebook Page Post ScraperExtract posts from Facebook pages

Other Platforms (4 actors)

ActorPlatformWhat It Does
Twitter/X PosterTwitter/XPost tweets and threads
Reddit PosterRedditPost to subreddits
Pinterest PosterPinterestPin images and create boards
Nextdoor ScraperNextdoorBusiness profiles, recommendations, neighborhood posts

One cookie capture → all actors on that platform read from the same key. No manual pasting, no re-exporting.

Example Workflow

1. Run Cookie Manager: { "mode": "capture", "platform": "linkedin", "storageKey": "linkedin-john" }
2. Run LinkedIn Post Scraper: { "cookieStorageKey": "linkedin-john", "hashtags": ["marketing"], "demoMode": false }
3. Run LinkedIn Profile Scraper: { "cookieStorageKey": "linkedin-john", "profileUrls": ["https://linkedin.com/in/someone"] }
4. Schedule Cookie Manager refresh every 3 days — all actors stay authenticated

FAQ

A: No. Cookie Manager captures cookies once and stores them. Your scrapers read from the store independently. Cookie Manager only needs to run again when cookies expire.

Q: How do I know when cookies expired?

A: Run Cookie Manager in validate mode. It checks if the stored session is still valid. You can also schedule validation runs to get alerted before expiry.

Q: Can multiple actors use the same cookies at the same time?

A: Yes. The Key-Value Store is read-only for scrapers — they don't modify the cookies. Multiple actors can read the same key concurrently.

Q: What if a platform has 2FA or CAPTCHA on login?

A: Use capture mode. It opens a real browser in Apify's Live View where you can manually handle 2FA, CAPTCHA, or any interactive login flow. The actor waits for you to finish and then captures the cookies.

Q: Can I manage cookies for multiple accounts?

A: Yes. Use different storage keys: linkedin-john, linkedin-marketing-team, nextdoor-jane, etc. Each key stores a separate session.

Q: What if refresh mode fails?

A: The actor logs a clear error and doesn't overwrite existing cookies. Your scrapers keep using the last known good cookies until you manually recapture or fix the refresh credentials.

Q: Will this work with platforms not in the supported list?

A: Yes. Set platform to "custom" and provide loginUrl and successIndicator (a CSS selector that appears only when logged in). Works with any website.

Troubleshooting

"Capture mode timed out"

  • Make sure you're watching the Apify Live View and logging in manually
  • Increase waitForLoginSecs (default is 120 — try 300 for slow logins)
  • Check that the platform's login page actually loads in the browser

"Refresh mode failed to login"

  • Verify your email/password are correct
  • The platform may have changed its login form selectors
  • The platform may require 2FA — use capture mode instead
  • Try with residential proxies (the default) — some platforms block datacenter IPs

"Stored cookies not found by my scraper"

  • Make sure the storageKey matches exactly (case-sensitive)
  • Make sure the kvStoreName matches (default: cookie-sessions)
  • Run Cookie Manager in validate mode to confirm cookies exist and are valid

"Cookies expire too quickly"

  • Schedule Cookie Manager in refresh mode every 2-3 days
  • Some platforms (LinkedIn) expire cookies every 2-7 days
  • Using residential proxies with the same session can extend cookie life

Tips

  • Capture mode requires you to be present at the Apify Live View to log in manually — great for platforms with 2FA or CAPTCHA
  • Refresh mode works best for platforms with simple email/password login (no 2FA)
  • Use descriptive storage keys like nextdoor-john or linkedin-marketing-team to manage multiple accounts
  • Always validate before using stored cookies in production scrapers
  • Residential proxies (default) provide the best success rate for login sessions

Technical Details

  • Browser: Camoufox stealth browser (C++ fingerprinting) with Firefox fallback
  • Storage: Apify Named Key-Value Store (persistent across runs)
  • Cookie Format: Standard Playwright cookie format (name, value, domain, path, secure, httpOnly, sameSite)
  • Metadata: Each stored session includes capturedAt, platform, email timestamps
  • Memory: 2 GB default
  • Timeout: 5 minutes default (increase for slow logins in capture mode)

Support


Built by John Rippy | Actor Arsenal