# Verify content with api /dag/export

**URL:** <https://discuss.ipfs.tech/t/verify-content-with-api-dag-export/11813>\
**Category:** Help\
**Tags:** js-ipfs\
**Created:** [July 22, 2021, 8:05am UTC](https://discuss.ipfs.tech/t/verify-content-with-api-dag-export/11813 "2021-07-22T08:05:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo1](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/pablo1/32/5291_2.png) [@pablo1](https://discuss.ipfs.tech/u/pablo1)\
**Post date:** [July 22, 2021, 8:05am UTC](https://discuss.ipfs.tech/t/verify-content-with-api-dag-export/11813/1 "2021-07-22T08:05:12Z")

</div>

Hey! I need to consume the IPFS http api endpoint `/api/v0/dag/export` ([HTTP APIs for IPFS | IPFS Docs](https://docs.ipfs.io/reference/http/api/#api-v0-dag-export)) to verify content hash from an IPFS gateway. Which JS tooling do I need to use and what would be the best way to implement it?

---

<div class="post-metadata">

**Author:** ![olizilla](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/olizilla/32/2302_2.png) [@olizilla](https://discuss.ipfs.tech/u/olizilla)\
**Post date:** [July 22, 2021, 2:16pm UTC](https://discuss.ipfs.tech/t/verify-content-with-api-dag-export/11813/2 "2021-07-22T14:16:37Z")

</div>

you can use: [GitHub - olizilla/ipfs-get: Get and verify a file by CID from an IPFS gateway over http](https://github.com/olizilla/ipfs-get)  
it’ll fetch a content-addressed archive from `/api/v0/dag/export` and write the files to disk.

Or there is [GitHub - web3-storage/ipfs-car: Convert files to content-addressable archives and back](https://github.com/web3-storage/ipfs-car)  
which gives you `pack` and `unpack` functions you can use in your apps to pack files in to content addressed archives or unpack them back to the source files.

If you want to work with IPLD data that isn’t dag-pb unixfs (e.g not files you `ipfs add’ed) then check out the wonderful [GitHub - ipld/js-car: Content Addressable aRchive format reader and writer for JavaScript](https://github.com/ipld/js-car) which provides the foundations for the previous two modules.

---

<div class="post-metadata">

**Author:** ![pablo1](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/pablo1/32/5291_2.png) [@pablo1](https://discuss.ipfs.tech/u/pablo1)\
**Post date:** [July 25, 2021, 6:38pm UTC](https://discuss.ipfs.tech/t/verify-content-with-api-dag-export/11813/3 "2021-07-25T18:38:19Z")

</div>

Thank you so much for the answer! I have been taking a look and seems like it is what I need. Anyway I still do not found how can I recreate the CID from the CAR content so I can verify the content source.

This is what I have:

1. Get CAR with: Fetch /dag/export/arg=Qme…

2. Unpack CAR with ipfs car library

3. Recreate CID with the CAR content ??
