Using data from web APIs in Isadora: part 1
Make a TCP/IP GET request from Isadora and parse the server response.
What is a web API?
Web APIs are communication channels defined by a web application or service for data input and output. API means application programming interface.
Using a web API, Isadora can interact with data from a web service: the latest public post, a Facebook page count, or another source. This tutorial focuses on the Isadora actors needed to communicate with an API rather than proposing one specific use.
APIs differ, and what works for one service may not work for another. This example starts with jsontest.com, a simple test API that does not require authentication and returns enough data to demonstrate the TCP/IP request and parsing process.
This is a historical 2014 tutorial. The sample service and plain HTTP workflow may no longer be available or suitable for current systems.
In this first tutorial, make a TCP/IP GET request. GET requests retrieve information from a server; POST requests send information to a system. Starting with GET is the simplest introduction.
This tutorial assumes that Isadora is installed and that the basic Isadora tutorials have been watched.
Bring these actors into the patch:
- TCP Send Data
- TCP In Watcher - Text
- TCP Stream Control
The same TCP communication is available in the TCP and binary variants of some actors, but this tutorial uses text.
Set up the TCP actors

Connect the msg rcv output of TCP In Watcher - Text to the deactivate input of TCP Stream Control.
Set the TCP Send Data inputs:
- Stream id = 1
- Params = 1
- Param 1 = 0

Double-click TCP Send Data and replace the default text with:
"GET /?callback=showMyIP HTTP/1.1" 0D 0A "HOST: ip.jsontest.com" 0D 0A 0D 0A
This text defines the HTTP method, path, HTTP version, Host header, and the blank line that ends the request headers.
- Method: GET
- Path: /?callback=showMyIP
- HTTP version: HTTP/1.1
The 0D 0A values are carriage return and line feed: \r\n.
The request above is equivalent to:
"GET /?callback=showMyIP HTTP/1.1\r\nHost: ip.jsontest.com\r\n\r\n"
Using both \r and \n matches the HTTP specification and avoids server compatibility problems.
Open the server connection

Configure TCP Stream Control:
- Stream id = 1
- Tcp addr =
ip.jsontest.com - Tcp port = 80
- Buf size = 350, or a larger value if the full server reply must be visible
Port 80 is the standard port for HTTP. This original example uses plain HTTP, not HTTPS.
Watch and parse the response

Set TCP In Watcher - Text:
- Stream id = 1
- Enable = On
- Eom char = 10
An Eom char of 10 represents a line feed.
Double-click the watcher and enter:
msg : string = [^;] ";"
This produces a msg output as a string. The [^;] expression selects characters except ;, and the parser stops at the next semicolon.
As a fallback for testing, the original article also used:
msg:string={00-FF}
That parser matches characters across the full hexadecimal range.
Complete the GET request

- Click Activate on TCP Stream Control.
- Trigger the TCP Send Data actor.
- The server returns text to TCP In Watcher - Text.
- The watcher triggers
msg rcv. msg rcvdeactivates TCP Stream Control and closes the connection.
A response from the original example might look like:
showMyIP({"ip": "99.231.128.74"})
The address shown above is only an example from the original article.
To trigger the request from the keyboard:
- Add a Keyboard Watcher and leave it watching
a. - Add a Trigger Delay and set it to 0.5 seconds.
- Connect the keyboard key output to both the Trigger Delay trig input and TCP Stream Control activate input.
- Connect the Trigger Delay trigger output to TCP Send Data trigger.
Hit a to open the connection, wait half a second, and send the GET request. Clear the msg output when testing repeatedly so each new response is easier to see.
It is possible to omit the deactivate connection, but this is poor practice. Open the connection once, complete all communications, then close it.
Historical note: This plain-HTTP example may not work today. jsontest.com and ip.jsontest.com are no longer reliable from this tutorial, and modern API services often require HTTPS, authentication, or a JSON parsing actor rather than the semicolon parser shown here.