> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pixalate.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pixalate.com/_mcp/server.

# Get fraud probability for an IP, device, or agent

GET https://fraud-api.pixalate.com/api/v2/fraud

Retrieve probability of fraud for a specific IP, Device, or Agent.
The Fraud Blocking API returns a probability (risk score) 0.01 to 1.0 representing
the likelihood a given value is related to malicious or compromised devices.
This risk scoring is calculated by Pixalate's proprietary machine-learning algorithm and
allows clients to set their own blocking thresholds based on the quality and scale of their supply inventory.
The following is a general guideline for setting fraud blocking thresholds:
- Probability equal to 1.0, for filtering out only the worst offender for blocking (deterministic).
- Probability is greater than or equal to 0.90 for filtering out users that are fraudulent beyond a reasonable doubt.
- Probability between 0.75 (inclusive) and 0.90 (exclusive) to filter out users associated with clear and convincing evidence that they are fraudulent.
- Probability between 0.5 (inclusive) and 0.75 (exclusive) to filter out users that it is more likely than not that they are fraudulent (also known as preponderance of the evidence standard).

Pixalate does not recommend blocking any probabilities less than 0.5.
When making adjustments to the probability threshold, Pixalate highly recommends regular checks and balances against
impression delivery as lowering the probabilistic threshold can potentially impact the impression count.

Zero or more of the following parameters may be provided. If more than one parameter is specified,
the probability returned is determined by assessing risk based on the combination of each parameter's individual risk probability.

**Not specifying an IP, Device, or Agent will return the metadata for fraud, including the user's current quota.  See alternate response schema below.**


Reference: https://docs.pixalate.com/api-reference/fraud-v2/get-fraud

## Authentication

- `x-api-key` header (required) — Authentication and authorization are achieved by supplying your Pixalate provided API key in the request's header. An API key may be obtained by signing up for an account on the [Pixalate developer website](https://developer.pixalate.com).

## Request

### Query parameters

- `pretty` (boolean, optional) — If true, return pretty JSON. Default is false.
- `ip` (string, optional) — The internet protocol address.
- `deviceId` (string, optional) — An ID that characterizes a mobile device. Various types are acceptable, including but not limited to the following: - **ADID** (Android): Google advertising ID, 36 characters (e.g., FF67345D-BF11-7823-1111-FFED421776FC) - **IDFA** (iOS): Apple advertising ID, 36 characters (e.g., A217D9FC-C1BE-4BEF-94CD-1EE82147C1AA) - **IDFV** (iOS): Apple's Identifier for Vendor, 36 characters (e.g., B927E7D7-63A7-4D7D-BF11-34D62A6C6E0B) - **MD5** (Multiple): The MD5 hash of a hardware device identifier (e.g., MAC address, IMEI, or advertising ID), 32 characters (e.g., d9527b5207097c5770ca448322489426) - **SHA1** (Multiple): The SHA-1 hash of a hardware device identifier (e.g., MAC address, IMEI, or advertising ID), 40 characters (e.g., 2971074629cc8f33146c5eb08b39f157da5ce356) - **WAID** (Windows): Windows advertising ID, 36 characters (e.g., 97615775-57b5-4300-90b4-ba0c22b60e34) - **RIDA** (Roku OS): Roku's privacy-friendly device ID, 36 characters (e.g., 331319d2-4cc2-51ac-de21-aa62f1e143c1) - **MSAI** (Xbox): Advertising ID for Microsoft's Xbox, 36 characters (e.g., bc23c3de-5d32-4d0c-de3a-94ce878a0379) - **GAID** (Android): Google's Advertising ID, 36 characters (e.g., AE63F1D9-0F3A-4B7A-891D-5E23F12C9B1A)
- `userAgent` (string, optional) — The browser or device supplied agent string.

## Response

### 200

OK

- `Fraud_getFraud_Response_200`

## Errors

### 400 Bad Request Error

Bad Request - Invalid parameters in request.

- `any`

### 401 Unauthorized Error

Unauthorized - Invalid API Key.

- `any`

### 403 Forbidden Error

Forbidden - Rate plan expired or quota has been exhausted.

- `any`

### 500 Server Error

Server Error - The API experienced an internal error. Contact support.

- `any`

## Types

### FraudInfo

Fraud information

- `probability` (double, optional) — The probability of fraud (0.1 through 1.0). 0.0 indicates unknown.

### Metadata

Fraud metadata information.

- `database` (MetadataDatabase, optional) — The Fraud database state information.
- `quota` (MetadataQuota, optional) — Quota state information.

### MetadataDatabase

The Fraud database state information.

- `lastUpdated` (date, optional) — The date when the Fraud database was last updated. The date format is *YYYY-MM-DD*.

### MetadataQuota

Quota state information.

- `available` (integer, optional) — The amount of quota available for use.
- `used` (integer, optional) — The amount of quota used.
- `expiry` (date, optional) — The datetime when the quota will be refreshed back to the limit. The datetime format is *YYYY-MM-DDTHH:MM:SS.SSSZ*.
- `limit` (integer, optional) — The amount of quota to be made available for use when the quota is refreshed.
- `interval` (integer, optional) — The number of time units used in calculating the quota refresh datetime.
- `timeUnit` (enum, optional) — The time unit used in calculating the quota refresh datetime.
  - Allowed values: `minute`, `hour`, `day`, `week`, `month`

## Examples

**Response**

```json
{
  "probability": 0.6
}
```

**SDK Code**

```python
import requests

url = "https://fraud-api.pixalate.com/api/v2/fraud"

querystring = {"deviceId":"6757809f5e6d66f4e40fb9fd88c05139","ip":"101.179.108.187","userAgent":"Bot Googlebot/2.1 (iPod; N; RISC OS 2.4.35; IBM360; rv1.3.1) Alligator/20080524 Jungledog/3.0"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://fraud-api.pixalate.com/api/v2/fraud?deviceId=6757809f5e6d66f4e40fb9fd88c05139&ip=101.179.108.187&userAgent=Bot+Googlebot%2F2.1+%28iPod%3B+N%3B+RISC+OS+2.4.35%3B+IBM360%3B+rv1.3.1%29+Alligator%2F20080524+Jungledog%2F3.0")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```