Skip to content


MIT 608 14 103,390
202.6 million (month) Aug 29 2014 1.6.7(7 days ago)
4,055 15 142 MIT
1.4.1(3 months ago) Oct 06 2009 910.7 thousand (month)

axios is a popular JavaScript library that allows you to make HTTP requests from a Node.js environment. It is a promise-based library that works in both the browser and Node.js. It is similar to the Fetch API, but with a more powerful feature set and better browser compatibility.

One of the main benefits of using axios is that it automatically transforms the response data into a JSON object, making it easy to work with.

Axios is known for user-friendly API and support for asynchronous async/await syntax making it very accessible in web scraping.

Typhoeus is a Ruby library that allows you to make parallel HTTP requests, which can greatly speed up the process of making multiple requests to different servers. It is built on top of the C library libcurl, which is known for its high performance and reliability.

One of the main features of Typhoeus is its ability to make parallel requests. This means that it can send multiple requests at the same time, and wait for all of them to finish before returning the results. This can greatly reduce the time it takes to make multiple requests, as it eliminates the need to wait for each request to complete before sending the next one.

In addition to its parallelism feature, Typhoeus also provides a convenient and easy-to-use Ruby interface for making HTTP requests. It supports all of the common HTTP methods (GET, POST, PUT, DELETE, etc.) and allows you to set various request options, such as headers, timeouts, and authentication. It also supports streaming responses, which allows you to process large responses piece by piece, rather than loading the entire response into memory at once.

Typhoeus is also supports HTTP/2 protocol which provides faster load times and reduced network usage. It also supports streaming which is an essential feature for large data transfer.

Typhoeus is well-documented, actively maintained, and has a large and active community of users. It is widely used in the Ruby ecosystem and is a popular choice for building high-performance web scraping and data-gathering applications.

Note that Typhoeus can also be used as an adapter in popular alternative package Faraday.



Example Use

// axios can be used with promises:
  .then(response => {
  .catch(error => {

// or async await syntax:
var resp = await axios.get('');

// to make requests concurrently Promise.all function can be used:
const results = await Promise.all([

// axios also supports other type of requests like POST and even automatically serialize them:
await'', {'query': 'hello world'});
// or formdata
const data = {name: 'John Doe', email: ''};

        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'

// default values like headers can be configured globally
axios.defaults.headers.common['User-Agent'] = '';
// or for session instance:
const instance = axios.create({
  headers: {"User-Agent": ""},
# GET request
# POST request"", body: { title: "test post", content: "this is my test"})

# make parallel requests:
# hydra is a request queue manager
hydra = Typhoeus::Hydra.hydra
# create request object
first_request ="")
# add complete callbacks
first_request.on_complete do |response|
  # callbacks can queue new requests
  third_url = response.body
  third_request =
  hydra.queue third_request
second_request ="")
# queue requests:
hydra.queue first_request
hydra.queue second_request # this is a blocking call that returns once all requests are complete

Alternatives / Similar