> For the complete documentation index see https://domscan.net/llms.txt. Markdown versions of every docs page are available by appending .md to the page URL.

Source: https://domscan.net/ar/docs/recipe-infrastructure-discovery

# اكتشاف البنية التحتية

باستخدام DomScan API، ارسم خريطة البنية التحتية الخارجية لمؤسستك وسطح الهجوم.

ارسم خريطة البنية التحتية الخارجية لمؤسستك وسطح الهجوم. اكتشف النطاقات الفرعية وحدد الخدمات المكشوفة وابحث عن الثغرات الأمنية المحتملة قبل المهاجمين.

GET /v1/recipes/infrastructure-discovery الرصيد: 15

#### معاملات الاستعلام

| المعامل | النوع | مطلوب |
| --- | --- | --- |
| domain | string | مطلوب |
| depth | string القيم المسموحة `quick`, `standard`, `deep` الافتراضي `standard` | اختياري |
| include_historical | boolean الافتراضي `false` | اختياري |
| dry_run | string القيم المسموحة `true` | اختياري |

#### حقول الرد

| الحقل | النوع |
| --- | --- |
| `success` | boolean |
| `data` | object |
| `data.domain` | string |
| `data.subdomains` | object |
| `data.subdomains.count` | number |
| `data.subdomains.items[]` | object[] |
| `data.subdomains.items[]` | object |
| `data.subdomains.items[].subdomain` | string |
| `data.subdomains.items[].ip` | string |
| `data.subdomains.items[].tech[]` | string[] |
| `data.ip_addresses` | object |
| `data.ip_addresses.unique_ips` | number |
| `data.ip_addresses.items[]` | object[] |
| `data.ip_addresses.items[]` | object |
| `data.ip_addresses.items[].ip` | string |
| `data.ip_addresses.items[].asn` | string |
| `data.ip_addresses.items[].org` | string |
| `data.ip_addresses.items[].country` | string |
| `data.hosting` | object |
| `data.hosting.providers[]` | string[] |
| `data.hosting.regions[]` | string[] |
| `data.related_domains[]` | string[] |
| `data.technology_summary` | object |
| `data.technology_summary.cms` | null |
| `data.technology_summary.frameworks[]` | string[] |
| `data.technology_summary.servers[]` | string[] |
| `data.technology_summary.cdn` | string |
| `data.attack_surface` | object |
| `data.attack_surface.exposed_services[]` | string[] |
| `data.attack_surface.potential_entry_points[]` | string[] |
| `meta` | object |
| `meta.recipe_name` | string |
| `meta.credits_used` | number |
| `meta.credits_saved` | number |
| `meta.duration_ms` | number |
| `meta.components_called[]` | string[] |
| `meta.cached_components[]` | array |
| `meta.timestamp` | string |
| `errors[]` | array |

#### طلب مثال

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/recipes/infrastructure-discovery?domain=example.com&depth=standard&include_historical=false"
```

```javascript
const response = await fetch("https://domscan.net/v1/recipes/infrastructure-discovery?domain=example.com&depth=standard&include_historical=false", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/recipes/infrastructure-discovery?domain=example.com&depth=standard&include_historical=false",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/recipes/infrastructure-discovery?domain=example.com&depth=standard&include_historical=false", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
```

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/recipes/infrastructure-discovery?domain=example.com&depth=standard&include_historical=false")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))
```

#### مثال الرد

```json
{
  "success": true,
  "data": {
    "domain": "example.com",
    "subdomains": {
      "count": 4,
      "items": [
        {
          "subdomain": "api.example.com",
          "ip": "198.51.100.44",
          "tech": [
            "nginx",
            "Node.js"
          ]
        }
      ]
    },
    "ip_addresses": {
      "unique_ips": 2,
      "items": [
        {
          "ip": "198.51.100.44",
          "asn": "AS13335",
          "org": "Cloudflare, Inc.",
          "country": "US"
        }
      ]
    },
    "hosting": {
      "providers": [
        "Cloudflare",
        "Vercel"
      ],
      "regions": [
        "US",
        "EU"
      ]
    },
    "related_domains": [
      "status-example.com"
    ],
    "technology_summary": {
      "cms": null,
      "frameworks": [
        "Next.js"
      ],
      "servers": [
        "nginx"
      ],
      "cdn": "Cloudflare"
    },
    "attack_surface": {
      "exposed_services": [
        "HTTPS",
        "API"
      ],
      "potential_entry_points": [
        "api.example.com",
        "status.example.com"
      ]
    }
  },
  "meta": {
    "recipe_name": "infrastructure-discovery",
    "credits_used": 15,
    "credits_saved": 10,
    "duration_ms": 1084,
    "components_called": [
      "subdomains",
      "ip",
      "tech",
      "certificates"
    ],
    "cached_components": [],
    "timestamp": "2026-04-15T11:07:00Z"
  },
  "errors": []
}
```

#### رموز حالة HTTP

- `200` OK
- `400` طلب غير صالح
- `401` غير مصرح
- `402` الدفع مطلوب
- `429` طلبات كثيرة جداً
