Show HN: Is Hormuz open yet? (ishormuzopenyet.com)

by anonfunction 209 comments 484 points
Read article View on HN

209 comments

[−] gloosx 36d ago
Hello OP, I think using an ai agent to fetch the JSON is a bit of an overkill

Here is a node.js script for you which will fetch the data and save it to the file:

  import fs from 'fs'
  import puppeteer from 'puppeteer-extra'
  import StealthPlugin from 'puppeteer-extra-plugin-stealth'
  puppeteer.use(StealthPlugin())

  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  async function fetchCoords(x, y, z = 8, station = 0) {
    await  page.goto(`https://www.marinetraffic.com/getData/get_data_json_4/z:${z}/X:${x}/Y:${y}/station:${station}`);

    const jsonRaw = await page.evaluate(() => document.body.innerText);

    const json = JSON.parse(jsonRaw)

    return json
  }

  const data8353 = await fetchCoords(83, 53)

  const data8453 = await fetchCoords(84, 53)

  const data8354 = await fetchCoords(83, 54)

  const data8454 = await fetchCoords(84, 54)

  const fullData = { ...data8353, ...data8453, ...data8354, ...data8454 }

  fs.writeFileSync('data.json', JSON.stringify(fullData, null, 2))

  console.log('done!')

  process.exit(0)

Just like this, no need to spend a cent on expensive APIs or tokens
[−] anonfunction 36d ago
Take your upvote, love the old school hn spirit.

Reminds me of when I was speaking at a conference back in the mid 2010's with a presentation titled "Join the dark side of APIs" or something akin to that, where I showed many of the newly popularized "single page apps (SPAs)" relied on undocumented and public APIs, often without any authorization. Immediately followed by a talk by a business type guy on API copyright or something or other.

[−] TomasBM 36d ago
If I had to pick one thing I like about software devs as a group, it's this: you find a problem, you solve it, you share the solution.
[−] ericmcer 36d ago
What is the AI agent doing in this interaction? This is a public API exposed to any browser...
[−] gloosx 36d ago
Well, not to every every browser, there is some cloudflare bs preventing simple curling and you actually need a stealth-mode puppeteer to go around it.
[−] Jeremy1026 37d ago
The data being ~4 days delayed does kind of make this less useful. It is a nice concept and cool to see the historical data though. Just think the domain and the large "NO" doesn't really fit with the lack of current data.
[−] anonfunction 37d ago
Totally agree, I put some text and tried to make it clear. My first intention was to find some live ship tracking API and see how many ships cross the strait, but they were all hundreds of dollars a month, and behind enterprise contact forms.
[−] baq 36d ago
You need to send an analyst there with binoculars, a box of cigars and $15k in cash to get realtime trustworthy data
[−] jojobas 36d ago
The strait is wider than horizon distance from reasonable heights. Also that's how you don't hear back from the analyst in many different ways.
[−] golem14 36d ago
Do these ships not use transponders? E.g., in the US you can use a SDR dongle and a RPI to read local updates. The straight isn't very wide.

Seems cheaper than the cigars and cash.

[−] dewey 36d ago
Transponders get turned off all the time, especially if you don't want to be targeted.
[−] golem14 36d ago
Are they though, in the straight ? I'm not sure it's such a great move, TBH:

Given that the baddies clearly can locate ships and see that there's no transponder, and come to the conclusion they need. "Hmm, it turned off transponders and is now moving toward the straight. It's a tanker, and not one of ours, or Russia's or China's. Let's bomb it!"

Also, pragmatically, you could look at the transponders suddenly not showing up anymore as a sign of attempt of passage, especially if they show up later on the other side.

But yes, that would no longer be very realtime.

