Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including torrequest with all npm packages installed. Try it out:

var torrequest = require("torrequest")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

torrequest v0.0.2

request-clone with connection to torfetch-module


This module works like the normal request module for node from mikeal, but call it's request over a socks5-proxy. This module is able to fetch onion-domains.



At first you need to have a working TOR service on your machine.

For example you can install TOR on a Debian system like this:

apt-get install tor tor-geoipdb

Installation with node

Install the package over the npm package-manager:

npm install torrequest


You can use this module like the request module. Please see the readme of request for further informations.

Socks5 typical parameters

There are two optional parameters specially introduced for the tor settings: torHost and torPort. Normally this module use the standard localhost:9050.

Example with custom host and port.

var torRequest = require("torrequest");

  uri: "",
  torHost: "my-host-or-ip",
  torPort: 9050
}, function(err,res,doc){
  if(err) return console.log("Error: "+err);
  console.log("Document fetched successfully...");


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free