# Extract network graph as a ftm file from Aleph?

**URL:** <https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294>\
**Category:** Support\
**Tags:** alephclient\
**Created:** [July 21, 2025, 11:03am UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294 "2025-07-21T11:03:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvin](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@marvin](https://aleph.discourse.group/u/marvin)\
**Post date:** [July 21, 2025, 11:03am UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294/1 "2025-07-21T11:03:16Z")

</div>

Hi all! Thanks for adding me to the discourse. I’m backing up some investigations and would like to store once ingested material locally. I already figured out, how to export entities from Aleph to a json file via alephclient.

However, is it possible to extract a network graph as a .ftm file - through alephclient or other means?

Thanks so much for looking into this.

Best, Marvin

---

<div class="post-metadata">

**Author:** ![tillprochaska](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tillprochaska](https://aleph.discourse.group/u/tillprochaska)\
**Post date:** [July 21, 2025, 1:04pm UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294/2 "2025-07-21T13:04:09Z")

</div>

Hi Marvin,

this `alephclient` command should allow you to write a list of entities in a given network graph to a JSON file:

```auto
alephclient entitysetitems --outfile entities.json <entityset_id>

```

You can extract the entity set ID from the network diagram’s URL. For example, in the URL `https://aleph.occrp.org/diagrams/123abc`, the entity set ID would be `123abc`.

Note that this will give you only a list of the entities in the diagram, but it doesn’t include information about the layout (positions, colors, …). If you need that as well, you might want to take a look at the [Aleph API](https://redocly.github.io/redoc/?url=https://aleph.occrp.org/api/openapi.json#tag/EntitySet/paths/~1api~12~1entitysets~1%7Bentityset_id%7D/get), but unfortunately it’s not straight forward to get it as a single file.

Hope this helps!  
Till

---

<div class="post-metadata">

**Author:** ![marvin](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@marvin](https://aleph.discourse.group/u/marvin)\
**Post date:** [July 21, 2025, 2:15pm UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294/3 "2025-07-21T14:15:45Z")

</div>

Thank you, Till, for the swift response! That’s really kind! - The alephclient command helped already, great idea!

Links between entities are set via `souceID` and `targetID’, I assume?

I mean, having the networks as a single file, would be great, but where to start with Aleph API?

---

<div class="post-metadata">

**Author:** ![tillprochaska](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tillprochaska](https://aleph.discourse.group/u/tillprochaska)\
**Post date:** [July 21, 2025, 2:27pm UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294/4 "2025-07-21T14:27:57Z")

</div>

Hey, so in the output of the alephclient command, the links between entities will be implicit. Consider this example diagram:

 ![Screenshot 2025-07-21 at 16.18.27](https://global.discourse-cdn.com/free1/uploads/alephdata/original/1X/03b260d496c03151d79699325c0a4765e46ba565.png)

When you run `alephclient entitysetitems …`, you will end up with a JSON file that contains three entities:

```json
{ "id": "1", "schema": "Person", "properties": { "name": ["John Doe"] } }
{ "id": "2", "schema": "Company": "properties": { "name": ["ACME Inc."] } }
{ "id": "3", "schema": "Directorship": "properties": { "director": ["1"], "organization": ["2"] }

```

(I left some parts of the JSON output that aren’t relevant.)

The link is the third `Directorship` entity – links are just entities and the source and target of the link are determined by the values of its properties.

In case of the Aleph API: Yes, `sourceId` and `targetId` (in `layout.edges`) refer to the source/target entities of an edge.

If you can, mabye share a little bit about what you’re trying to achieve. That would be helpful to suggest an approach for solving your problem. Do you just want to make a copy of your network diagrams? Do you want to migrate them to a different Aleph instance? Or do you want to import your diagrams to a different software?

---

<div class="post-metadata">

**Author:** ![marvin](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@marvin](https://aleph.discourse.group/u/marvin)\
**Post date:** [July 23, 2025, 5:51am UTC](https://aleph.discourse.group/t/extract-network-graph-as-a-ftm-file-from-aleph/294/5 "2025-07-23T05:51:32Z")

</div>

Thanks for planning this out for me! Coming from a less hardcore coding background my idea was simple:

I figured that there is a .ftm file ingest built in Aleph, that works really great. So I figured, exporting some of the network graphs as a ftm file for back up purposes, maybe moving them or distributing them to none-aleph users, e.g. via Aleph Data Desktop (I know it’s deprecated, but for some cases it still works fine).
