npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

google-events-scraper

v1.0.10

Published

Scraper to gather data from google events using Crawlee.

Readme

Google Events Scraper

Scraper to gather data from google events using Crawlee made in Typescript.

Installation & Usage

To install use the following npm command

$ npm install google-events-scraper

Once installed it's simple as creating an object and using it

import gEventsScraper from 'google-events-scraper';

const scraper = new gEventsScraper();
const results = await scraper.Scrape('events new york');

Date

There are two ways you can specify the date of the event but keep in mind that sometimes it will still show events outside of that range due to google.

You can specify it in the query:

const results = await scraper.Scrape('events today'); //This seems to not work so well
const results = await scraper.Scrape('events next week');
const results = await scraper.Scrape('events december 2023');

Or you can use the optional date parameters (this uses google's own way of checking the date but it's very limited, this example provides all the options):

const results = await scraper.Scrape('events canada', { today:true });
const results = await scraper.Scrape('events canada', { tomorrow:true });
const results = await scraper.Scrape('events canada', { thisWeek:true });
const results = await scraper.Scrape('events canada', { thisWeekend:true });
const results = await scraper.Scrape('events canada', { nextWeek:true });
const results = await scraper.Scrape('events canada', { nextMonth:true });

Results

If by any chance you want the last results of the scraper you can use this function (make sure it has ran at least once):

const results2 = scraper.GetResults();

IMPORTANT: start & end time given is in the UTC timezone so when using Date objects for example make sure you always get it in UTC for example 'time.getUTCTime();'. otherwise it will use your local time zone and convert the time to your time zone displaying something completely incorrect. BUT just because you're using it in the UTC timezone does not mean the events time is acctually in UTC (I'm just using that timezone as a basis). If the scraper does find a timezone you can check it but sometimes you can't find it and most of the information has to be inferred from a string.

The results you will recieve and some things to keep in mind:

{
    name: 'Event Name',
    description: 'Event Description', //Has possibility of being empty
    imageUrl: 'https://image.url', //Has possibility of being empty
    mapImageUrl: 'https://map-image.url',
    date: { 
        start: 1686841200,
        end: 1686909600, //Has possibility of being 0
        timezone: 'UTC', //Has possibility of being empty
        when: 'Today' }, //Has possibility of being empty
    location: {
      name: 'Location Name',
      address: 'Location Address',
      mapUrl: 'https://google-maps.url'
    },
    links: [ { //Array containing one or more links to buy tickets and such
        name: 'Event Website',
        url: 'https://event.url'
    } ]
}

Notes

This should be able to scrape most of the events and not break, but the way google events displays data isn't the most predictable thing and although I tried getting all the cases it might still break. If such thing happens feel free to create an issue.

Not only this is my first proper package it's also my first time using Typescript so if you have any questions, suggestions or know how to improve it feel free to offer the suggestion or fork this repository and create a pull request!