Unparalleled suite of productivity-boosting Web APIs & cloud-based micro-service applications for developers and companies of any size.

APIAutomation

How a college student was able to track Elon Musk’s private jet movements by simply using a few APIs

In this article, we give you an overview of how a college kid was able to set up a Twitter bot that tracks the locations of VIPs private jets. In particular, one account automatically Tweets the location of Elon Musk’s private jet as it lands and takes off. This article will cover what APIs you or a programmer would need to build an automated flight tracking bot, just like the one Sweeny, a college student, used to track Elon Musk’s private jet. Even using a professional freelancer programmer to build a celebrity flight tracking bot would cost you less than you might think.

API Mischief or Public Right To Know?

In January 2022 there was much interest in the news concerning a Twitter account called @ElonJet run by a college student. The Twitter account made headlines when Sweeney refused to take $5,000 from Elon Musk to take it down. Sweeney made his own counteroffer, and said that he would accept $50,000 to take his Twitter account down.

Sweeney has been the subject of a lot of criticism as well as a lot of admiration on social media. Some people think what Sweeney has done is smart, other people condemn Sweeny’s actions as being tantamount to blackmail.

It turns out that Sweeney isn’t legally doing anything wrong. His Twitter account correctly states on January the 18th ‘This account has every right to post jet whereabouts, ADS-B data is public, every aircraft in the world is required to have a transponder, Even AF1 (@AirForceTrack) Twitter policy states data found on other sites is allowed to be shared here as well.’

ADS-B stands for Automatic Dependent Surveillance–Broadcast. Wikipedia defines ADS-B as: ‘a surveillance technology in which an aircraft determines its position via satellite navigation or other sensors and periodically broadcasts it, enabling it to be tracked. The information can be received by air traffic control ground stations as a replacement for secondary surveillance radar, as no interrogation signal is needed from the ground. It can also be received by other aircraft to provide situational awareness and allow self-separation. ADS–B is “automatic” in that it requires no pilot or external input. It is “dependent” in that it depends on data from the aircraft’s navigation system.’

The ADS-B technology generates data from any aircraft that is required to have a transponder. Many jurisdictions worldwide now require aircraft to have a transponder. For example ‘the United States has required many aircraft (including all commercial passenger carriers and aircraft flying in areas that require a transponder) to be so equipped since January 2020; and, the equipment has been mandatory for some aircraft in Europe since 2017’

Sweeney, a smart kid who knows his way around online APIs

Somehow Sweeney has managed to get hold of the registration of Elon Musk’s private aircraft and is on a regular basis able to send screenshots to his Twitter @ElonJet account of where Elon Musk’s aircraft is located on a map.

@ElonJet is one of 15 flight-tracking accounts created by Sweeney.

Sweeney admits the flight-tracking accounts are run by bots which he has ‘programmed to parse the data and tweet every time a chosen plane takes off or lands’.

How does he do it?

It is extremely likely that Sweeney used a flight tracking API.

With a live flight API that links longitude and latitude coordinates into a Map API you can visualise planes moving across the world live time.

With a flight API you can even track a particular plane if you know its registration number.

Furthermore, flight APIs can be used to filter for planes of a certain type (which is great for developing software for plane spotting enthusiasts) or filter planes belonging to a particular company (great for price comparison websites, lawyers who do compensation claims for delayed flights, new airlines planning new flight routes).

Possibly the hardest thing that Sweeney had to do was discover the reg number of Elon Musk’s plane. This wouldn’t be hard as there would be so many plain spotter enthusiasts keeping track of that information, and it is easily Googled.

Finding the registration numbers of VIPs private jets

superyachtfan.com a website that keeps tracks of super yachts owned by the rich and famous also has a section identifying owners of private jets, including Elon Musk. https://www.superyachtfan.com/private-jet/owner/elon-musk/ This website even includes a live tracking map for Elon Musk’s plane N628TS. A screen grab API such as https://screenshotlayer.com could be programmed to periodically check this website at times that a flight API indicates that the plane is moving and take new screen grabs, which could then be automated to a Twitter post using the Twitter API.

Sweeney is using publicly available ADS-B data to track the movements of N628TS and he is not breaking Twitter’s best practice rules, as he is allowed to share data that can be found on other sites.

As well as many flight APIs that give access to ADS-B data, there are also an increasing amount of APIs that make it easy to share data that appears on other websites. Sweeney appears to be sharing data about Elon Musk’s private jet directly to his Twitter account as a screenshot from adsbexchange.com. Sweeney may have a subscription to their flight API, or even possibly a subscription to a screenshot API such as screenshotlayer.com enabling him to take a map screenshot from the website every time the flight API alerts his bot that Elon’s jet has taken flight or landed.

How to create a flight tracking Twitter bot that shares screenshots

While we don’t exactly know how Sweeney built his bot because there a combination of APIs and methods he could have chosen, the step by step process below will guide you to how you can also learn the skills to create your own bot or instruct a programmer to build one for you.

Step 1: The programming skills required

