---
title: Subdomain Finder API - Discover Active, Inactive & Historical Subdomains
version: 1.0.0
description: Retrieve subdomains related to a given domain name. Returns paginated results with subdomain details including first seen and last seen dates. Supports filtering by date range, status (active/inactive), and pagination with configurable page numbers.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 3
---

## Table of Contents

- [Subdomain Finder API - Discover Active, Inactive & Historical Subdomains v1.0.0](#subdomain-finder-api-discover-active-inactive-historical-subdomains-v100)
  - [Authentication](#authentication)
  - [Domain APIs](#domain-apis)
    - [lookupSubdomains](#lookupsubdomains)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [SubDomainResponse](#subdomainresponse)
    - [SubdomainItem](#subdomainitem)
    - [ErrorResponse](#errorresponse)



# Subdomain Finder API - Discover Active, Inactive & Historical Subdomains v1.0.0

Retrieve subdomains related to a given domain name. Returns paginated results with subdomain details including first seen and last seen dates. Supports filtering by date range, status (active/inactive), and pagination with configurable page numbers.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## Domain APIs

### lookupSubdomains

`GET /subdomains/lookup`

*Get subdomains related to the given domain name.*

The Subdomain Lookup API is designed to retrieve subdomains related to the given domain name. It helps you explore subdomains that are available for registration or usage.

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Format of the response.|
|domain|query|string|true|Domain name for availability and suggestions.|
|after|query|string(date)|false|Filter subdomains seen after this date (format YYYY-MM-DD).|
|before|query|string(date)|false|Filter subdomains seen before this date( format YYYY-MM-DD).|
|status|query|string|false|Filter subdomains by status (active or inactive).|
|page|query|integer|false|Page number for paginated results.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|
|status|active|
|status|inactive|

> Example responses

> Success

```json
{
  "domain": "google.com",
  "status": true,
  "query_time": "2026-07-27T12:22:26.954268895",
  "current_page": 1,
  "total_pages": 1543,
  "total_records": 154233,
  "subdomains": [
    {
      "subdomain": "49qq1sm.sites.google.com",
      "first_seen": "2024-03-03",
      "last_seen": "2026-06-18"
    },
    {
      "subdomain": "tvgkp5.feedproxy.ghs.google.com",
      "last_seen": "2026-07-04"
    },
    {
      "subdomain": "www.reusablesec.sites.google.com",
      "first_seen": "2020-02-18",
      "last_seen": "2026-06-20"
    }
  ]
}
```

> Bad Request – one or more parameters are invalid

```json
{
  "error": "Invalid Param Exception",
  "message": "please pass correct parameters",
  "path": "/v1.0/subdomains/lookup",
  "status": 400,
  "timestamp": "2026-07-27T12:22:27.587Z"
}
```

```json
{
  "timestamp": "2026-07-27T12:22:40.119716922Z",
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "Please pass domain param correct value[For Technical Support: support@whoisfreaks.com]",
  "path": "/v1.0/subdomains"
}
```

```json
{
  "timestamp": "2026-07-27T12:22:28.233751455Z",
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "after date must be earlier than before date.",
  "path": "/v1.0/subdomains"
}
```

```json
{
  "timestamp": "2026-07-27T12:22:39.061042798Z",
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "after date cannot be greater than the current date.",
  "path": "/v1.0/subdomains"
}
```

```json
{
  "timestamp": "2026-07-27T12:22:39.609545647Z",
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "before date cannot be greater than the current date.",
  "path": "/v1.0/subdomains"
}
```

> Request Timeout – Unable to fetch WHOIS data

```json
{
  "timestamp": "2025-08-14T10:37:21.871Z",
  "status": 408,
  "error": "Request Timeout",
  "message": "Unable to fetch whois data. Please try again. [For Technical Support email at: support@apifreaks.com]",
  "path": "/v1.0/subdomains/lookup"
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Success|[SubDomainResponse](#subdomainresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request – one or more parameters are invalid|[ErrorResponse](#errorresponse)|
|408|[Request Timeout](https://tools.ietf.org/html/rfc7231#section-6.5.7)|Request Timeout – Unable to fetch WHOIS data|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|408|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### SubDomainResponse

Subdomain lookup response containing paginated subdomain results.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|domain|string|true|none|The domain name for which subdomains are retrieved.|
|status|boolean|true|none|Indicates whether the request was successfully processed or not.|
|query_time|string|true|none|Timestamp showing when the API request was executed.|
|current_page|integer|true|none|The current page number of the paginated response.|
|total_pages|integer|true|none|Total number of pages available for the given query. Each page has 100 subdomain entries.|
|total_records|integer|true|none|Total number of subdomains found for the domain.|
|subdomains|[[SubdomainItem](#subdomainitem)]|true|none|Returns an array of subdomain objects. Each object contains detailed information about an individual subdomain.|

### SubdomainItem

A single subdomain record with discovery dates.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|subdomain|string|true|none|The discovered subdomain associated with the given domain.|
|first_seen|string(date)|false|none|The date when the subdomain was first discovered. Can be absent for some records.|
|last_seen|string(date)|true|none|The most recent date when the subdomain was observed.|
|inactive_from|string(date)|false|none|The date from which the subdomain is considered inactive. Appears only if inactive.|

### ErrorResponse

Standard error envelope returned by the API on failed requests.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|error|string|false|none|Short error category or exception type.|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path that produced the error.|
|status|integer|false|none|HTTP status code returned with the error.|
|timestamp|string(date-time)|false|none|Timestamp when the error occurred (ISO 8601).|
