# How to read data from an external API!

**URL:** <https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 5, 2025, 11:36am UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462 "2025-01-05T11:36:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![younes\_MAIMOUNI1](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@younes\_MAIMOUNI1](https://forum.inductiveautomation.com/u/younes_MAIMOUNI1)\
**Post date:** [January 5, 2025, 11:36am UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/1 "2025-01-05T11:36:18Z")

</div>

Hi, I need your help. I'm working on a project and I want to implement an external API for Marine Traffic. How can I do this?  
Should I use the web dev module or directly in scripts?  
The final objective is to display this data in perspective.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 5, 2025, 1:18pm UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/2 "2025-01-05T13:18:17Z")

</div>

Can you give us a link so we can check the returned data format?

---

<div class="post-metadata">

**Author:** ![younes\_MAIMOUNI1](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@younes\_MAIMOUNI1](https://forum.inductiveautomation.com/u/younes_MAIMOUNI1)\
**Post date:** [January 5, 2025, 1:53pm UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/3 "2025-01-05T13:53:19Z")

</div>

It is in json format

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [January 5, 2025, 2:46pm UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/4 "2025-01-05T14:46:22Z")

</div>

> [@younes\_MAIMOUNI1](#):
>
> implement an external API

Edit: If making data available to external source:  
Either Web Dev or common database access.  
Web Dev if external source needs a process / code within Ignition to execute in order to obtain results.  
Web Dev is not required to read from an external API. Use httpClient in scripting (see post below).

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [January 5, 2025, 2:56pm UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/5 "2025-01-05T14:56:00Z")

</div>

If you are **reading an API** use the [system.net.httpClient | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-net/system-net-httpClient) function. If you are **providing an API for others to read** then you want to use the WebDev module.

On the httpClient function... you will want to put that in a project library script, create the client at the top of the script file, outside of any functions etc..., and use that in your script.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [January 6, 2025, 2:29am UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/6 "2025-01-06T02:29:53Z")

</div>

Also consider the [GitHub - Kyvis-Labs/ignition-api-client-module: An Ignition module that provides an easy way to interface with REST APIs without having to write scripts in Ignition.](https://github.com/Kyvis-Labs/ignition-api-client-module) as a very easy to maintain module to replace scripting the [system.net.httpClient | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-net/system-net-httpClient)

---

<div class="post-metadata">

**Author:** ![jesse.records](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse.records/32/10960_2.png) [@jesse.records](https://forum.inductiveautomation.com/u/jesse.records)\
**Post date:** [January 6, 2025, 10:43pm UTC](https://forum.inductiveautomation.com/t/how-to-read-data-from-an-external-api/100462/7 "2025-01-06T22:43:28Z")

</div>

If you are using Ignition Maker Edition, the Sepasoft Web Services module is available for free. [Sepasoft MES Modules Downloads & Resources | Sepasoft](https://www.sepasoft.com/downloads/)