[−] zorked 36d ago
The fleet serving Iran and Russia does not use transponders. It's a large fleet. Ships without transponders are just a fact of life in shipping.
[−] golem14 36d ago
Sure, but for the purpose of this discussion, those ships don't matter. What matters is what the ships NOT belonging to Iran's friends do.
[−] baq 35d ago
Technically all ships crossing the strait matter as their cargos end up being bought, sanctioned or not, Iran-friendly or not; they wouldn't have crossed otherwise. If we're talking about avoiding a global recession and worst case famine in some parts of the world, the oil and gas must start moving regardless of who is the shipowner.
[−] dewey 36d ago
Transponders are a voluntary system, see: https://en.wikipedia.org/wiki/Shadow_fleet
[−] numpad0 36d ago
or just a cubesat on a polar orbit with a Nikon Z9 inside
[−] Jeremy1026 37d ago
I've done some small scale ship tracking in the past, and yeah, anything beyond finding a specific ship while it is near the shore is stupid expensive.
[−] elSidCampeador 37d ago
I believe NASA / EU provide daily satellite imagery for free (which is of relatively high quality too). I wonder if there's a way to take that data, and training some kind of image recognition model that figures out "movement" or something to the same end? Would be cool to see
[−] anonfunction 37d ago
Funnily enough, I did find a few satellite sources at the beginning for the map background and noticed that all the ships seemed to be scrubbed from the image. It's an interesting idea, thanks for the comment!

The sources I used were:

- ESRI World Imagery[1] — free satellite tiles, high-res, but ships are stripped out from the imagery

- NASA GIBS - VIIRS[2] — near real-time daily satellite imagery from NASA, but resolution is ~375m so ships aren't visible anyway

- Mapbox Satellite[3] — high-res and looks great, but same deal — ships are scrubbed from the composited imagery

1. https://server.arcgisonline.com/ArcGIS/rest/services/World_I... 2. https://earthdata.nasa.gov/engage/open-data-services-softwar... 3. https://www.mapbox.com

[−] letcree 37d ago
Ai2 has vessel detection models for Sentinel-1 and Sentinel-2 (ESA) along with Landsat 8, Landsat 9, and VIIRS Nighttime Lights (NASA/USGS/NOAA):

- Sentinel-2 (10 m/pixel): https://github.com/allenai/rslearn_projects/blob/master/docs...

- Landsat (15-30 m/pixel): https://github.com/allenai/rslearn_projects/blob/master/docs...

- VIIRS Nighttime Lights: https://github.com/allenai/vessel-detection-viirs

I think you can see these vessel detections at https://app.skylight.earth/ ("Try out a limited version as a guest") but they seem to be delayed by 48 hours.

VIIRS is very low resolution but you can make out vessels with reasonable accuracy in the night-time images.

VIIRS covers most locations at least once per day, but the other sensors capture a given location only once per 5-10 days (although when combined, Sentinel-1/Sentinel-2/Landsat should provide close-to-daily coverage).

[−] colechristensen 37d ago
It turns out during a war having real time satellite imagery of shipping would be a poor choice.
[−] lukewarm707 36d ago
modifying the data is crazy

doesn't this sort of thing invalidate any kind of experiment because the instrument is no longer trustworthy

[−] tgsovlerkhgsel 36d ago
The ESA (Sentinel) data is somewhat delayed and has a low revisit period (AFAIK 6 days, although you might get lucky and get more due to overlap the further away from the equator you get) and low resolution. The Sentinel-1 data (SAR, synthetic aperture radar) might be somewhat useful for this as ships should be more easily identifiable on it and you don't have to worry about cloud cover, but probably still less useful than the delayed crossing data.

Ships don't move that quickly; AIS data refreshed once every few hours would probably be more than good enough.

[−] 000ooo000 36d ago
Read somewhere once that trading firms use satellite imagery of shipping to inform trading strategy. Don't know any more about it unfortunately but it sounds interesting.
[−] creatonez 36d ago
Public satellite imagery is heavily censored these days.
[−] barchar 36d ago
I think sentinel-1 has a SAR instrument, it's very easy to see ships with that data
[−] foresterre 37d ago
According to the Financial Times (1), the straight is "open" but Iran is extorting fees for passing ships.

> "Iran will demand that shipping companies pay tolls in cryptocurrency for oil tankers passing through the Strait of Hormuz, as it seeks to retain control over passage through the key waterway during the two-week ceasefire."

If they really will start doing so for all shipping, that would be odd since the straight itself is in Oman's territorial waters. Even so, the UNCLOS convention (2) requires free transit:

> Article 44 > Duties of States bordering straits > > States bordering straits shall not hamper transit passage and shall give appropriate publicity to any danger to navigation or overflight within or over the strait of which they have knowledge. There shall be no suspension of transit passage.

It would be unprecedented and unlawful, but I guess previous actions of Israel, the US and Iran have shown our world is beyond adhering to laws and agreements now.

