Pre-Bid API

Pre-Bid Fraud Filter

Real-time invalid-traffic filtering at the RTB auction level — before the bid. Integrate MediaSafe into your DSP to stop buying fraudulent impressions before money is spent.

<2msscoring latency
O(1)in-memory block-list lookup
GIVTdatacenter · bots · known fraud IPs

How it works

For every incoming bid request, your DSP calls the MediaSafe pre-bid endpoint with the request's IP, User-Agent and your site key. MediaSafe returns an allow / block decision in under 2 milliseconds. On block, the DSP skips the bid — the fraudulent impression is never purchased.

Scoring is fully stateless and in-memory: no database round-trip in the hot path. The block-list (IPs caught across clicks and impressions) is held in memory and refreshed every 60 seconds.

Integration in three steps

Step 1 — call the endpoint for every bid request

Your DSP sends each auction request to:

POST https://ingest.mediasafe.cc/prebid
Content-Type: application/json

{"site":"as_YOUR_KEY","ip":"203.0.113.45","ua":"Mozilla/5.0 ..."}

Or as a standard OpenRTB bid request — the endpoint reads device.ip, device.ua and the key from ext.mediasafe_key:

{"device":{"ip":"203.0.113.45","ua":"Mozilla/5.0 ..."},
 "ext":{"mediasafe_key":"as_YOUR_KEY"}}

Step 2 — read the decision from the response

The response arrives in under 2ms:

{"decision":"block","verdict":"givt","score":100,"reasons":["datacenter"],"geo":"DE"}

If decision is block, do not bid on this impression (fraud: datacenter, bot, or a known fraud IP). If allow, take part in the auction as usual.

Step 3 — timeout and fail-open

Set a short timeout (5–10ms). If MediaSafe does not respond in time, treat it as allow — so a filter hiccup never breaks your buying.

Response fields

FieldMeaning
decisionblock / allow — the action your DSP should take
verdictgivt (invalid) or clean, per IAB terminology
score0–100 fraud score
reasonssignals that fired: datacenter, known_bot_ua, headless_ua, known_fraud_ip
geoISO country code from IP
msinternal scoring time in milliseconds

What it detects

The pre-bid filter runs deterministic GIVT (General Invalid Traffic) checks — signals evaluated instantly from the request alone:

Datacenter / hosting IPs — impressions from server infrastructure are not humans.
Known bots & crawlers — Googlebot, headless browsers, automation tools by User-Agent.
Known fraud IPs — addresses previously caught committing click or impression fraud, held in the live block-list.

More sophisticated (SIVT) analysis — velocity, cross-visit patterns — runs asynchronously on the impression stream and continuously feeds new IPs into the block-list the pre-bid filter uses.

Examples

Clean traffic → allow

curl -X POST https://ingest.mediasafe.cc/prebid \
  -H "Content-Type: application/json" \
  -d '{"site":"as_your_key","ip":"203.0.113.45","ua":"Mozilla/5.0 (Windows NT 10.0) Chrome/122"}'

{"decision":"allow","verdict":"clean","score":0,"reasons":[]}

Datacenter IP → block

curl -X POST https://ingest.mediasafe.cc/prebid \
  -H "Content-Type: application/json" \
  -d '{"site":"as_your_key","ip":"5.9.100.50","ua":"Mozilla/5.0 Chrome/122"}'

{"decision":"block","verdict":"givt","score":100,"reasons":["datacenter"]}

Getting started

Getting a site key and onboarding for pre-bid integration is done together with our team — reach us at support@mediasafe.cc.