Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awcross/itunes-search-api
iTunes search from the terminal
https://github.com/awcross/itunes-search-api
api apple itunes movies music search
Last synced: about 2 months ago
JSON representation
iTunes search from the terminal
- Host: GitHub
- URL: https://github.com/awcross/itunes-search-api
- Owner: awcross
- License: mit
- Created: 2017-02-02T08:23:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T21:53:20.000Z (over 7 years ago)
- Last Synced: 2023-08-25T19:51:21.231Z (over 1 year ago)
- Topics: api, apple, itunes, movies, music, search
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# itunes-search-api [![Build Status](https://travis-ci.org/awcross/itunes-search-api.svg?branch=master)](https://travis-ci.org/awcross/itunes-search-api)
> iTunes Search API
## Install
```
$ npm install --save itunes-search-api
```## Usage
```js
const fs = require('fs');
const itunesSearchApi = require('itunes-search-api');const opts = {
query: {
entity: 'musicArtist',
limit: 1
}
};itunesSearchApi('deftones', opts).then(res => {
console.log(res.body);
//=> {resultCount: 1, results: [{...}]}
});// Stream
itunesSearchApi.stream('deftones', opts).pipe(fs.createWriteStream('data.json'));
```## API
### itunesSearchApi(input, [options])
#### input
Type: `string`
#### options
##### query
Type: `object`
## CLI
```
$ npm install -g itunes-search-api
``````
$ itunes-search-api --helpUsage
itunes-search-apiOptions
--country Two-letter country code [Default: us]
--entity Type of results returned [Default: album]
--limit Number of results to return [Default: 25]Example
$ itunes-search-api deftones
{resultCount: 19, results: [{...}]}
```## License
MIT © [Alex Cross](https://alexcross.io)