MediaGuard API
The MediaGuard API lets you send pre-bid data to HUMAN and receive IVT predictions accordingly. This HTTP-based API mirrors the core features of our gRPC-based SDK.
The MediaGuard API includes two endpoints:
- The default
/lookup
endpoint expects individual details about a bid request (extracted from an OpenRTBBidRequest
object) in its request body. MediaGuard analyzes these details and returns an IVT prediction. - The
/health-check
endpoint checks the status of MediaGuard's servers.
The MediaGuard API requires request-level authentication using Basic auth. To authenticate a request, provide an Authorization
header with the value Basic base64(username:password)
.
For example, if your HUMAN Auth ID is whiteops
and your HUMAN Auth Key is secret
, your Authorization
header should be set to Basic d2hpdGVvcHM6c2VjcmV0
.
You can use curl to access the MediaGuard API. For example, the following command shows how to query the /ookup
endpoint using curl and basic HTTP authentication:
curl --location --request POST '/lookup' \
--header 'Authorization: Basic <base64(username:password)>' \
--header 'Content-Type: application/json' \
--header 'Content-Encoding: gzip' \
--header 'Accept-Encoding: gzip' \
--data-raw '{
"ip": {...},
"userAgent": {...},
"url": {...}
}'
Perform a lookup request
Sends details about a specific bid request to MediaGuard, then returns HUMAN's analysis of whether the bid request is a form of invalid traffic (IVT).
Content type
The /lookup
endpoint supports body encoding in both JSON and protobuf. You can use the Content-Type
header to specify which type you're using.
Authorizations:
header Parameters
Content-Type | string Example: application/json Specifies the body encoding for your lookup request; possible values are |
Request Body schema: application/json
ip required | string The IP address of the device where the ad impression (and HUMAN's detection tag) is intended to be delivered. This parameter expects the raw byte representation of the input address and accepts both IPv4 and IPv6 addresses. |
userAgent required | string The user agent of the user who drove the bid request. |
url required | string The full URL of the site of the bid request. Note that you must include either the |
referer | string The full URL of the page that referred the user to the site of the bid request. This parameter follows the same formatting as the This parameter is exclusive to Desktop Web and Mobile Web environments. If a bid request originated from one of these environments, you must include the |
appId | string The app bundle where the ad is intended to be delivered (for bid requests in Mobile App and CTV environments only). This parameter expects a valid string and should reflect OpenRTB bundle standards (i.e., Android bundles are package names, while iOS bundles are usually numerical IDs). Note that you must include either the |
userId | string A unique identifier that HUMAN uses to identify the user driving each bid request. For bid request in mobile environments, you should set this parameter's value to the device's iOS IDFA or Android AAID (when possible); for all other environments, you should generate a unique identifier that persists across all of that user's bid request until that user's cookies are cleared. |
impressionId | string A unique identifier that HUMAN uses to identify each bid request. You can set this parameter's value to the auction ID or impression ID for that bid request. This parameter is optional and helps us perform additional troubleshooting as needed. |
supplyChainObject | string A string-encoded representation of the bid request's OpenRTB |
inventoryPartnerDomain | string The domain of the authorized partner who owns the inventory that corresponds to the bid request. This value should match either the You should only include this parameter if the inventory is owned by an authorized partner (rather than the publisher themselves). |
required | object An object that contains additional information that HUMAN uses to categorize and sort bid request data. |
object An object that contains additional information to send to MediaGuard. |
Responses
Request samples
- Payload
{- "ip": "127.127.127.5",
- "userAgent": "Mozilla/5.0 (iPad; CPU OS 10_2 like Mac OS X)",
- "url": "example.com/full/url/detail.html",
- "referer": "sub.example.com/source",
- "appId": "553834731",
- "userId": "c3f927f4-3ef9-4b53-8887-d794c4daea82",
- "impressionId": "a67e10e8-df61-44ef-b3bc-9a600e23e538",
- "supplyChainObject": "1.0,1!exchange1.com,1234,1,bid-request-1,publisher,publisher.com",
- "inventoryPartnerDomain": "partnerdomain.com",
- "sortBy": {
- "supplierId": "12345",
- "publisherId": "787656",
- "mediaType": "2",
- "deviceType": "4"
}, - "metadata": {
- "example-key": "example value"
}
}
Response samples
- 200
{- "lookupId": "561356d9-b92f-4281-ba3a-7bc0448f066d",
- "ivt": true,
- "serverId": "test-vm-1",
- "ivtTaxonomy": [
- "AB-BOT",
- "FR-EMU_RUD"
]
}