{
  "openapi": "3.0.1",
  "info": {
    "title": "IP Geolocation and Fraud Score API - MaxMind GeoIP and minFraud",
    "description": "IP geolocation and fraud scoring from the MaxMind GeoIP and minFraud web services: country, city, postal code, coordinates, ASN, ISP, VPN, proxy and Tor flags, IP risk, plus minFraud transaction risk scores with email, card and address checks. Bring your own key.",
    "version": "0.1",
    "x-build-id": "QI44h5yqbFqlMZPP0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~ip-geolocation-fraud-score-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-ip-geolocation-fraud-score-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~ip-geolocation-fraud-score-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-ip-geolocation-fraud-score-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~ip-geolocation-fraud-score-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-ip-geolocation-fraud-score-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "geoipCountry",
              "geoipCity",
              "geoipInsights",
              "minfraudScore",
              "minfraudInsights",
              "minfraudFactors"
            ],
            "type": "string",
            "description": "GeoIP Country returns the country, continent and registered country of each IP. GeoIP City Plus adds region, city, postal code, coordinates with accuracy radius, time zone, ASN, ISP, organization, domain and connection type. GeoIP Insights adds user type, confidence scores, the IP risk snapshot, static IP score, user count and VPN, proxy, hosting, residential proxy and Tor flags. minFraud Score returns a 0.01 to 99 fraud risk score for each transaction plus the IP risk. minFraud Insights adds GeoIP Insights for the IP and email, card, phone, address and device checks. minFraud Factors adds the reasons behind the risk score. Your MaxMind account must have credit for the service you pick.",
            "default": "geoipCity"
          },
          "ips": {
            "title": "IP addresses",
            "type": "array",
            "description": "One IPv4 or IPv6 address per line, up to 10,000 a run. A port, a CIDR mask or brackets around an IPv6 address are stripped. GeoIP modes look up each address; the word me looks up the address the run connects from. minFraud modes score each address as an IP-only transaction.",
            "items": {
              "type": "string"
            }
          },
          "transactions": {
            "title": "minFraud transactions (JSON)",
            "type": "array",
            "description": "minFraud modes only. A JSON array of transactions, each an object with the documented minFraud request objects: account, billing, credit_card, custom_inputs, device, email, event, order, payment, shipping and shopping_cart. Example: [{\"device\": {\"ip_address\": \"81.2.69.160\"}, \"email\": {\"domain\": \"example.com\"}, \"event\": {\"transaction_id\": \"order-1001\", \"type\": \"purchase\"}, \"order\": {\"amount\": 49.9, \"currency\": \"USD\"}}]. Each transaction must stay under 20,000 bytes. Hash email addresses (MD5) if you prefer not to send them in the clear."
          },
          "eventType": {
            "title": "Event type",
            "enum": [
              "purchase",
              "recurring_purchase",
              "account_creation",
              "account_login",
              "credit_application",
              "email_change",
              "fund_transfer",
              "password_reset",
              "payout_change",
              "referral",
              "sim_swap",
              "survey"
            ],
            "type": "string",
            "description": "minFraud modes only. Sets event.type on every transaction that does not already have one, so minFraud scores it as that kind of event."
          },
          "shopId": {
            "title": "Shop ID",
            "type": "string",
            "description": "minFraud modes only. Sets event.shop_id on every transaction that does not already have one. Required by MaxMind for resellers, payment providers, gateways and affiliate networks. Use test, or a test prefix, while testing."
          },
          "environment": {
            "title": "Environment",
            "enum": [
              "production",
              "sandbox"
            ],
            "type": "string",
            "description": "Production calls geoip.maxmind.com and minfraud.maxmind.com. Sandbox calls sandbox.maxmind.com, which needs a license key from a MaxMind Sandbox account and answers with fixed test data for a small set of addresses.",
            "default": "production"
          },
          "skipNotFound": {
            "title": "Skip addresses with no record",
            "type": "boolean",
            "description": "Leave out addresses MaxMind has no record for, reserved or private addresses and transactions MaxMind would not read. Off by default so you can see every miss. Misses are never charged either way.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many MaxMind requests to keep in flight at once.",
            "default": 5
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many rows. Only this many addresses or transactions are sent, so it also caps the MaxMind credit a run uses.",
            "default": 100
          },
          "accountId": {
            "title": "MaxMind account ID",
            "type": "string",
            "description": "Your numeric MaxMind account ID, shown on maxmind.com under Account, Manage License Keys. Sent only as the HTTP Basic user name. Or leave it empty and put accountId:licenseKey in the license key field or the DATA_API_KEY secret."
          },
          "apiKey": {
            "title": "MaxMind license key",
            "type": "string",
            "description": "A MaxMind license key for the account above, sent only as the HTTP Basic password and never logged. Required for every lookup. Stored as a secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}