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

universal-read-api

v1.0.0

Published

A serverless infrastructure tool that turns any website URL into structured JSON data for AI agents

Readme

Universal Read API

Build AI agents that can read any website.

A serverless API that turns any URL into structured JSON data using Cloudflare Workers and Google Gemini 2.5 Flash Lite.

License Cloudflare Workers Gemini AI Contributions Welcome PRs Welcome

🚀 Features

  • Free to Host: Runs entirely on the Cloudflare Workers FREE plan.
  • Fast Extraction: Uses lightweight HTTP fetch + intelligent Regex cleaning (not heavy Puppeteer).
  • Smart Schema: Define exactly what JSON structure you want back.
  • Universal: Works on ~80% of websites (blogs, news, documentation, etc.).
  • Auto-Summarization: If no schema is provided, it intelligently summarizes the page.

🛠️ Tech Stack

⚡ Quick Start

1. Clone & Install

git clone https://github.com/RajeshKalidandi/universal-read-api.git
cd universal-read-api
npm install

2. Setup Gemini API Key

Get a free API key from Google AI Studio.

For Local Development: Create a .dev.vars file:

GEMINI_API_KEY=your_actual_api_key_here

For Production:

npx wrangler secret put GEMINI_API_KEY

3. Run Locally

npm run dev

4. Deploy

npm run deploy

🔌 API Usage

Endpoint: POST /extract

Request:

curl -X POST https://universal-read-api.rajeshdev.workers.dev/extract \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "schema": {
      "title": "string",
      "summary": "string",
      "dates": ["string"]
    }
  }'

Response:

{
  "success": true,
  "data": {
    "title": "Example Domain",
    "summary": "This domain is for use in documentation examples...",
    "dates": []
  },
  "metadata": {
    "url": "https://example.com",
    "model": "gemini-2.5-flash-lite",
    "tokensUsed": 341,
    "processingTimeMs": 1205
  }
}

🤝 Contributing

We welcome contributions! Whether it's fixing bugs, improving documentation, or adding new features.

How to Contribute

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/universal-read-api.git
  3. Create a branch: git checkout -b feature/amazing-feature
  4. Make your changes
  5. Commit: git commit -m 'Add some amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open a Pull Request

Ideas for Contributions

  • [ ] Add support for Puppeteer (Browser Rendering) as an optional mode
  • [ ] Add rate limiting using Cloudflare KV/Durable Objects
  • [ ] Add scraping fallback for different site structures
  • [ ] Improve prompt engineering for specific extraction types

⚠️ Limitations

This version uses standard HTTP requests (fetch), not a full browser.

  • Works great for: Static sites, blogs, news, wiki, docs.
  • Does not work for: Heavy client-side rendered apps (some React/SPA sites) that require JavaScript to show any content.

📄 License

MIT © Rajesh Kalidandi