## Table of Contents

- [selectorAll](#selectorall)

---

[](https://microlink.io/docs/api/getting-started/overview)

[API](https://microlink.io/docs/api/getting-started/overview)

[](https://microlink.io/docs/guides)

GUIDES

[](https://microlink.io/docs/mql/getting-started/overview)

MQL

[](https://microlink.io/docs/sdk/getting-started/overview)

SDK

[](https://microlink.io/docs/cards/getting-started/overview)

CARDS

## selectorAll

Type:

\<string\> \| \<string\[\]\>

\
Values: [](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)

CSS selector

It's the same than but it returns your a collection of results, being equivalent to [](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)

[Document.querySelectorAll()](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)

:

``` js
const mql = require('@microlink/mql')

const hackerNews = () =>

  mql('https://news.ycombinator.com/', {

    data: {

      posts: {

        selectorAll: '.athing',

        attr: {

          title: {

            type: 'title',

            selector: '.storylink',

            attr: 'text'

          },

          url: {

            type: 'url',

            selector: '.storylink',

            attr: 'href'

          }

        }

      }

    }

  })

const { data } = await hackerNews()

console.log('latest hacker news posts:', data.posts)
```