Building a Node.js Tool to Monitor Dingdong Grocery Delivery Slots and Push Notifications via Bark
This article describes how to capture Dingdong's delivery slot API using a mobile packet‑capture tool, set up a Node.js project that polls the API, parse the response, and send iOS notifications through the Bark service, enabling semi‑automatic grocery ordering.
Introduction
While staying at home in Shanghai, the author struggled to secure grocery delivery slots on Dingdong and decided to write a small program that monitors the dynamic delivery‑time API and alerts when slots become available.
Obtaining Dingdong API
The only required endpoint is the multi‑reserve‑time API. Because the iPhone app encrypts HTTPS traffic, the author used the Stream proxy (as a replacement for Fiddler) to capture requests, first enabling HTTPS decryption by installing the CA certificate. The Dingdong mini‑program, not the main app, contains the target domain maicai.api.ddxq.mobi . After capturing, the URL https://maicai.api.ddxq.mobi/order/getMultiReserveTime was extracted and verified with Postman, then converted to a Node.js request format.
Setting up the Node Project
A new Git repository was created and the code run under Node. The console output initially appeared garbled due to the Accept-Encoding: 'gzip, deflate, br' header, which caused compressed responses; removing this header fixed the issue. A polling function was then written to query the API at regular intervals, parse the JSON response, and detect when a delivery window is free.
Message Push
When a free slot is detected, the script sends a push notification to the author’s iPhone using Bark, an open‑source iOS notification tool. After installing the Bark app, a unique BarkId is generated; the script triggers notifications by issuing HTTP GET/POST requests to Bark’s endpoint.
Result Showcase
Images show the terminal output when a slot is found and the corresponding Bark notification on the phone.
Conclusion
The author hopes this lightweight tool helps others obtain groceries more easily, warns against commercial misuse, and provides the source code on GitHub for further exploration.
Source code: https://github.com/mingjiezhou/dingdong-tools
Rare Earth Juejin Tech Community
Juejin, a tech community that helps developers grow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.