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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chlodalejandro/iajs

v0.3.2

Published

Internet Archive JavaScript Client

Downloads

29

Readme

iajs

Internet Archive JavaScript Client which supports reading and writing data in NodeJS and the Browser

The Internet Archive is a non-profit open platform for archiving the world's free websites, books, movies, software, music, and more.

This JavaScript library enables reading and writing to the Internet Archive APIs in NodeJS and in the browser. To learn more about the Internet Archive visit https://archive.org/about/.

It's lightweight with very little dependencies.

The major APIs are documented here https://archive.org/services/docs/api/index.html, but this library supports additional APIs to enable more functionality. It does not abstract much from the APIs, but rather aggregates access to them all in a single multi-purpose library.

This library contains enough functionality to create powerful experiments and new experiences using the Internet Archive's platform and data.

Installation

Through npm

npm i iajs

Load from CDN in browser

<script src="https://unpkg.com/iajs/dist/ia.browser.js"></script>

Live demos

https://rchrd2.github.io/iajs/examples/web/01.html

Usage Examples

<script src="https://unpkg.com/iajs/dist/ia.browser.js"></script>
<script>
ia.GifcitiesAPI.search("snowglobe").then(console.log);

ia.MetadataAPI.get({
  identifier: "mma_the_sphynx_and_great_pyramid_geezeh_271101",
}).then(console.log);

ia.SearchAPI.get({
  q: {collection: "metropolitanmuseumofart-gallery"},
  fields: ["identifier", "title"]
}).then(console.log);
</script>

Running NodeJS examples

npm i
node examples/node/01-hello.js

# this will ask you to sign in and create a login config file for other examples
node examples/node/02-login.js

node examples/node/03-reviews.js

# and so on...

Planned features

  • ✅ Read item metadata and list of files (Metadata API)
  • ✅ Update item metadata (Metadata API)
  • ✅ Search (Search API)
  • ✅ Search gifcities.org (GifCities API)
  • ✅ Query related item API (Related Items API)
  • ✅ Sign in with user/pass (Xauthn API)
  • ✅ Sign in with s3 tokens
  • ✅ Sign in from archive.org session cookies
  • ✅ Add reviews (Reviews API)
  • ✅ Add page to Wayback (Save Page Now API)
  • ✅ Query the Wayback Machine (CDX and Available APIs)
  • ✅ Add/remove/list favorites (bookmarks.php API)
  • ✅ Create items (S3 API)
  • ✅ Upload item files (S3 API)
  • OpenLibrary.org APIs
  • BookReaderJSIA aka manifest API
  • Book IIIF API
  • TV
  • Radio
  • List reviews by user
  • Generate embed codes for books/videos/music files in item
  • Include a JSON diff library
  • more tbd

Misc

Note: I wanted to build this while I worked at Internet Archive, but did not have the bandwidth. Now I'm working on this in my free time.

See Also:

  • Official Internet Archive Python Client - https://github.com/jjjake/internetarchive

Screenshot of web usage example

screenshot