SERP·to·Spend
How it works

Every verdict is grounded, and says how

Ask a chat model whether an ad will pass and it answers from memory. Sometimes it names a policy that does not exist. SERP-to-Spend gives the model the actual rules, each one cited, and makes it name the authority behind every finding. When it writes ads, it also works from live Google results.

A · TYPICAL AI CHECKAd copy"$5,000 a month, guaranteed""is this ok?"Modelmemory onlyfree textVerdict"Violates the Meta Income Claims Policy"✕ no policy by that name exists✕ no source · no sign it was guessedB · SERP-TO-SPENDKnowledge registryFTC · FDA · Meta · Google · TikToksystem prompt: cited rulesAd copy"$5,000 a month, guaranteed"+ platformModelsame modelJSON schemaVerdictphraselevelstandardsafe_rewrite"$5,000 a month, guaranteed"highFTC Act § 5 · substantiationdrops the figure and guarantee, keeps the hook
The model, the ad and the question are the same in both rows. Checking an ad adds two things: cited rules in the system prompt and a fixed schema on the way out. Together they turn a confident guess into a verdict that names a real authority. Generating ads adds a third: live market context (below).

Inside the pipeline

Checking an ad uses the rules only: your ad is the input, judged against cited policy. When you generate ads, the model also gets market context from one source, chosen by what you enter: a competitor URL is fetched, and a keyword uses live Google results through Gemini (or SerpApi where Gemini isn’t set up). With search turned off, the run is labelled as not grounded instead of passing as researched. If the chosen source fails, the run stops with an error.

The rules come from a curated set of FTC, FDA, Meta, Google and TikTok modules. Every rule cites a statute, a CFR section, or the platform’s published policy, checked against the primary source. The model must answer in fixed fields, so the authority it names is always visible and checkable.

The Generate ads pipeline
Market grounding sourceinput →
Input: a keyword or a competitor URL, plus the target platform (Meta, Google or TikTok).Inputkeyword or URL + platformMarket grounding: one source per run, chosen by your input and the site's configuration. If that source fails, the run fails; it does not fall back to the next one.MARKET GROUNDINGlib/serp.tsURL input: the page is fetched through an SSRF guard (public IPs only, DNS pinned, at most 5 redirects) and stripped to text.1 · Fetch the pageyou enter a URL · SSRF-guarded fetchKeyword input with a Google Cloud project: Gemini's Google Search grounding returns live results for the query.2 · Gemini Google Searchkeyword · live results via Vertex AIKeyword input when Gemini search is not configured but a SerpApi key is: organic Google results from SerpApi.3 · SerpApi organic resultskeyword · used when Gemini isn't set upNo search available, or search turned off: the model is told its angles are NOT grounded in live results, and the run is labelled 'none'.4 · No groundingsearch off or not set up · labelledPLATFORM_KNOWLEDGE: curated policy modules, each source with a citation and URL verified against the primary source.COMPLIANCE GROUNDINGlib/knowledge/FTC, 11 sources: FTC Act § 5 (15 U.S.C. § 45(a)), the Deception and Substantiation policy statements, Endorsement Guides 16 C.F.R. §§ 255.1, 255.2(b), 255.5, the 2023 revision, the Business Opportunity Rule (Part 437), and the Health Products guidance.FTC · FTC Act § 5, 16 CFR 25511 srcFDA, 6 sources: 21 U.S.C. §§ 321(g)(1)(B), 355(a), 331(a), 352(a), 343(r)(6) and 21 C.F.R. § 101.93. Applied only to disease claims.FDA · 21 U.S.C. § 321(g)6 srcMeta, 3 sources: Advertising Standards on Personal Attributes; Fraud, Scams and Deceptive Practices; Health and Wellness.Meta · Advertising Standards3 srcGoogle, 4 sources: Ads policies on Misrepresentation, Editorial, Healthcare and medicines, and Financial products and services.Google · Ads Policies4 srcTikTok, 1 source: Advertising Policies, Misleading and False Content.TikTok · Advertising Policies1 srcPrompt: market context fills the user prompt; cited policy fills the system prompt.Promptuser: grounding blocksystem: cited policyModel: Gemini on Vertex AI through runStructured(), which forces a JSON schema; the output is then sanitized.ModelGemini on VertexrunStructured() · JSON schema locked→ sanitizeVerdict: the flagged phrase, a risk level, the authority by its published name, a safe rewrite, and the context-source label.Verdictgrounded · searchphrase"$5,000 a month, guaranteed"levelhighstandardFTC Act § 5 · substantiation+ safe_rewrite

This is the Generate ads flow. Pick a source to see the path a run takes; hover any part for detail. Each run uses one market source, chosen by what you enter and how the site is set up; if it fails, the run stops with an error rather than quietly continuing without it. Checking an ad uses the compliance lane only: your ad is the input.

SERP·to·Spend
Check an ad and generate ads, free with a quick sign-in. Pro is coming: saved reviews and bulk checks.