API Documentation

Usage and endpoints for RapidDNS API

Overview

RapidDNS API supports two modes: Keyword Search and Advanced Query. Requests use GET and return JSON with record details. Authentication via Bearer tokens; higher memberships unlock larger limits.

Authentication & API Key

To access the API, you need a valid API Key. This key is available to Pro and Max users.

  1. Go to your User Profile.
  2. Scroll down to the "API Access" section.
  3. Click Generate Key to create your unique API Key.

Include your key in the request header as shown below:

X-API-KEY: rdns_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep your API Key secure. Do not share it publicly. You can regenerate it at any time from your profile if it gets compromised.

Endpoints
  • GET /api/search/<keyword> — keyword search (domain, IP, or CIDR)
  • GET /api/search/query/<query> — advanced query syntax
Request

Method: GET

Access path pattern:

https://rapiddns.io/api/search/<keyword>?page=1&pagesize=100

Query parameters:

  • pagesize — page size per request
  • page — page index to fetch
  • search_type — (Optional) Force search type: subdomain, same_domain, ip, ip_segment. If not provided, it is auto-detected.
Examples

Subdomain search:

https://rapiddns.io/api/search/tesla.com?page=1&pagesize=100

Reverse IP:

https://rapiddns.io/api/search/172.217.3.174?page=1&pagesize=100

Reverse IP range (CIDR):

https://rapiddns.io/api/search/129.134.0.0/16?page=1&pagesize=100
Response

Successful responses return JSON:

{
  "status": 200,
  "msg": "ok",
  "data": {
    "total": 45,
    "status": "ok",
    "data": [
      {
        "type": "A",
        "value": "162.159.0.31",
        "timestamp": "2023-03-02T08:14:42+00:00",
        "date": "2023-03-02",
        "subdomain": "a.ns.hackerone.com"
      },
      {
        "type": "AAAA",
        "value": "2606:4700::6810:6334",
        "timestamp": "2023-02-23T12:17:10+00:00",
        "date": "2023-02-23",
        "subdomain": "hackerone.com"
      }
    ]
  }
}

Fields:

  • data.total — total record count
  • data.data — array of records
  • record.subdomain, record.type, record.value, record.timestamp, record.date
Pagination

Use page and pagesize to paginate results.

Errors
  • 200 Success
  • 400 Parameter error
  • 401 Invalid or expired token
  • 403 Insufficient permissions
  • 404 Not found
  • 429 Rate limit exceeded
  • 5xx Server error
Advanced Query

Use /api/search/query/<query> for syntax-based searches. Queries use Elasticsearch query_string with default operator AND.

Advanced Query Syntax
  • Fields: domain, tld, subdomain, value, type, is_root
  • Boolean: AND, OR, NOT
  • Exact match: wrap in quotes, e.g. subdomain:"a.ns.hackerone.com"
  • Wildcards: trailing wildcards allowed (e.g. subdomain:apple.com*); leading wildcards are not allowed
  • Examples:

domain:apple AND tld:com
type:A AND value:"172.217.3.174"
subdomain:apple.com*
value:"129.134.0.0/16"
Data Export API

Pro and Max users can programmatically export search results to CSV files. The export process is asynchronous.

1. Create Export Task

Endpoint: POST /api/export-data (or GET /api/export-data)

Parameters:

  • query_type: Search type. Options: subdomain, sameip, ip_segment, advanced.
  • query_input: The search term (e.g., example.com, 1.2.3.4).
  • max_results: Max records to export. Limit: 1M for Pro, 10M for Max.
  • compress: (Optional) Set to true to compress result as ZIP. Default: false.

Example Response:

{
  "status": "ok",
  "msg": "queued",
  "data": {
    "export_id": "32a85630321c4322895692134567890a"
  }
}
2. Check Task Status

Endpoint: GET /api/export-data/<task_id>

Example Response:

{
  "status": "ok",
  "data": {
    "id": "32a85630321c4322895692134567890a",
    "status": "processing",  // pending, processing, completed, failed
    "progress_percent": 45,
    "records_count": 5000,
    "file_size": 0,
    "download_url": null  // Available when status is 'completed'
  }
}
3. Get Download Link

Endpoint: GET /api/export-data/<task_id>/download

Returns a secure, temporary download URL for the completed export.

{
  "status": "ok",
  "data": {
    "download_url": "https://export.rapiddns.io/exports/...",
    "expires_in": 604800,
    "filename": "exp_123_abc.csv"
  }
}
FDNS Dataset API

Max users can programmatically access and download full Forward DNS datasets.

1. List Datasets

Endpoint: GET /api/fdns/list

Returns a paginated list of available FDNS dataset files.

Parameters:

  • page: Page number (default: 1)
  • per_page: Items per page (default: 10, max: 50)

Example Response:

{
  "status": "ok",
  "data": {
    "files": [
      {
        "id": 123,
        "dns_type": "A",
        "release_date": "2025-01-15",
        "file_size": 25000000000,
        "description": "FDNS A record dataset"
      }
    ],
    "pagination": {
      "page": 1,
      "total_pages": 5
    }
  }
}
2. Generate Download Link

Endpoint: POST /api/fdns/download or GET /api/fdns/download

Generates a secure, time-limited download URL for a specific dataset file. Requires MAX membership.

Request Parameters:

  • file_id: The ID of the file to download (required). Can be passed as JSON body (POST) or query parameter (GET).

Example Response:

{
  "status": "ok",
  "data": {
    "download_url": "https://fdns.rapiddns.io/download?file=...&sig=...",
    "expires_in": "6 hours",
    "file_id": 123
  }
}
Best Practices
  • Retry transient failures with backoff
  • Use reasonable timeouts and caching
  • Paginate consistently to avoid over-fetching