Every time someone pastes a link into my downloader, something expensive could happen. A resolve call costs real quota with the provider, and on a free RapidAPI tier that quota is the whole budget for the month. So the download never starts on paste. It waits for a tap.
That was not the first version. The first version resolved the moment the paste event fired, because it felt clever and fast. Paste a TikTok link, watch the quality list appear like magic. It worked beautifully in my own testing, because I only ever pasted real links I meant to download.
Real visitors paste differently. They paste a link, realise it is the wrong one, paste again. They paste a link to check the page layout, then close the tab. They paste half a link by accident, then the rest. They paste a link from a platform I do not support, just to see what happens. Every one of those pastes was a resolve call in the first version, and every resolve call spent quota I had already paid for in the only currency that matters on a free tier: requests.
A paste is not consent. That is the whole principle, really. Pasting a link into a box says "here is a link". It does not say "spend one of your limited API calls on this, right now, without asking". The tap on the download button is the moment the visitor says they actually want the file. Until then, nothing leaves the browser.
There is a second reason, and it is about the visitor rather than my quota. When the resolve runs on paste, the visitor has no chance to check anything. The wrong link gets resolved, the quality list flashes up, and by the time they notice the mistake the call is already spent. With a button in the way, they can read the link back, fix a typo, and only then commit. The delay is about a second of their time, and it saves them the confusion of a result they never asked for.
The third reason is the one I did not expect: accidental pastes. On a phone, a long press in the wrong box, a clipboard full of something copied hours ago, a stray tap on "paste" in the share sheet. Mobile browsers make pasting very easy, which means they also make accidental pasting very easy. If every paste fired a network call, a pocketful of accidents would look like a traffic spike in my quota dashboard.
So the flow is deliberately boring. Paste the link. Nothing happens. Read it. Tap download. Then — and only then — the server calls the provider, resolves the video, and shows the quality options. The button is the only trigger, and it is a plain button, not a form submit that a stray Enter key could fire.
This costs me nothing in conversion that I can measure. People who want the video tap the button; people who do not want it never did, and I would rather not spend quota learning that. The people who paste and leave were never going to download anyway — they were testing, or they pasted the wrong thing, or they changed their mind. Letting them leave for free is the cheapest possible outcome.
There is a broader lesson here for anyone building a tool on a metered API: make the expensive action explicit. A paste event, a page load, an auto-suggest — none of these are the user saying "do the expensive thing". The moment you treat an implicit signal as a command, you pay for every false positive. A button costs one tap and buys you the certainty that the request was wanted.
I run this on ramrom.io, a small video downloader I built in plain PHP on shared hosting, and the rule has held up for months: no auto-download, no auto-resolve, no surprises. The quota lasts longer, the failure log is cleaner, and the visitors who do tap the button get exactly what they asked for.
Top comments (1)
The point that you only ever pasted real links in your own testing is the part that stuck with me. Real visitors paste wrong links, half links, then paste again, and every one of those would have cost a resolve call. Keeping the button as the only trigger sounds like the right trade on a free tier.