Show HN: API Parrot – Automatically Reverse Engineer HTTP APIs
456 points| pvarghav | 1 year ago |apiparrot.com
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|1 year ago
Which leads me to...
- Is this closed source?
- Does it cost money?
- How does it discover data relationships?
pvarghav|1 year ago
- 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!
skeptrune|1 year ago
rynn|1 year ago
https://github.com/alufers/mitmproxy2swagger
faizshah|1 year ago
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|1 year ago
Unfortunately, names matter.
notcrazylol|1 year ago
Thank you for sharing this though, I was looking for a tool like this :)
setheron|1 year ago
gempir|1 year ago
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.
victorbjorklund|1 year ago
criddell|1 year ago
cdaringe|1 year ago
forty|1 year ago
yoavmmn|1 year ago
Merad|1 year ago
chuckadams|1 year ago
Besides, most devs doing web development on Macs are also using Docker, which is always Linux.
dangoodmanUT|1 year ago
rafram|1 year ago
255kb|1 year ago
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|1 year ago
pvarghav|1 year ago
pvarghav|1 year ago
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|1 year ago
sumanyusharma|1 year ago
shawnshivdat|1 year ago
martinkostov|1 year ago
sebmellen|1 year ago
Any chance of a Mac version?
pvarghav|1 year ago
Good news: the Mac version is now available to download at https://apiparrot.com/#download.
Let me know if you have any feedback!
colesantiago|1 year ago
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.
jknutson|1 year ago
Haven’t fully looked through the features/docs, so forgive me if my question is answered in there, but what does support look like for:
- Exporting to Swagger/OpenAPI Spec
- Exporting to generated SDK (I know some tools exist that can generate SDKs from OpenAPI/Swagger, so maybe some of these tools have licenses that are compatible with your product?)
- Support for URL path variables (e.g. `/users/{user_id}`)
- Support for URL query parameters (and filtering for common “noise” parameters, e.g. Google analytics)
- Support for non-JSON input/output (e.g. an endpoint that accepts multipart form data)
Awesome idea though. I’m definitely going to try this out. Beautiful UI and website too. I’m stoked to play around with this!
pvarghav|1 year ago
- Exporting to Swagger/OpenAPI Spec: Currently, exporting to Swagger/OpenAPI isn't supported, but it's on my to-do list to look into. Right now, JavaScript code is the only export format.
- Exporting to a Generated SDK: Same as above. I'm considering integrating tools that can generate SDKs from OpenAPI/Swagger specs, so this might be included in a future update.
- Support for URL Path Variables (e.g., `/users/{user_id}`): Yes, API Parrot supports URL path variables!
- Support for URL Query Parameters (and filtering out common "noise" parameters like Google Analytics): Yes, API Parrot supports URL query parameters, and there are measures in place to filter out the noise.
- Support for Non-JSON Input/Output (e.g., endpoints that accept multipart form data): There is support for non-JSON input/output formats, but multipart form data isn't supported at this time. You can find all the supported data types on this page: https://docs.apiparrot.com/docs/tutorial-extras/exchange-mod...
Thanks again for your support! I'm excited for you to try it out, and I'd love to hear your feedback after you've had a chance to play around with it.
speakspokespok|1 year ago
++ A self contained appImage is a good way to go, but where do you put it? A default install location should be added for those used to an `apt install`.
I went `sudo wget $URL -C /usr/local/bin/` and `chmod +x $appimage`. This worked fine until Collection creation when some internal state change smacked into my root owned file permissions. I `chmod 777` it and restarted the app, no more issue. It's my machine and I can chmod how I want but I think doc clarity would help those unfamiliar with appimage.
++ Renaming projects, collections, etc is cumbersome. For example, when clicking the 'New Project" pencil a change name window opens with several steps needed then to rename the project. That single click could combine opening the window, that window grabbing focus, with the cursor in a blank form window, followed by 'Enter'.
++ Ability to toggle showing the Properties column. On a 14" hi rez laptop, the screen is crowded. And resize Project width.
++ The default flow view size is too small.
I hope that's helpful. A small number of UI tweaks and it's already at "Don't F*** With It!" stage. The issues above are small and don't take away from how great and EXCITED I was going through the tutorial. I went through the entire docs and the tutorial and I think it's a fine program. Your layout of the DOM response is also really nice!
pvarghav|1 year ago
I really appreciate your detailed feedback on the UI and usability. I'll definitely take your suggestions into consideration and work on implementing them in future versions.
Thanks again for taking the time to share your thoughts!
davide_v|1 year ago
chompin|1 year ago
7357|1 year ago
pvarghav|1 year ago
ashenke|1 year ago
pvarghav|1 year ago
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!
YaBa|1 year ago
I've checked the tutorial, seems that I'm not missing any step, the software simple cannot capture anything if the request is made on the main page, seems to work fine with forms, buttons and "manual" actions.
I can DM you the website plus the expected request that is made, visible with any browser internal debugging tools.
teichman|1 year ago
yellow_lead|1 year ago
> API Parrot is the tool specifically designed to reverese engineer the HTTP APIs of any website.
pvarghav|1 year ago
It should now be fixed.
devops000|1 year ago
pvarghav|1 year ago
I've added a newsletter sign-up form at the bottom of the webpage: https://apiparrot.com/#newsletter
Feel free to subscribe to receive notifications when we release the MacOSX version.
toomuchtodo|1 year ago
spacecadet404|1 year ago
arshxyz|1 year ago
pvarghav|1 year ago
As for adblock-rs, I'm using it to detect and automatically disable requests related to ads and other unnecessary stuff. This helps cut down on noise and saves some time for developers.
1a527dd5|1 year ago
sidgarimella|1 year ago
Sytten|1 year ago
tveyben|1 year ago
remoquete|1 year ago
MK2k|1 year ago
gtirloni|1 year ago
pkkkzip|1 year ago
aren't there github libraries that do this already?
sumedh|1 year ago
which ones?
user3939382|1 year ago
sumedh|1 year ago
ozim|1 year ago
There is also bunch of JSON schema stuff nowadays.
But yeah for a lot of people schema of API contracts feels like too much work and too much hassle.
JSON serialization doesn’t throw errors for new properties quickly added on sending side and receiving side can ignore stuff - well as long as API semantics allow but that’s generally going to be a hassle always even with LLMs somehow autofixing your „schema”.
m00dy|1 year ago
pvarghav|1 year ago
moon82|1 year ago
pvarghav|1 year ago
Working on this side project has been both fun and rewarding. I've learned a lot throughout the process, which keeps me motivated even without immediate financial gain. I have plenty of ideas on how to improve the software in various ways. Some of these enhancements could become part of a "pro" version tailored for businesses. My long-term ambition is to turn this into a full-fledged product, which would enable me to dedicate more time to its development.
enricotal|1 year ago
victor106|1 year ago
TripleChecker|1 year ago
[deleted]
woleium|1 year ago
vhayda|1 year ago
tommiegannert|1 year ago