Readit News logoReadit News
Posted by u/pvarghav 8 months ago
Show HN: API Parrot – Automatically Reverse Engineer HTTP APIsapiparrot.com/...
When automating business processes at work, I found it difficult and time-consuming to reverse engineer business systems' APIs. I often had to manually reverse engineer APIs using developer tools or settle for less optimal technologies such as Robotic Process Automation (RPA).

Often, the issue is that it can be hard to resolve all the cookies, access tokens, and other elements required to successfully execute the requests. Manually trying to resolve these dependencies using developer tools is especially challenging with multiple requests where data is stored in JavaScript objects or HTML elements.

To try to solve this issue, I built a tool called API Parrot that automatically identifies the data correlations between requests and builds a graphical representation of the flow to give users a better understanding. To streamline the process, I also included functionality to record requests, define your own inputs and outputs, and export the entire flow—or parts of it—as JavaScript code.

The application is Electron-based and currently compiled for Windows and Linux. Please try it out and give feedback!

Online Tutorial: A simple example of reverse engineering the USPS API is available at https://docs.apiparrot.com/docs/category/tutorial---reverse-...

brushfoot · 8 months ago
Impressive project. I was curious how it discovers data relationships and was going to check the repo, but it looks like there's no code, only issues and releases. Is that right?

Which leads me to...

- Is this closed source?

- Does it cost money?

- How does it discover data relationships?

pvarghav · 8 months ago
Thanks for your interest!

- Is this closed source?

Currently, the code is not open source, but I might open-source parts of it in the future.

- Does it cost money?

The software is free to use. If there is demand, I might create a "pro" version for businesses in the future. However, I intend to always have a free version available for individuals.

- How does it discover data relationships?

I've discussed how it discovers data relationships in the documentation here: https://docs.apiparrot.com/docs/tutorial-extras/exchange-mod....

In short, the tool breaks down the data in the requests and responses into smaller parts by identifying their formats. For example, `["foo", "bar"]` would be recognized as a JSON array and broken down into the elements `"foo"` and `"bar"`. By applying this method recursively, you build a tree-like structure of the data.

If an exact match is found between data in a response from a previous request and data in a subsequent request, a correlation is detected.

Please feel free to ask if you have any more questions!

bjt12345 · 8 months ago
If this can save me time at work, I'd be happy to throw some money at it.

My bosses OTOH...let's just say, there's no penalty within companies for pointy haired bosses not making decisions to purchase something like this and ignoring staff.

It's a false economy but I'm tired of it and just purchase what I can afford.

Dead Comment

skeptrune · 8 months ago
It's entertaining that Github has become such a common place to find information that even closed source projects put something up there
rynn · 8 months ago
How does it compare to mitmmitmproxy2swagger?

https://github.com/alufers/mitmproxy2swagger

faizshah · 8 months ago
This might be more useful than the OP. This thing lets you translate HAR to Swagger…

My usual process is Dev tools -> Copy as CURL -> delete unnecessary headers -> translates to requests in python (these days I just use ChatGPT) -> wrap in python sdk for managing auth etc.

The OP’s correlation features are really nice though.

1a527dd5 · 8 months ago
The first and immediate difference for me is the ability to recall the name. I can recall Postman/Insomina fine, and now for API Parrot. I'm never going to be able to recall mitmproxy2swagger.

Unfortunately, names matter.

itsafarqueue · 8 months ago
Thanks 1a527dd5.
yoavm · 8 months ago
As someone who uses mitmproxy and swagger quite often, I actually think the name isn't so bad. I haven't even looked at the readme but I already know what it does, how to run it and what output to expect.
SparkyMcUnicorn · 8 months ago
I often forget the name of things, sometimes even the big ones. GitHub search is one of the primary ways I rediscover them. "reverse-engineer API" returns mitmproxy2swagger as the third result, and this is how I found it last time I needed it.

It is a bit frustrating when a project on GitHub doesn't have good tags or searchable keywords, making it harder to find.

notcrazylol · 8 months ago
Probably a dumb question but if my web app uses graphql, how would I go about with the swagger generation?(since its just one endpoint)

Thank you for sharing this though, I was looking for a tool like this :)

alp1n3_eth · 8 months ago
Have you tried something like GraphQL playground before? https://github.com/graphql/graphql-playground

There's other tools out there that can generate similar docs or playgrounds, given you have a schema/spec of some type.

rat87 · 8 months ago
Why would you use swagger/openapi? My understanding is that graphql has its own schema system that's supposed to be returned by the server when the client requests it.

https://graphql.org/learn/schema/

setheron · 8 months ago
Very sad half the comments are asking for MacOS app. The rise of development on MacOS for server development when the final target is Linux will cause long term harm to the newer generation of engineers
gempir · 8 months ago
And the unreasonable hostility towards macOS will have zero affect because in the end the best product wins.

Did the rise of Windows cause long term harm to past generation of engineers? I doubt it since now Windows, which had a gigantic market share, still was forced to implement Linux "compatibility" for developers.

There are three popular operating systems for the modern developer and it's not unreasonable to ask for a build for all of them when presenting a project to a developer focused community.

sverhagen · 8 months ago
The rise of a MacOS sort of monoculture certainly affected those developers that were still on Windows. It drove me off of Windows, a system that I otherwise appreciated just fine. I never cared much for MacOS, though, so I went to Linux, but there I'm also constantly feeling the pain of so many developers being on MacOS, as there's so many incompatibilities between the two. So, in the end I guess I prefer things that run everywhere, which this Parrot thing may be in reach of, it being Electron? In that sense I guess I support the ask for a MacOS version. But boy, could the MacOS crowd just stop throwing their weight around?

