node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



A command-line utility

This node module gets specific data from the API, places it into a new array and saves the data in a JSON file. This is ideal if you only want specific data from the API to use as sample data in a RESTful webapp.

Getting Started

Install the npm package

npm install randomuser-json-export

Run the utility

node index.js

The output JSON file will be in the root of the package directory. By default, the file name is data.json. Currently, the utility only gets 20 results from the API. To change this, edit the HTTP URL in index.js. 

Read the docs for more configuration options.