{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Asset Search API - Hosts, Ports, Certificates",
    "description": "Search internet-wide scan data for hosts, services, certificates and web properties by port, protocol, software, country and autonomous system, then read the full record: open ports, detected software, operating system, DNS names, geolocation and certificate chains. Bring your own key.",
    "version": "0.1",
    "x-build-id": "AxCzBjuTj1sFHrFLb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~internet-asset-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-internet-asset-search-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~internet-asset-search-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-internet-asset-search-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~internet-asset-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-internet-asset-search-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 this run does",
            "enum": [
              "search",
              "hosts",
              "certificates",
              "webProperties",
              "aggregate"
            ],
            "type": "string",
            "description": "A run answers one question. Search runs a query across the provider's internet scan data. Hosts, certificates and web properties look up assets you already have. Aggregate counts a search by a field, which is the API form of a report. Fields belonging to another mode are ignored rather than causing an error.",
            "default": "search"
          },
          "apiKey": {
            "title": "Personal access token",
            "type": "string",
            "description": "Your own account's personal access token for this provider, managed in your account settings. Bring your own key: nothing is shared between runs and the token is never written to the dataset or the log."
          },
          "organizationId": {
            "title": "Organization",
            "type": "string",
            "description": "Which organization to associate the request with and bill the credits to. Leave empty to use the token's default organization. Needed to read the credit balance at the start of a run."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "A query in the provider's own query language, for example host.services: (protocol=SSH and not port: 22). Anything you write here is kept whole and only extended by the filters below, never rewritten. A field name the provider does not know is rejected rather than ignored."
          },
          "ports": {
            "title": "Ports",
            "type": "array",
            "description": "Only hosts with a service on any of these ports, one per line. Combined with the query above using and.",
            "items": {
              "type": "string"
            }
          },
          "protocols": {
            "title": "Protocols",
            "type": "array",
            "description": "Only hosts running any of these service protocols, one per line, such as HTTP, SSH or POSTGRES. Sent upper cased, which is how the provider writes them.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Only hosts located in any of these countries, one per line, written in full such as United States or Germany.",
            "items": {
              "type": "string"
            }
          },
          "autonomousSystems": {
            "title": "Autonomous system numbers",
            "type": "array",
            "description": "Only hosts in any of these autonomous systems, one ASN per line. This is how you scope a search to one network operator or hosting provider.",
            "items": {
              "type": "string"
            }
          },
          "software": {
            "title": "Software",
            "type": "array",
            "description": "Only hosts running any of these software products, one per line, such as nginx or OpenSSH. Matched against the product name the provider detected on the service.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields to return",
            "type": "array",
            "description": "Narrow what each search hit carries, one field path per line, such as host.ip. Leave empty for the full record. Omitting the service port, transport protocol and protocol fields means matched services are not returned at all.",
            "items": {
              "type": "string"
            }
          },
          "assets": {
            "title": "Assets",
            "type": "array",
            "description": "Assets to look up, one per line. An IP address for a host, a SHA-256 fingerprint for a certificate, or a hostname and port joined with a colon such as platform.censys.io:80 for a web property.",
            "items": {
              "type": "string"
            }
          },
          "useEnrichment": {
            "title": "Use the enrichment endpoint for hosts",
            "type": "boolean",
            "description": "Read hosts through the provider's enrichment endpoint instead of the standard host endpoint. It is built for high volume lookups and does not consume standard credits, but it is limited to the provider's higher tiers.",
            "default": false
          },
          "aggregateField": {
            "title": "Aggregate by field",
            "type": "string",
            "description": "Which field to count a search by in aggregate mode, for example host.services.port, host.location.country or host.autonomous_system.name. Only fields the provider indexes can be counted."
          },
          "buckets": {
            "title": "Number of buckets",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many distinct values an aggregation returns, most common first.",
            "default": 50
          },
          "pageSize": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many search hits to ask for per page. The provider's maximum is 100, and credits are consumed per page rather than per row, so a larger page is cheaper.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run may store, and so the most it can charge for. A broad query can match millions of hosts, so this is the cap that keeps a run predictable.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "How fast this run calls the provider. Lower it if your plan is rate limited more tightly than the default.",
            "default": 120
          },
          "baseUrl": {
            "title": "API base URL",
            "type": "string",
            "description": "Overrides the API host. Only needed if the provider has given your account a different endpoint."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}