{
  "openapi": "3.0.1",
  "info": {
    "title": "IP & ASN Intelligence Scraper (Geo, Abuse, RPKI, WHOIS)",
    "description": "Enrich any IP address or ASN with network intelligence: geolocation, owning ASN and holder, prefix/CIDR, abuse contacts, RPKI/routing status, reverse DNS and WHOIS. Built for fraud prevention, threat intel and network analysis. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "fQ95IaxbPf5xlUgJl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~ip-asn-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-ip-asn-intelligence-scraper",
        "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/scrapers_lat~ip-asn-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-ip-asn-intelligence-scraper",
        "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/scrapers_lat~ip-asn-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-ip-asn-intelligence-scraper",
        "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": {
          "resources": {
            "title": "IPs and/or ASNs",
            "type": "array",
            "description": "One or more IP addresses (IPv4 or IPv6) and/or ASNs to enrich. ASNs may be written as AS15169 or 15169.",
            "items": {
              "type": "string"
            }
          },
          "resource": {
            "title": "Single IP or ASN",
            "type": "string",
            "description": "Alternative to the list above: a single IP or ASN, or several separated by commas, spaces or new lines."
          },
          "includeGeolocation": {
            "title": "Include Geolocation",
            "type": "boolean",
            "description": "Add geolocation (country, city, latitude, longitude) for IP resources.",
            "default": true
          },
          "includeAbuseContact": {
            "title": "Include Abuse Contact",
            "type": "boolean",
            "description": "Add the network abuse-reporting email addresses and authoritative RIR.",
            "default": true
          },
          "includeRouting": {
            "title": "Include Routing (RPKI, prefixes, peers)",
            "type": "boolean",
            "description": "Add RPKI validation status for IPs, and announced-prefix count/sample plus peer count for ASNs.",
            "default": true
          },
          "includeReverseDns": {
            "title": "Include Reverse DNS",
            "type": "boolean",
            "description": "Add the reverse-DNS (PTR) hostname for IP resources.",
            "default": true
          },
          "includeWhois": {
            "title": "Include WHOIS (heavier)",
            "type": "boolean",
            "description": "Add WHOIS-derived RIR, allocation status and organisation name. Slower, off by default.",
            "default": false
          },
          "maxPrefixesPerAsn": {
            "title": "Max Prefixes Per ASN",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on how many announced prefixes to list in samplePrefixes for an ASN resource.",
            "default": 100
          },
          "withThreatCheck": {
            "title": "Threat check (DNSBL / blocklist lookup) — paid add-on",
            "type": "boolean",
            "description": "Opt-in extra: for each IP, check well-known DNS blocklists (Spamhaus, SpamCop, Barracuda, SORBS) and flag whether the IP is listed for spam/abuse (isListed, listedOn, listedCount). Billed $0.012 per IP, only when the checks complete. Disabled for free Apify users. ASNs are skipped.",
            "default": false
          },
          "withAiRisk": {
            "title": "AI risk assessment — paid add-on",
            "type": "boolean",
            "description": "Opt-in extra: uses AI to turn the enrichment (ASN/hosting type, RPKI validity, blocklist hits, abuse contact) into a concise 2-3 sentence plain-English threat/abuse risk assessment (aiRiskSummary). Billed $0.012 per resource, only when usable AI output is produced. Disabled for free Apify users.",
            "default": false
          },
          "maxResources": {
            "title": "Max Resources",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of resources to process. Free Apify accounts are capped at 10 resources per run."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings. RIPEstat works without a proxy; a proxy is only needed for very large batches.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}