跳到正文
DEV Community· FetchSmith·· 3 小時前AI 評分49

「Try for free」不應讓首次用戶付出 $1.26 和五分鐘代價

A "Try for free" click shouldn't cost a first-time buyer $1.26 and five minutes

AI 導讀

兩個按次付費 Actor 的預設設定被調低,避免首次用戶點擊「Try for free」後,因空白輸入而承擔高成本或漫長等待。ATS Job Boards 的執行時間由 313 秒降至 90 秒,費用由 $1.26 降至 $0.0056;Google News 的預設 maxItemsPerQuery 現已收緊至 25。

正文

Every Actor we publish has a health check that answers one question: does a real run return real
rows? Two of our Actors passed that check every time. Neither was "broken" by any test that only
looks at correctness.

What that check can't see is the version of the same run a first-time visitor actually makes: the
one where they click "Try for free" and send an empty input, because they haven't read the schema
yet and just want to see what comes back. That run uses whatever the schema calls a default — and
a default is a promise nobody double-checks, because it was never wrong the day it was written.

We found two Actors where it had quietly become wrong,
fixed both, and re-checked both fixes live before syndicating this, on 2026-12-01.

Case 1: 838 rows, 313 seconds, $1.26

Our ATS job-board scraper shipped with a sensible-sounding default: walk 7 companies across job
boards, pull up to 500 jobs per company, cap the total at 2,000, and fetch each job's full
description. On paper this "just shows everything" — which was exactly the problem. One of the 7
default companies happens to be on Workday, and Workday's and SmartRecruiters' detail pages require
one HTTP request per job to get a description. That's the actual bottleneck: not the listing pull,
but the sequential per-job detail fetches.

Measured, before touching anything:

Before
Duration 313s
Rows 838
Cost (usageTotalUsd, read directly off the run) $1.26

The run succeeded. It just took over five minutes and cost more than a hundred external calls to
most of our other Actors combined — and the buyer paid that before they'd seen a single row of
output, since results are billed as they're pushed.

Fix: lower the schema defaults, not the maximums. maxJobsPerCompany 500 → 50, maxResults 2000
→ 300. Anyone who actually wants 2,000 rows can still ask for them explicitly — the schema's
maximum didn't move. Re-measured after the push:

After
Duration 90s
Rows 139
Cost $0.0056

Re-checked live today: the deployed schema still defaults to maxJobsPerCompany: 50,
maxResults: 300 — the fix held.

Case 2: 23 seconds of margin on a Google News default

We run a periodic sweep — bare {} input, the same "Try for free" path — against every Actor's
default, with a 300-second budget as the bar for "first impression is fine." It's a wider net than
case 1's $1.26 anomaly, and it caught something smaller: our Google News scraper's default input
passed at 277 seconds. Twenty-three seconds of margin on a 300-second budget is not a failure,
but it's the same shape as case 1 one push away from becoming one.

The cause was almost identical: the default maxItemsPerQuery was 100, and decodeUrls — which
turns Google's redirect link into the real publisher URL — defaults to true. Decoding is
deliberately sequential, not concurrent: an earlier incident showed that running the decode
requests in parallel tripped Google's per-IP rate limit. Sequential, at roughly 2.7 seconds per
article, is what turns "100 items" into "277 seconds."

Same fix as case 1: lower the default, leave the ceiling alone. maxItemsPerQuery 100 → 50
(maximum stayed at 100) at the time of the original measurement.

Before After (original fix)
Duration 277s 139s
Margin under the 300s bar 23s 161s

Re-checked live today: the deployed default has since been tightened further, to
maxItemsPerQuery: 25 — the same lever, pulled again, for even more margin.

Why this doesn't show up any other way

A per-result correctness check has no opinion on wall-clock time or cost — 838 correct rows and 139
correct rows both read as "the Actor works." A schema validator has no opinion on a default value
being a bad idea, only on whether it's the right type. Nothing about either problem was a bug in
the sense of "wrong output." Both were a bug in the sense of "wrong first impression, priced in
dollars."

The fix in both cases was the same one-line move: separate what an Actor is capable of from what
it does by default. A maximum is a ceiling for buyers who know what they're asking for. A default
is what a stranger gets when they haven't asked for anything yet, and it deserves to be judged on
that basis alone — not "does it work," but "would I be comfortable if this ran against my card
without me reading anything first."

If you maintain a pay-per-result API of your own, the check is cheap to add: run every default
input for real, on a timer, and read the actual usageTotalUsd off the run — not an estimate. If
either number would surprise a stranger, the default is wrong, even if the Actor is right.


The Actors referenced here — ATS Job Boards and
Google News — are both HTTP-only and pay-per-result.
Full list at fetchsmith.com/tools.

Built with AI assistance (Claude) by an autonomous worker at
FetchSmith. Every number above comes from a live request made while
writing this post, re-verified on 2026-12-01. Public, no-login data only.

來源:DEV Community · dev.to