Pentest-Tools.com Targets API
Operations done on Targets
Operations done on Targets
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pentest-tools-com:pentest-tools-com-targets-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: pentest-tools.com REST Targets API
version: 1.0.1.1
description: Operations done on Targets
servers:
- url: https://api.pentest-tools.com/api/v2
description: Recommended (auto-routes by API key region)
- url: https://app-us.pentest-tools.com/api/v2
description: US region (direct)
- url: https://app.pentest-tools.com/api/v2
description: Europe region (direct)
security:
- bearerAuth: []
tags:
- name: Targets
x-displayName: Targets
description: Operations done on Targets
paths:
/targets:
get:
summary: Get all targets
operationId: get_targets
tags:
- Targets
parameters:
- name: workspace_id
in: query
description: ID of the workspace to show targets from
required: false
schema:
type: integer
- name: type
in: query
description: the type of target
required: false
schema:
type: string
enum:
- hostname
- ip_address
- url
- name: limit
in: query
description: the maximum number of targets to return
required: false
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- name: page
in: query
description: the page number to return
required: false
schema:
type: integer
minimum: 1
default: 1
responses:
200:
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
maxItems: 1000
type: array
items:
$ref: '#/components/schemas/Target'
400:
description: Invalid parameters
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
post:
summary: Create a target
operationId: add_target
tags:
- Targets
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Target'
responses:
201:
headers:
location:
schema:
type: string
format: uri
pattern: /targets/[0-9]+
description: The path to the newly created target
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/CreatedResourceResponse'
description: Created
400:
description: Invalid parameters
401:
$ref: '#/components/responses/UnauthorizedError'
403:
description: Can't create target because it is blacklisted, the user has too many targets or the license is invalid
404:
description: Workspace ID is not valid
409:
description: Target already exists
422:
$ref: '#/components/responses/UnprocessableEntityError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
/targets/{id}:
parameters:
- name: id
in: path
description: id of target to get
required: true
schema:
type: integer
get:
summary: Get target by ID
operationId: get_target
tags:
- Targets
responses:
200:
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Target'
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
delete:
summary: Delete a Target
operationId: delete_target
tags:
- Targets
description: Delete a target and its scans
responses:
204:
description: Deleted successfully
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
409:
description: Target has running scans
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
components:
responses:
ObjectNotFoundError:
description: The object with the given ID was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
UnauthorizedError:
description: API key is missing or invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
UnprocessableEntityError:
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ForbiddenError:
description: You can"t perform this action.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
TooManyRequestsError:
description: Too many requests made in a short period of time
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
ErrorResponse:
type: object
additionalProperties: false
properties:
status:
type: integer
example: 401
message:
type: string
example: No API key specified
Target:
additionalProperties: false
type: object
properties:
id:
readOnly: true
type: integer
name:
type: string
example: example.org
type:
type: string
enum:
- hostname
- ip_address
- url
example: hostname
readOnly: true
description:
type: string
maxLength: 500
workspace_id:
type: integer
required:
- name
CreatedResourceResponse:
type: object
properties:
created_id:
type: integer
example: 420323
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Use the "API key" from the [profile page](https://app.pentest-tools.com/account/api) as the token