Edit: Examples:

* Tools that are only available on MacOS (remember the days when tools were only available on Windows)

* I write a BASH script which then doesn't work for the MacOS coworkers

* Tools that are supposedly platform- independent have Linux-specific errors that get no love because their developers don't care about Linux

victorbjorklund · 8 months ago
Why? I mostly code on Mac and deploy on Linux (or FreeBSD). Never really encountered a situation where programming a web app on Mac has caused issues when deploying to the server.
UltraSane · 8 months ago
What about issues with CPU architecture?
criddell · 8 months ago
Or maybe some of the newer generation will take time to update Linux to be more competitive with macOS for developers. Could be a long term win for Linux fans.
Sardtok · 8 months ago
Linux is good for development, but Apple hardware is pretty damned nice.

Now if Framework laptops were available in Norway, I'd probably rather have that, even if they're not as powerful.

Also, depending on where you work, there might be restrictions in the choice of platform. Usually limited to Mac or Windows.

cdaringe · 8 months ago
Not sad at all! Mac has excellent hardware, excellent reliability, excellent day to day performance. Im not a fanboy, but it won for (IMHO) clear and obvious reasons. Of course folks want a mac app. No comment on the “harm” bit.
bearjaws · 8 months ago
It is always amazing to me people who will chastise people for using Macs.

It is by far the most robust hardware and 15 years later Windows laptops may finally be catching up.

My first programming job was LAMP so I had a Linux desktop and loved it. Later I got a new job that gave us laptops, but they were quite beefy.

I had a Dell laptop with an Nvidia GPU and an Intel iGPU... After updating my OS my gpu was the only way to use my laptop, which made the battery die in under an hour and of course it was much hotter.

I tried numerous driver installs, proprietary, open source, reinstall OS, different OS... Nothing got it working again on a newer version of the Linux kernel.

Went to the Apple Store bought a MBP and have never had an issue since. Not one dead laptop, in 10 years, I plug in my USB C dock and go.

2 years later, what happened to one of my coworkers? Same exact thing. He spent 3 days trying to fix it and basically had a workaround that crashed occasionally.

I get paid to produce working software not configure my OS, and people wonder why Macs are so popular?

forty · 8 months ago
I agree, people don't realize the value of not depending on a single company to do their work. We can see this problem even more with LLM code generators.
yoavmmn · 8 months ago
Nowadays everything runs on docker anyway
setheron · 8 months ago
You'd never see a Windows developer work in MacOS or a iOS developer work in Linux but Linux developers (server side) routinely work in MacOS

Unnecessary abstraction

Merad · 8 months ago
Really? In the modern .Net world (originally .Net Core) it's very common for devs to use Windows machines to write code whose CI pipelines and deployed environments are all Linux. I've seen a handful of issues with things like path separators and file system case sensitivity, but we're talking about 3 or 4 minor problems in 6-7 years that I've been using it.
neonsunset · 8 months ago
Hey, some of us have moved to Macs by now :)

(also yes, people keep asking "what about linux" and think it's bad when you say there is literally nothing extra to consider in 95% of situations, sigh)

chuckadams · 8 months ago
How about a real-world example of the harm you're clutching your pearls over?

Besides, most devs doing web development on Macs are also using Docker, which is always Linux.

dangoodmanUT · 8 months ago
conjecture?
rafram · 8 months ago
Most people scraping sites aren’t writing anything low-level enough to care about the particular flavor of Unix-like OS it runs on.
F7F7F7 · 8 months ago
I’d argue that there’s no correlation at all between the two.
255kb · 8 months ago
Nice project!

Just so you know, there is an app called Traffic Parrot (https://trafficparrot.com/). They operate on the same market, so they may not like the name you chose.

yawndex · 8 months ago
Any current plans for a macOS release?
pvarghav · 8 months ago
Yes, I plan to release a macOS version of API Parrot. Unfortunately, I currently don't own a Mac, and since building macOS applications requires one, this has delayed the release. I'm actively exploring solutions, such as accessing a Mac environment remotely or acquiring the necessary hardware.
rrr_oh_man · 8 months ago
That sounds like a gofundme situation :)
garysahota93 · 8 months ago
Have you looked into Mac Stadium? Maybe they can be of help!

https://www.macstadium.com/

eagleinparadise · 8 months ago
+1 for macos!
pvarghav · 8 months ago
The macOS version is now available for download at https://apiparrot.com/#download

Please note that since the app isn't code-signed yet, you'll need to remove the quarantine attribute to run it. I've updated the documentation with instructions on how to do this: https://docs.apiparrot.com/docs/getting-started/download-and...

Let me know if you have any questions or run into any issues!

MK2k · 8 months ago
Try a Hackintosh, e.g. as a virtual machine on your Windows or Linux host.
sumanyusharma · 8 months ago
How is this different from Integuru? They posted a few weeks back here: https://news.ycombinator.com/item?id=41983409
shawnshivdat · 8 months ago
^
martinkostov · 8 months ago
I'm curious too
sebmellen · 8 months ago
This is incredible. We’ve spent ages and ages figuring out the weird internals of certain legacy systems that we’ve ended up having to use bots or RPA to integrate with. If you can polish this into a true product, we would pay for it!

Any chance of a Mac version?

pvarghav · 8 months ago
Thanks! I'm glad you like the idea—it sounds like you've had the same struggles I've been through.

Good news: the Mac version is now available to download at https://apiparrot.com/#download.

Let me know if you have any feedback!

colesantiago · 8 months ago
This is the easy part.

One of the issues with these tools is that more and more websites now employ multiple aggressive CAPTCHAs, fingerprints, device check, etc, rendering tools like API Parrot almost useless.