(1) https://www.ft.com/content/02aefac4-ea62-48db-9326-c0da373b1... (2) United Nations Convention on Law of the Sea: https://www.un.org/depts/los/convention_agreements/texts/unc...

[−] alerter 37d ago
I work for a consultancy that does vessel tracking as one of its main products, and yeah it's expensive! afaik they have remote teams with sensors at key points and a bunch of people using AI/software to manage things like GPS spoofing. So it's all pretty guarded proprietary stuff.

Great bit of topical datavis here.

[−] namewithhe1d 37d ago
OP, DM me and I'll get you a persistent key for this data. Not from MarineTraffic
[−] bl4ckneon 37d ago
Very cool! I love one off intresting sites like this. Thanks for building it and talking a little bit about where the data comes from etc.

On the note of Ai agent getting the data for you, could you not just build a chrome extention that intercepts/read the api response and then uploads it to whatever ingest endpoint you have? You could probably just call their api end points they use on the page as well but not sure what protections they have so might be a bit tricky. A custom chrome extention could do it though if they have protections.

[−] spaghetdefects 37d ago
It was mentioned in this thread and quickly flagged, but Israel broke the ceasefire today by attacking civilians in Lebanon so Iran closed the straight. It was open prior to the ceasefire violation.

France's Macron actually just commented on this: https://x.com/EmmanuelMacron/status/2041990505760772551

[−] tomtomtom777 37d ago
This is a nice overview, but please remove the PolyMarket indicator. It is an obscene prediction mechanism as it creates horrible financial incentives to a war situation. Its degenerate effects have been featured here before. [1]

Let's not condone "measurements" that are effectively ways for people to gain money on important political decisions, affecting the lives of many people.

(1) https://news.ycombinator.com/item?id=47397822

[−] luxuryballs 37d ago
So apparently the reason they don’t just go for it is due to insurance. Because Iran technically isn’t suppose to just sink a civilian vessel, but the risk is there so the ships are ordered by the owner/stakeholder not to go due to the insurance coverage. Kind of interesting, they could technically call Iran’s bluff but it would mean, they violate the insurance contract and lose coverage? I’m just reading about this so probably not the full picture.
[−] ggm 37d ago
Maps can be so misleading. It looks like a dredging operation in Omani waters could alleviate this, if we'd started decades ago.

Moving to a topographic view, it becomes clear the neck of land at "two seas view" is narrow, but tall. It would literally be moving a mountain.

Panamax and suezmax boats are smaller than ULCC supertankers.

Ferdinand De Lesseps time has passed. This would be ruinously expensive. Better to negotiate with rational intent.

[−] truelson 37d ago
Really liked this. Made me laugh even if not intentionally funny.

Also, given how markets and news cycles are moved with words not actions these days, I really like this site.

There are still so many misaligned interests; this is a much tougher situation that may get some local stability for a period, but will likely return to chaos again.

[−] 4ndrewl 37d ago
You might want to rethink scraping marinetraffic before you get a call from their lawyers?

https://www.marinetraffic.com/en/p/terms

[−] dzogchen 36d ago
If this is using OpenStreetMap data, you should add attribution.
[−] 1970-01-01 35d ago
I speculated over a month ago that the only way to get the oil flowing again is to build a trucking road thru the desert. Ask China to help in exchange for cheap oil. If they start now, they could have a rough path by end of the month. Once the road is built, then you lay new pipeline. Say 3-4 years to do everything. Once Hormuz is bypassed, Iran has lost all leverage.
[−] spwa4 36d ago
Obviously the situation has significantly improved since then, your website is given outdated information.

https://www.vesselfinder.com/?p=OMKHS001 (click on map, zoom out). At this moment ~18 ships transiting. Not sure what the normal capacity is, and I think it's probably a bit more than this ... but it's at least mostly open.

[−] mohavinash 36d ago
That's really cool. I tried to blog about it in the early days of the war and tried to show it in realtime as well. As you discovered, it's really expensive to get ship tracking APIs. So I also did something similar, where I took the JSON from Marine Traffic and mapped it onto a Mapbox map. I did a very rudimentary-ish job — I think what you created is much more refined.
[−] frogperson 37d ago
https://warescalation.com/ is also a good source of info.
[−] fraywing 37d ago
Very cool, thanks for sharing!

