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

itunes-query-fetcher

v1.2.5

Published

A wrapper for the ItunesSearch API.

Downloads

2

Readme

Itunes-Query-Fetcher


This is a npm module that makes queries to the ITunes Search API.


The documentation for that API can be found here: https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/


To install this module, run the command...


npm install itunes-query-fetcher

...in the directory that your node project is located.


This module makes use of the node-request module in order to process the API calls. For example, if you're trying to look up the movie "Inception" in the ITunes Store and you would like it's information, you perform a search like this:



const request = require('request');
const queryFetcher = require('itunes-query-fetcher');

var term = "inception";
var media = "movie";
var entity = "movie";

queryFetcher.queryFetcher("inception", "movie", "movie", (errorMessage, results) => {
	if (errorMessage) {
		console.log(errorMessage);
	} else {
		console.log(results);
	}
});

The results for this request would look something like this:


{ resultCount: 1,
	 results:
	  [ { wrapperType: 'track',
	      kind: 'feature-movie',
	      trackId: 400763833,
	      artistName: 'Christopher Nolan',
	      trackName: 'Inception',
	      trackCensoredName: 'Inception',
	      trackViewUrl: 'https://itunes.apple.com/us/movie/inception/id400763833?uo=4',
	      previewUrl: 'http://video.itunes.apple.com/apple-assets-us-std-000001/Video/8c/d7/81/mzm.ralngrgq..640x356.h264lc.d2.p.m4v',
	      artworkUrl30: 'http://is2.mzstatic.com/image/thumb/Video7/v4/5f/51/75/5f5175bf-5f14-39e7-9e37-30548c2d3044/source/30x30bb.jpg',
	      artworkUrl60: 'http://is2.mzstatic.com/image/thumb/Video7/v4/5f/51/75/5f5175bf-5f14-39e7-9e37-30548c2d3044/source/60x60bb.jpg',
	      artworkUrl100: 'http://is2.mzstatic.com/image/thumb/Video7/v4/5f/51/75/5f5175bf-5f14-39e7-9e37-30548c2d3044/source/100x100bb.jpg',
	      collectionPrice: 9.99,
	      trackPrice: 9.99,
	      trackRentalPrice: 2.99,
	      collectionHdPrice: 14.99,
	      trackHdPrice: 14.99,
	      trackHdRentalPrice: 3.99,
	      releaseDate: '2010-07-16T07:00:00Z',
	      collectionExplicitness: 'notExplicit',
	      trackExplicitness: 'notExplicit',
	      trackTimeMillis: 8886218,
	      country: 'USA',
	      currency: 'USD',
	      primaryGenreName: 'Action & Adventure',
	      contentAdvisoryRating: 'PG-13',
	      longDescription: 'Dom Cobb (Leonardo DiCaprio) is a skilled thief, the best in the dangerous art of extraction: stealing valuable secrets from deep within the subconscious during the dream state when the mind is at its most vulnerable. Cobb\'s rare ability has made him a coveted player in this treacherous new world of corporate espionage, but it has also made him an international fugitive and cost him everything he has ever loved. Now Cobb is being offered a chance at redemption. One last job could give him his life back but only if he can accomplish the impossible--inception. Instead of the perfect heist, Cobb and his team of specialists have to pull off the reverse; their task is not to steal an idea but to plant one. If they succeed, it could be the perfect crime. But no amount of careful planning or expertise can prepare the team for the dangerous enemy that seems to predict their every move. An enemy that only Cobb could have seen coming.',
	      hasITunesExtras: true } ] }


The above example is included in the example.js file included in the module, which you can download and run.


NPM Link: https://www.npmjs.com/package/itunes-query-fetcher

Github Link: https://github.com/monstorium/itunes-query-fetcher