# Pulling data from Mirror made almost easy

By [Joshua ⏦ Astralix.eth](https://paragraph.com/@astralix) · 2022-01-25

---

Mirror is pretty great!

Do you know what makes it even better? **Integrations!**

> **Caveat emptor ☠️**
> 
> Mirror themselves do not have documentation for this as of now. I make no guarantee that this works, will continue to work, is API stable, etc. I can however tell you that I do use this with a Next.js project so if it does change - I am in for a headache.

By far the easiest way to pull data from Mirror is the GraphQL API.

The endpoint we’ll be using today is `https://mirror-api.com/graphql`

Now dig out your favourite GraphQL tool - I use [Altair](https://altair.sirmuel.design/).

Picking a good tool is very important as we don’t actually know what entities are available in Mirror because none of this is documented. The only reason this works is because GraphQL natively includes the ability to query the schema proper. If you are a peak Vim-lord you can in fact run the [introspection query yourself](https://stackoverflow.com/a/46543255). Now, we can debate whether that introspection is a boon or a massive security nightmare (hint: it’s _both_) but, for us this is amazing.

In Altair the autocomplete is mapped to `Control + Space`

GraphQL Introspection is Magic ✨

So we’ve got access to a very cool API, now how do we use it?

GraphQL is exactly that - a Graph Query Language, so we do what we always do with Graphs. Traverse the network!

Let’s demo this by listing all my posts titles, draft status and timestamps.

Back to Altair we go.

That felt pretty much trivial 🚀

That’s it!

Now go and make something cool - or cursed - either way will be entertaining!

> **Winners don’t do DoS**
> 
> Homies don’t DoS (even by negligence) - Site Reliability Engineers are expensive. Try not to overload the endpoint.

To the Mirror team - if you’re reading this keep up the great work.

The [people I work with](https://mirror.xyz/0xCdE1977B8bF6C166C8e4724785C300D82817115c) seem to be enjoying it and heck, I like the experience too!

---

*Originally published on [Joshua ⏦ Astralix.eth](https://paragraph.com/@astralix/pulling-data-from-mirror-made-almost-easy)*
