{
  "openapi": "3.0.1",
  "info": {
    "title": "IP Intelligence — Geolocation, ASN, Hosting, Tor, Abuse Contact",
    "description": "Bulk IPv4/IPv6 lookup: country/city, ASN & BGP prefix, reverse DNS (FCrDNS), cloud/hosting detection (AWS, GCP, Oracle, DigitalOcean, Cloudflare, Fastly), Tor exits, RDAP abuse contacts and a risk score. Extracts IPs from logs. No API key.",
    "version": "0.1",
    "x-build-id": "hbRmccaICfYgjCoCZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~ip-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-ip-intel",
        "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/yadroo~ip-intel/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-ip-intel",
        "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/yadroo~ip-intel/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-ip-intel",
        "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": {
          "ips": {
            "title": "IP addresses or hostnames",
            "type": "array",
            "description": "IPv4/IPv6 addresses (IPv4-mapped IPv6 is normalized). Hostnames like 'apify.com' are resolved to their A/AAAA records when `resolveHostnames` is on — one output row per resolved IP. Duplicates are removed by default.",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Free text to extract IPs from",
            "type": "string",
            "description": "Optional. Paste access logs, firewall exports, email headers or CSV — every valid IPv4/IPv6 address found is looked up (merged with `ips`)."
          },
          "resolveHostnames": {
            "title": "Resolve hostnames",
            "type": "boolean",
            "description": "Treat non-IP entries as hostnames and look up all their IPv4/IPv6 addresses via DNS.",
            "default": true
          },
          "maxItems": {
            "title": "Max IPs",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on IPs processed (after dedupe; hostnames count once). Billing is per output row.",
            "default": 1000
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Look up each distinct IP once even if it appears many times in the input.",
            "default": true
          },
          "geoProvider": {
            "title": "Geolocation source",
            "enum": [
              "auto",
              "ipwhois",
              "countryis",
              "none"
            ],
            "type": "string",
            "description": "Both sources are free, keyless and allow commercial use. ipwho.is gives richer fields but answers one IP at a time and has a daily quota per client IP; country.is is faster for large lists. Auto switches to country.is at the ipwho.is quota, after 3 ipwho.is failures in a row, or when ipwho.is could not finish before the run timeout.",
            "default": "auto"
          },
          "includeAsn": {
            "title": "ASN & BGP prefix (Team Cymru)",
            "type": "boolean",
            "description": "Adds `asn`, `asName`, `asCountry`, announced `bgpPrefix`, `rir` and `prefixAllocatedAt` via Team Cymru's IP-to-ASN DNS service.",
            "default": true
          },
          "includeReverseDns": {
            "title": "Reverse DNS (PTR)",
            "type": "boolean",
            "description": "Adds `hostname`, all `reverseDns` names and `forwardConfirmed` (the PTR name resolves back to the same IP — FCrDNS, used for verifying crawlers and mail servers).",
            "default": true
          },
          "includeHostingCheck": {
            "title": "Hosting / cloud detection",
            "type": "boolean",
            "description": "Flags datacenter traffic: matches official published ranges of AWS, Google Cloud, Oracle Cloud, DigitalOcean, Cloudflare and Fastly (with service and region), then a curated list of hosting ASNs, then hosting keywords in the AS name.",
            "default": true
          },
          "includeTorCheck": {
            "title": "Tor exit node check",
            "type": "boolean",
            "description": "Checks the official Tor Project exit-node list (downloaded once per run).",
            "default": true
          },
          "includeRdap": {
            "title": "Network owner & abuse contact (RDAP)",
            "type": "boolean",
            "description": "Adds registry data from the RIR (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC): network name, handle, range, CIDR, type, org, registration date and abuse email. One request per distinct network, rate-limited — slower on big lists.",
            "default": false
          },
          "allowedCountries": {
            "title": "Allowed countries (ISO codes)",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 codes such as ['KZ', 'US']. IPs geolocated elsewhere get `outsideAllowedCountries: true` and +25 risk score — e.g. for geo-fencing signups or payments.",
            "items": {
              "type": "string"
            }
          },
          "onlyFlagged": {
            "title": "Only flagged IPs",
            "type": "boolean",
            "description": "Return only IPs that are Tor exits, hosting/datacenter, bogon, or outside `allowedCountries`.",
            "default": false
          },
          "minRiskScore": {
            "title": "Min risk score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop rows with a lower `riskScore` (0–100).",
            "default": 0
          },
          "skipBogons": {
            "title": "Skip private/reserved IPs",
            "type": "boolean",
            "description": "Do not output private, loopback, CGNAT, link-local, documentation and other reserved addresses (they are never looked up remotely either way).",
            "default": false
          },
          "fields": {
            "title": "Only these fields",
            "type": "array",
            "description": "Output columns to keep, in this order, e.g. ['ip', 'countryCode', 'asn', 'asName', 'isHosting', 'riskScore']. `id` and `input` are always kept. Case, '_' and '-' do not matter ('country_code' = countryCode). A name that is no column is left out and named in the status; if no name is a column the run fails with the list of columns. Empty = all columns.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}