{
  "openapi": "3.0.1",
  "info": {
    "title": "IP Geolocation API - IP to Company, ASN, VPN and Proxy Data",
    "description": "Look up IP addresses in bulk and get country, region, city, coordinates, timezone and postal code, ASN with network name, network domain and network type, hosting, mobile and anycast flags, carrier data, and VPN, proxy, Tor and relay detection. Pay per result. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "ZhcGZSrYTAoCRb2dJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~ip-geolocation-company-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-ip-geolocation-company-data-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-company-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-ip-geolocation-company-data-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-company-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-ip-geolocation-company-data-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": {
          "ipAddresses": {
            "title": "IP addresses",
            "type": "array",
            "description": "IP addresses to look up, one per line. IPv4 and IPv6 both work. A port suffix, a CIDR mask or square brackets around an IPv6 literal are stripped before the request, so addresses pasted straight out of a log file are accepted as they are.",
            "items": {
              "type": "string"
            }
          },
          "ipAddressesText": {
            "title": "IP addresses (pasted block)",
            "type": "string",
            "description": "A block of addresses pasted as one lump, separated by newlines, commas, tabs or spaces. Use this when your source is a log excerpt or a spreadsheet column rather than a clean list. Anything here is added to the list above and duplicates are removed."
          },
          "lookupOwnAddress": {
            "title": "Also look up the run's own address",
            "type": "boolean",
            "description": "Add one extra row for the address the run itself connects from. Useful as a one-click check that the token works and to see which addresses your platform egress uses.",
            "default": false
          },
          "dataset": {
            "title": "Data depth",
            "enum": [
              "lite",
              "lookup"
            ],
            "type": "string",
            "description": "Which family of record to request. Network and country returns the ASN, network name, network domain and country, and has a batch route that takes up to 1000 addresses per request. Full detail adds region, city, coordinates, timezone, postal code, hosting and mobile flags, carrier data and VPN, proxy, Tor and relay detection, and is looked up one address at a time. Your plan has to be entitled to the level you pick.",
            "default": "lite"
          },
          "batchLookups": {
            "title": "Use the batch route",
            "type": "boolean",
            "description": "Send network and country lookups through the batch route instead of one request per address. On by default, because it is the difference between one request and a thousand on a large list. Has no effect on full detail lookups, which have no batch route.",
            "default": true
          },
          "batchSize": {
            "title": "Addresses per batch request",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many addresses to send in one batch request. The provider accepts up to 1000, which is the default and the fastest setting. Lower it only if you want smaller, more frequent progress updates.",
            "default": 1000
          },
          "concurrency": {
            "title": "Parallel lookups",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many full detail lookups to keep in flight at once. The provider does not cap concurrent requests, so this is really a throughput dial: raise it to finish a long list sooner, lower it if you are sharing the plan's monthly quota with other jobs.",
            "default": 10
          },
          "skipNotFound": {
            "title": "Skip addresses with no record",
            "type": "boolean",
            "description": "Leave addresses the provider has no record for out of the dataset. Off by default, because keeping the misses is what lets you see which addresses resolved and which did not. Misses are never charged for either way.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. This is the cap on both spend and run time.",
            "default": 100
          },
          "apiKey": {
            "title": "Access token",
            "type": "string",
            "description": "Your own access token for the IP data API, sent as a bearer token in the request header rather than in the URL, so it never appears in a log line or a redirect. 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}