# Retrieving posts directly from Arweave

By [Mirror Blog](https://paragraph.com/@mirror-blog) · 2022-04-04

---

All of Mirror’s posts are available to access on [Arweave](https://www.arweave.org/), an on-chain decentralized storage layer that makes it so that your posts exist forever (even if Mirror does not)!

Here’s a basic tutorial on how to get data published on Mirror directly from Arweave:

1.  Grab the Mirror content digest from the end of a Mirror post URL. The URL for this post is `dev.mirror.xyz/GjssNdA6XK7VYynkvwDem3KYwPACSU9nDWpR5rei3hw` and so the digest is `GjssNdA6XK7VYynkvwDem3KYwPACSU9nDWpR5rei3hw`
    
2.  We’re going to plug this digest value into a query against [Arweave’s graphQL endpoint](https://www.google.com/search?q=arweave+graphql&rlz=1C5CHFA_enUS932US932&oq=arweave+graphql&aqs=chrome..69i57j69i61j69i60.2079j0j7&sourceid=chrome&ie=UTF-8) to render the data
    
3.  We’re going to make use of a couple of tags to get the Arweave transaction via GraphQL. Every post on Mirror has a few tags we can use to filter for the content:
    
    1.  `App-Name: MirrorXYZ` tells Arweave to scope the results to all posts on Mirror
        
    2.  `Original-Content-Digest: GjssNdA6XK7VYynkvwDem3KYwPACSU9nDWpR5rei3hw` tells Arweave to return every single transaction that matches the requested content digest
        
    3.  By default, we upload every single published update on a post to Arweave, so the query returns a list. To get the most recently published update sent to Arweave, we just sort the results by block height and grab the newest transaction.
        
4.  Once, we have the Transaction ID we need, we can use the `getData` function in the [Arweave JS SDK](https://github.com/ArweaveTeam/arweave-js) to render the JSON content
    
    1.  We can also verify that we have the correct transaction ID navigating to `arweave.net/<TRANSACTION_ID>` which will render the JSON
        
    2.  Our digest `GjssNdA6XK7VYynkvwDem3KYwPACSU9nDWpR5rei3hw` returns a transaction ID of `dysIrCovgAHJ6siGA5_r27Q59j2tv5wD4kqc1bxRFVE`, which renders the content you see [here](https://arweave.net/RM2C8OKruS_UmORwvyv1Q1w0e0aQaZWFRzFL1eGgpLg).
        

The GraphQL query is available as a gist [here](https://gist.github.com/saarim-mirror/2605fda5baf8b428385c872f6eb5d6d5).

In order to bypass requiring content digests to populate Mirror posts, you can use the `Contributor` tag to query for all posts made by a specific wallet. A full list of available tags is available on the `Transaction` GraphQL object.

---

*Originally published on [Mirror Blog](https://paragraph.com/@mirror-blog/retrieving-posts-directly-from-arweave)*
