# Link to cast file when loading in javascript

**URL:** <https://discourse.asciinema.org/t/link-to-cast-file-when-loading-in-javascript/986>\
**Category:** General\
**Created:** [May 20, 2025, 11:33am UTC](https://discourse.asciinema.org/t/link-to-cast-file-when-loading-in-javascript/986 "2025-05-20T11:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tacman](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.asciinema.org/tacman/32/615_2.png) [@tacman](https://discourse.asciinema.org/u/tacman)\
**Post date:** [May 20, 2025, 11:33am UTC](https://discourse.asciinema.org/t/link-to-cast-file-when-loading-in-javascript/986/1 "2025-05-20T11:33:21Z")

</div>

how do I get from a link like [untitled - asciinema.org](https://asciinema.org/a/bAY9c2ZFtSSAHhiXZdinHOmtP) to the original .cast json (line-demimited)? Is there a link like [https://asciinema.org/a/bAY9c2ZFtSSAHhiXZdinHOmtP.json](https://asciinema.org/a/bAY9c2ZFtSSAHhiXZdinHOmtP.json) that would allow me to simply fetch it?

I see that both .json and .cast work for returning the .cast data, so this can be closed.

---

<div class="post-metadata">

**Author:** ![ku1ik](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.asciinema.org/ku1ik/32/171_2.png) [@ku1ik](https://discourse.asciinema.org/u/ku1ik)\
**Post date:** [May 29, 2025, 1:12pm UTC](https://discourse.asciinema.org/t/link-to-cast-file-when-loading-in-javascript/986/3 "2025-05-29T13:12:49Z")

</div>

Yup. The link is displayed in the Download popup. If the file is asciicast v1 then it uses `.json`, if newer then it uses `.cast`. Both work though when requesting the file, as you figured out
