google-photos-scraper
v1.0.0
Published
A tool to scrape image URLs from public Google Photos albums
Downloads
10
Maintainers
Readme
Google Photos Scraper
A TypeScript CLI tool to extract image URLs from public Google Photos albums.
Features
- 🔍 Extract all image URLs from public Google Photos albums
- 🎛️ Configurable image dimensions (width/height)
- 📁 Export URLs to both JSON and TXT formats
- 🚀 Available as a global npm package via
npx - 🛡️ Written in TypeScript with full type safety
Installation
Using npx (Recommended)
No installation required! Just run:
npx google-photos-scraper <album-url> [width] [height]Global Installation
npm install -g google-photos-scraperLocal Installation
npm install google-photos-scraperUsage
Basic Usage
# Using npx
npx google-photos-scraper https://photos.app.goo.gl/your-album-url
# Using global installation
google-photos-scraper https://photos.app.goo.gl/your-album-urlWith Custom Dimensions
# Get images in 1920x1080 resolution
google-photos-scraper https://photos.app.goo.gl/your-album-url 1920 1080
# Get images in 4K resolution
google-photos-scraper https://photos.app.goo.gl/your-album-url 3840 2160Output
The tool will create two files in your current directory:
photo-urls.json- URLs in JSON formatphoto-urls.txt- URLs in plain text format (one per line)
Examples
# Default (maximum resolution available)
npx google-photos-scraper https://photos.app.goo.gl/hVP32gj7N6y5F8Gx2
# HD resolution
npx google-photos-scraper https://photos.app.goo.gl/hVP32gj7N6y5F8Gx2 1920 1080
# Square format
npx google-photos-scraper https://photos.app.goo.gl/hVP32gj7N6y5F8Gx2 1080 1080Requirements
- Node.js 14.0.0 or higher
- The tool automatically installs Playwright browsers when first run
Development
Building from Source
git clone https://github.com/austenstone/google-photos-scraper.git
cd google-photos-scraper
npm install
npm run buildRunning Tests
npm testAPI
You can also use this tool programmatically:
import { scrapeGooglePhotos } from 'google-photos-scraper';
const urls = await scrapeGooglePhotos('https://photos.app.goo.gl/your-album-url');
console.log(`Found ${urls.length} photos`);Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see the LICENSE file for details.
Author
Austen Stone
- GitHub: @austenstone
Disclaimer
This tool is for educational purposes only. Make sure you have permission to scrape the photos and comply with Google's Terms of Service and applicable laws.
