# API problem, can't get data from old blocks

**URL:** <https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949>\
**Category:** Tech Support\
**Created:** [August 25, 2019, 10:22pm UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949 "2019-08-25T22:22:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![otnu](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@otnu](https://forum.grin.mw/u/otnu)\
**Post date:** [August 25, 2019, 10:22pm UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949/1 "2019-08-25T22:22:20Z")

</div>

I’m playing around with my node API, but I can’t get data from old blocks using ‘/v1/blocks/height’ url. It only returns a result from the last ~ 2000 blocks. E.g. if I put the height to 100 it returns an empty string.

---

<div class="post-metadata">

**Author:** ![mcdallas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/mcdallas/32/1591_2.png) [@mcdallas](https://forum.grin.mw/u/mcdallas)\
**Post date:** [August 26, 2019, 12:49am UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949/2 "2019-08-26T00:49:04Z")

</div>

That’s because the node deletes old blocks by default.

---

<div class="post-metadata">

**Author:** ![otnu](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@otnu](https://forum.grin.mw/u/otnu)\
**Post date:** [August 26, 2019, 8:30am UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949/4 "2019-08-26T08:30:22Z")

</div>

Ah, ok. Is it somehow possible to get data locally from older blocks? I’ve tried to set my node to ‘archive\_mode’ but it doesn’t seem to make a difference. Would be nice to make some graphics of the input / ouput growth since the beginning.

---

<div class="post-metadata">

**Author:** ![antioch](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/antioch/32/45_2.png) [@antioch](https://forum.grin.mw/u/antioch)\
**Post date:** [August 26, 2019, 1:12pm UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949/5 "2019-08-26T13:12:48Z")

</div>

Immediately after a fast sync (IBD) the local node will have approx 2 days of full blocks.  
This will grow over the next few days to 1 weeks worth.

---

<div class="post-metadata">

**Author:** ![antioch](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/antioch/32/45_2.png) [@antioch](https://forum.grin.mw/u/antioch)\
**Post date:** [August 26, 2019, 1:14pm UTC](https://forum.grin.mw/t/api-problem-cant-get-data-from-old-blocks/5949/6 "2019-08-26T13:14:49Z")

</div>

Setting a node to `archive_mode` will cause all _subsequent_ blocks to be archived (and not removed), but it will have no effect on historical blocks that the node never processed.