What's the threshold function? Do you have graduating No --> Partially --> Mostly --> Open?

Also what's the update cadence?

[−] insane_dreamer 35d ago
This site has a lot of detailed data -- not sure what their sources are: https://insights.windward.ai

Number of ship crossings is definitely trending upward as of today.

[−] stavros 37d ago
I'm not really very up to speed on this, can someone explain how the strait is actually closed? Are the Iranians threatening to sink any ships that pass by, or what? How come any ships don't turn their transponders off and try to make a run for it?
[−] goodluckchuck 37d ago
I think there’s difference between A) whether ships are traversing the straight, and B) whether the straight is open / closed / could be traversed.

It’s very well possible that the straight is safe, but the vessels are unnecessarily cautious.

[−] xg15 36d ago
I like how this already includes the Polymarket estimate. Maybe there should be another category "new accounts on Polymarket that bet some suspiciously high amounts on those specific dates"...
[−] MiSeRyDeee 37d ago
This will be inherently inaccurate because data was based on public AIS signal, but ships are turning off their AIS to avoid detection.

> In an attempt to evade detection, many ships appear to be deliberately switching off their tracking system - known as AIS (Automatic Identification System). https://www.bbc.com/news/articles/c4geg0eeyjeo

[−] insane_dreamer 37d ago
Very cool. I agree with some others that the YES/NO is confusing since we actually don't know due to the lag.

And wtf is a _fishing_ ship from Panama doing in the middle of the straight?

[−] dogscatstrees 36d ago
I don't understand why ships can't just run on Oman's side of the strait, isn't there a dash-line down the middle for territorial waters integrity?
[−] gagzilla 36d ago
Very cool! Thanks for sharing.

There is also this one- https://hormuzstraitmonitor.com/

[−] iqbalabd 36d ago
Is it also possible to show similar movements for ships in the Red Sea, and make the types of ships colour coded?
[−] dr_robert 37d ago
What did you use for the map ? Mapbox ??
[−] seattle_spring 37d ago
Cool! Heads up, you're probably running afoul of some TOS by hiding the map data attributions.
[−] ainiriand 36d ago
Open to whom? AFAIK some nationalities can cross freely.
[−] anonfunction 37d ago
Another funny thing about this was this morning I checked if the domain isthestraitofhormuzopenyet.com was available and it was, and by the time I made the site locally, put it on vercel I went to buy the domain to point DNS to it someone had bought it! I renamed it to the current site url / repo which i think might be a little nicer to type, but crazy that we had same idea on apparently the same day. I was also just telling a friend about simultaneous invention aka multiple discover[1] a few days ago, so another case of the Baader-Meinhof phenomenon[2]!

1. https://en.wikipedia.org/wiki/Multiple_discovery

2. https://en.wikipedia.org/wiki/Frequency_illusion

[−] amusingimpala75 37d ago
Missed opportunity for “arewehormuzyet.com”
[−] ananandreas 36d ago
May be possible to improve the delay by reviewing ship geolocation data. Those are open to public and there is probably many apis for it
[−] SomaticPirate 35d ago
This website is down now for me
[−] einpoklum 37d ago
Iran (and various news sources) have claimed that the straights are not now, and in fact never have been, closed - provided the relevant ship was not involved/linked to the attacks on Iran, and that it coordinated with Iranian authorities.

So, it could be that:

* Iran is lying and that has not actually been an option.

* A lot of the ships which would otherwise have transitioned are involved with the war somehow.

* The relevant parties have decided not to coordinate transitions with Iran, for various reasons

* The data displayed at the link is partial for some reason.

[−] BillionSatsPage 34d ago
preditction market section is a great touch, OP
[−] davidguetta 36d ago
4 day delay kinda kills the point of the map no?
[−] blobbers 37d ago
IRGC targeting systems have entered the chat.
[−] saltynews 36d ago
[dead]
[−] sidraarifali 36d ago
[dead]
[−] cramsession 37d ago
[flagged]
[−] LAC-Tech 37d ago
It doesn't matter - Israel was able to ethnically cleanse and occupy large parts of Southern Lebanon, without undue Iranian interference. Mission accomplished for MIGA.

The "Israel First" administration of the US will happily trade Iran's permanent control of an international waterway for the expansion of Israel.