{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk IP Geolocation & Network Intelligence",
    "description": "Geolocates IP addresses and domains using the ip-api.com service. Supports single lookups, high-speed batch queries (100 IPs per request), CIDR range expansion, and domain resolution. No API key required (45 requests/minute free tier).",
    "version": "0.0",
    "x-build-id": "pFyGXBpGgZZd9y5Au"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~ip-api----bulk-ip-geolocation-network-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-ip-api----bulk-ip-geolocation-network-intelligence",
        "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/moving_beacon-owner1~ip-api----bulk-ip-geolocation-network-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-ip-api----bulk-ip-geolocation-network-intelligence",
        "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/moving_beacon-owner1~ip-api----bulk-ip-geolocation-network-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-ip-api----bulk-ip-geolocation-network-intelligence",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Lookup Mode",
            "enum": [
              "ip_list",
              "own_ip",
              "ip_range",
              "domains"
            ],
            "type": "string",
            "description": "Choose how to provide IPs for geolocation.",
            "default": "ip_list"
          },
          "ipAddresses": {
            "title": "IP Addresses",
            "type": "string",
            "description": "IP addresses to geolocate, one per line or comma-separated. Supports IPv4 and IPv6. Used in 'IP List' mode.\n\nExamples:\n8.8.8.8\n1.1.1.1\n208.67.222.222\n2001:4860:4860::8888"
          },
          "cidrRange": {
            "title": "CIDR Range",
            "type": "string",
            "description": "A CIDR block to expand and geolocate (e.g. '8.8.8.0/28'). Max /24 (256 IPs). Used in 'IP Range' mode."
          },
          "domains": {
            "title": "Domains",
            "type": "string",
            "description": "Domain names to resolve and geolocate, one per line or comma-separated. E.g. 'google.com, github.com, cloudflare.com'. Used in 'Domains' mode."
          },
          "fields": {
            "title": "Data Fields",
            "type": "array",
            "description": "Select which geolocation fields to include in the output.",
            "items": {
              "type": "string",
              "enum": [
                "status",
                "message",
                "query",
                "country",
                "countryCode",
                "region",
                "regionName",
                "city",
                "district",
                "zip",
                "lat",
                "lon",
                "timezone",
                "offset",
                "currency",
                "isp",
                "org",
                "as",
                "asname",
                "mobile",
                "proxy",
                "hosting",
                "reverse",
                "continent",
                "continentCode"
              ],
              "enumTitles": [
                "Status (success/fail)",
                "Error Message",
                "Queried IP",
                "Country Name",
                "Country Code (ISO 3166-1)",
                "Region Code",
                "Region/State Name",
                "City",
                "District",
                "ZIP / Postal Code",
                "Latitude",
                "Longitude",
                "Timezone (IANA)",
                "UTC Offset (seconds)",
                "Currency Code",
                "ISP Name",
                "Organization",
                "AS Number & Name",
                "AS Name Only",
                "Is Mobile Connection",
                "Is Proxy / VPN",
                "Is Hosting / Datacenter",
                "Reverse DNS (PTR)",
                "Continent Name",
                "Continent Code"
              ]
            },
            "default": [
              "query",
              "status",
              "country",
              "countryCode",
              "region",
              "regionName",
              "city",
              "zip",
              "lat",
              "lon",
              "timezone",
              "isp",
              "org",
              "as"
            ]
          },
          "skipFailed": {
            "title": "Skip Failed Lookups",
            "type": "boolean",
            "description": "If checked, IPs that fail to geolocate (private, reserved, invalid) are excluded. Otherwise a record with status 'fail' is included.",
            "default": false
          },
          "enrichWithLabels": {
            "title": "Enrich with Labels",
            "type": "boolean",
            "description": "Add human-friendly computed fields: full_location string, Google Maps link, IP version, and IP type classification.",
            "default": true
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "input_order",
              "country_asc",
              "city_asc",
              "isp_asc",
              "lat_asc"
            ],
            "type": "string",
            "description": "How to sort the output.",
            "default": "input_order"
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "enriched",
              "raw",
              "minimal",
              "csv_coords"
            ],
            "type": "string",
            "description": "How to structure each record.",
            "default": "enriched"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 0,
            "type": "integer",
            "description": "Limit output records. 0 = no limit.",
            "default": 0
          },
          "addSequentialId": {
            "title": "Add Sequential ID",
            "type": "boolean",
            "description": "Add auto-incrementing ID to each record.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}