Method 1 – learn Python from 21.5 hours of video
If you already have skills in easy-to-use programming languages such as Python working with and connecting most APIs together is easy. If you are not sure how to do this and want to learn about how to do it yourself, check out Udemy courses in APIs and Python such as API and Web Service Introduction (6.5 hours of on demand video) and REST APIs with Flask and Python (17 hours of on demand video). If you are learning Python for the first time, you may need to consider doing some training in Python such as Python for Absolute Beginners: Learn Python in a Week! (8 hours of on demand video) as a prerequisitie before doing other courses.

With a grounding in Python and background knowledge of how it can be used with APIs you can look at aspects of the bot.
Building Twitter Bot With Python and Tweepy – Python Project (1 hour on demand video)
With a bit of basic Python knowledge, it takes very little time to learn and master each API separately. Learning how to automate sending information to Twitter can be learned in as little as 1 hour.

Adding other APIs to your Twitter bot
After learning how to automate passing information to Twitter, you will need to learn how to filter and extract live information from a flight API and pass that to Twitter as a post. aviationstack.com mentioned below has Python developer tutorials on how to filter and extract information.

Method 2 – hire a programmer
There are many websites you can find a programmer who can do work such as building a Twitter Bot that works with other APIs. Upwork is a great website to find and manage freelancers. If you are new to using Upwork, you might consider getting freelancers to bid to do the work for a fixed price rather than an hourly rate. That way you can cap what you spend, and you do not have to authorise the platform to release funds to the developer until you are satisfied with the work. We believe you can have an automated flight tracking Twitter bot built for as little as $240 and more advanced one for around $800, hosted from $5 a month.

A rough estimate of how long it would take a programmer to create an automated Twitter bot that tracks and shares flight information automatically to Twitter, would in our estimation would take a programmer between 3 and 5 hours per an API used in the bot depending on experience.

A very basic bot that just automates sharing text information from a flight API to the Twitter API could be produced in between 6 – 10 hours. Such a bot could be hosted on a remoted server, so you don’t have to leave your home computer on all the time running it. There are some very affordably monthly remote server solutions. For a python project pythonanywhere.com would host a solution for you from as little as $5 a month, and the Python application can be left in the cloud extracting flight information from the flight API and Tweeting it to Twitter 24/7.

A generous estimate of programming rates starting at $40 an hour, you could get a basic flight tracking Tweeting bot developed for between $240 to $400, and hosted from around $5 a month.

If you wanted your flight tweeting Twitter bot to be sharing maps / screenshots, the developer may need to use 1 or 2 more additional APIs, which would add another additional $240 to $400 to the cost, an advanced bot would in total cost you up to around $800.

Of course, some programmers will say such a bot will cost more, and others will offer to do it for less. Just keep in mind this is a project that most intermediate programmers can attempt, even a college kid did it ☺

Considering this flight tracking tech can be built at very little cost and very easily replicable, Elon Musk’s offer of $5,000 to take it down was more than generous.

What you need to tell your programmer to do to build your own flight tracking tweeting bot?

Step 1: You need to tell them the registration number of the flight that you are tracking

For example if it is Elon Musk’s plane you want your programmer to track you would have to tell them that they need to periodically check the flight API for movements of N628TS, or another registration number for different plane of your choosing.

Step 2: Subscribe to a flight tracking API to extract live flight data of plane(s) you are tracking

adsbexchange.com used by Sweeney is just one of many flight API providers, there are other advanced flight API providers who also have access to ADS-B live flight data including aviationstack.com which would have some basic Python guides.

Signup: https://aviationstack.com/product

Step 3 [optional]: Setting up API to share Map location of tracked flight

Setup a screenshot API screenshotlayer.com to coordinate with taking a screenshot of the coordinates of the plane on a map, depending on flight API service provider, you might pass the coordinates passed from the flight API into a Map API for the screenshot API to take the screenshot. Flight APIs have their own inbuilt geolocation APIs which may already be integrated with Map APIs that give visualisations of locations.

Signup: https://screenshotlayer.com/product

Step 4: Share the information to Twitter API

The longest part of the process can be getting a Twitter developer account setup. The process of getting a Twitter developer account and working API keys with reasonable call limits can take between a couple of days to a few weeks depending on how many other developers are submitting their app ideas to Twitter for approval.
Sometimes it is best to begin the application to Twitter as a first step. Your developer can begin creating a basic version of your bot as soon as you have Twitter App key and tokens. You will need to make an additional request to apply to Twitter for a reasonable amount of API calls to run your App.

Signup: https://developer.twitter.com/en/apply-for-access

How to get access to the Twitter API
Step one: Sign up for a developer account.
Step two: Save your App’s key and tokens and keep them secure.
Step three: Make your first request.
Step four [Optional] : Apply for additional access.

We hope this article was informative. Any idea however advanced it looks, really is not so difficult once you begin looking into what APIs are available online to help you do it.
Check out some more awesome APIs at APILayer.com

Related posts
API

10 Reasons Why You Shouldn't Ignore Email Check

APIAutomation

Fast-Track For Taking Control Of The Customer Journey Using UserStack

API

9 Signs You Need Help With IP Address Geolocation

APIFinancePython

How to Create Currency Conversion API Based Web Using Python Flask

Leave a Reply

Your email address will not be published.