公司查询

此 API 处于测试阶段,结果的准确性和完整性可能有所不同。数据聚合自公开来源。

GET /v1/company

查询参数

参数类型说明
domain 必需 string 要查询的公司域名(例如 "stripe.com")

响应字段

字段说明
company.name公司正式名称
company.description业务简介
socialLinkedIn、Twitter、Facebook 链接

使用场景

  • 竞争情报分析
  • 供应商或合作伙伴研究

请求示例

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/company?domain=stripe.com"

响应示例

{
                "domain": "stripe.com",
                "company": {
                "name": "Stripe",
                "legal_name": null,
                "description": "Financial infrastructure for the internet.",
                "founded_year": null,
                "industry": null,
                "employee_count_range": null,
                "type": null
                },
                "location": {
                "headquarters": null
                },
                "social": {
                "linkedin": "https://linkedin.com/company/stripe",
                "twitter": "https://twitter.com/stripe",
                "facebook": null,
                "github": null
                },
                "tech": {
                "email_provider": "Google Workspace",
                "website_technologies": []
                },
                "confidence": 0.65
                }
GET /v1/identity-assets 积分: 2

查询参数

参数 类型 必需
domain string 必需
skip_cache string
允许的值 1
可选

响应字段

字段 类型
cache_age_s integer
domain string
website_url string
fetch_state string
organization_name string | null
assets object
assets.logo_url string | null
assets.logo_kind string | null
assets.logo_source string | null
assets.logo_verification string | null
assets.favicon_url string | null
assets.touch_icon_url string | null
assets.preview_image_url string | null
assets.manifest_url string | null
assets.theme_color string | null
assets.candidates[] object[]
assets.candidates[] object
assets.candidates[].url string
assets.candidates[].kind string
assets.candidates[].source string
assets.candidates[].type string | null
assets.candidates[].sizes string | null
assets.candidates[].score integer
assets.candidates[].confidence string
social_profiles[] object[]
social_profiles[] object
social_profiles[].platform string
social_profiles[].type string
social_profiles[].handle string | null
social_profiles[].url string
social_profiles[].source string
social_profiles[].confidence string
confidence number
evidence[] string[]
meta object
meta.checked_at string
meta.cached boolean
meta.fetch_transport string
meta.fetch_error string

请求示例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/identity-assets?domain=example.com&skip_cache=1"
const response = await fetch("https://domscan.net/v1/identity-assets?domain=example.com&skip_cache=1", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.get(
    "https://domscan.net/v1/identity-assets?domain=example.com&skip_cache=1",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
package main

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

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/identity-assets?domain=example.com&skip_cache=1", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/identity-assets?domain=example.com&skip_cache=1")
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))

响应示例

{
  "domain": "www.example.com",
  "website_url": "https://www.example.com/",
  "fetch_state": "ok",
  "organization_name": "Example Co",
  "assets": {
    "logo_url": "https://www.example.com/logo.png",
    "logo_kind": "logo",
    "logo_source": "json_ld:logo",
    "logo_verification": "verified",
    "favicon_url": "https://www.example.com/favicon.ico",
    "touch_icon_url": "https://www.example.com/apple-touch-icon.png",
    "preview_image_url": "https://www.example.com/og.png",
    "manifest_url": "https://www.example.com/site.webmanifest",
    "theme_color": "#0b5fff",
    "candidates": [
      {
        "url": "https://www.example.com/logo.png",
        "kind": "logo",
        "source": "json_ld:logo",
        "type": null,
        "sizes": null,
        "score": 100,
        "confidence": "high"
      },
      {
        "url": "https://www.example.com/apple-touch-icon.png",
        "kind": "touch_icon",
        "source": "link:apple-touch-icon",
        "type": null,
        "sizes": "180x180",
        "score": 80,
        "confidence": "high"
      },
      {
        "url": "https://www.example.com/favicon.ico",
        "kind": "favicon",
        "source": "link:icon",
        "type": null,
        "sizes": "48x48",
        "score": 60,
        "confidence": "medium"
      },
      {
        "url": "https://www.example.com/og.png",
        "kind": "preview_image",
        "source": "open_graph:image",
        "type": null,
        "sizes": null,
        "score": 30,
        "confidence": "low"
      }
    ]
  },
  "social_profiles": [
    {
      "platform": "linkedin",
      "type": "social",
      "handle": "example-co",
      "url": "https://www.linkedin.com/company/example-co",
      "source": "same_as",
      "confidence": "high"
    },
    {
      "platform": "github",
      "type": "developer",
      "handle": "example-co",
      "url": "https://github.com/example-co",
      "source": "same_as",
      "confidence": "high"
    }
  ],
  "confidence": 1,
  "evidence": [
    "organization_name",
    "structured_logo",
    "asset_verified",
    "declared_icon",
    "declared_social_profiles"
  ],
  "meta": {
    "checked_at": "2026-10-09T10:15:30.000Z",
    "cached": false,
    "fetch_transport": "edge_relay"
  }
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 429 请求过多
  • 502 网关错误
POST /v1/identity-assets/bulk 积分: 2/item

查询参数

参数 类型 必需
dry_run string
允许的值 true
可选

正文参数

参数 类型 必需
domains string[] 必需

响应字段

字段 类型
results[] object[]
results[] object
results[].input string
results[].data object
results[].error object
results[].error.error object
results[].error.error.code string
results[].error.error.type string
results[].error.error.message string
results[].error.error.status integer
results[].error.error.retryable boolean
results[].error.error.request_id string
results[].error.error.suggestion string
results[].error.error.details object
results[].error.error.retry_after integer
results[].error.error.docs_url string
meta object
meta.total integer
meta.succeeded integer
meta.failed integer
meta.unknown integer
meta.max_items integer
meta.credits_per_item integer
meta.duration_ms integer

请求示例

curl -X POST "https://domscan.net/v1/identity-assets/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "domains": [
    "stripe.com",
    "github.com"
  ]
}'
const response = await fetch("https://domscan.net/v1/identity-assets/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "domains": [
      "stripe.com",
      "github.com"
    ]
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/identity-assets/bulk",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "domains": [
            "stripe.com",
            "github.com",
        ],
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "domains": [
	    "stripe.com",
	    "github.com"
	  ]
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/identity-assets/bulk", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/identity-assets/bulk")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "domains" => [
    "stripe.com",
    "github.com"
  ]
})

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))

响应示例

{
  "results": [
    {
      "input": "example",
      "data": {},
      "error": {
        "error": {
          "code": "INVALID_DOMAIN",
          "type": "authentication_error",
          "message": "Invalid domain format",
          "status": 400,
          "retryable": false,
          "request_id": "request-id",
          "docs_url": "https://domscan.net/docs/check-availability",
          "suggestion": "example",
          "details": {},
          "retry_after": 300
        }
      }
    }
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "unknown": 1,
    "max_items": 10,
    "credits_per_item": 2,
    "duration_ms": 1
  }
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 409 HTTP 409
  • 422 HTTP 422
  • 429 请求过多
GET /v1/identity-resolution 积分: 2

查询参数

参数 类型 必需
domain string 必需
skip_cache string
允许的值 1
可选

响应字段

字段 类型
cache_age_s integer
query string
canonical_domain string
website_url string
fetch_state string
organization object
organization.name string | null
organization.description string | null
identities[] object[]
identities[] object
identities[].platform string
identities[].type string
identities[].handle string | null
identities[].url string
identities[].source string
identities[].confidence string
contacts object
contacts.emails[] string[]
contacts.phones[] string[]
confidence number
evidence object
evidence.declared_identity_count integer
evidence.high_confidence_count integer
evidence.medium_confidence_count integer
evidence.sources[] string[]
meta object
meta.checked_at string
meta.cached boolean
meta.fetch_transport string
meta.fetch_error string

请求示例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/identity-resolution?domain=example.com&skip_cache=1"
const response = await fetch("https://domscan.net/v1/identity-resolution?domain=example.com&skip_cache=1", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.get(
    "https://domscan.net/v1/identity-resolution?domain=example.com&skip_cache=1",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
package main

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

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/identity-resolution?domain=example.com&skip_cache=1", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/identity-resolution?domain=example.com&skip_cache=1")
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))

响应示例

{
  "query": "example",
  "canonical_domain": "example.com",
  "website_url": "https://example.com",
  "fetch_state": "ok",
  "organization": {
    "name": "example",
    "description": "example"
  },
  "identities": [
    {
      "platform": "github",
      "type": "social",
      "url": "https://example.com",
      "source": "same_as",
      "confidence": "high",
      "handle": "example"
    }
  ],
  "contacts": {
    "emails": [
      "[email protected]",
      "[email protected]"
    ],
    "phones": [
      "example"
    ]
  },
  "confidence": 0.85,
  "evidence": {
    "declared_identity_count": 1,
    "high_confidence_count": 1,
    "medium_confidence_count": 1,
    "sources": [
      "example"
    ]
  },
  "meta": {
    "checked_at": "2026-08-27T12:00:00Z",
    "cached": false,
    "fetch_transport": "worker",
    "fetch_error": "timeout"
  },
  "cache_age_s": 1
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 429 请求过多
  • 502 网关错误
POST /v1/identity-resolution/bulk 积分: 2/item

查询参数

参数 类型 必需
dry_run string
允许的值 true
可选

正文参数

参数 类型 必需
domains string[] 必需

响应字段

字段 类型
results[] object[]
results[] object
results[].input string
results[].data object
results[].error object
results[].error.error object
results[].error.error.code string
results[].error.error.type string
results[].error.error.message string
results[].error.error.status integer
results[].error.error.retryable boolean
results[].error.error.request_id string
results[].error.error.suggestion string
results[].error.error.details object
results[].error.error.retry_after integer
results[].error.error.docs_url string
meta object
meta.total integer
meta.succeeded integer
meta.failed integer
meta.unknown integer
meta.max_items integer
meta.credits_per_item integer
meta.duration_ms integer

请求示例

curl -X POST "https://domscan.net/v1/identity-resolution/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "domains": [
    "stripe.com",
    "github.com"
  ]
}'
const response = await fetch("https://domscan.net/v1/identity-resolution/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "domains": [
      "stripe.com",
      "github.com"
    ]
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/identity-resolution/bulk",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "domains": [
            "stripe.com",
            "github.com",
        ],
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "domains": [
	    "stripe.com",
	    "github.com"
	  ]
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/identity-resolution/bulk", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/identity-resolution/bulk")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "domains" => [
    "stripe.com",
    "github.com"
  ]
})

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))

响应示例

{
  "results": [
    {
      "input": "example",
      "data": {},
      "error": {
        "error": {
          "code": "INVALID_DOMAIN",
          "type": "authentication_error",
          "message": "Invalid domain format",
          "status": 400,
          "retryable": false,
          "request_id": "request-id",
          "docs_url": "https://domscan.net/docs/check-availability",
          "suggestion": "example",
          "details": {},
          "retry_after": 300
        }
      }
    }
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "unknown": 1,
    "max_items": 10,
    "credits_per_item": 2,
    "duration_ms": 1
  }
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 409 HTTP 409
  • 422 HTTP 422
  • 429 请求过多
GET /v1/url-intelligence 积分: 2

查询参数

参数 类型 必需
url string 必需
skip_cache string
允许的值 1
可选

响应字段

字段 类型
cache_age_s integer
requested_url string
final_url string
status integer
fetch_state string
content_type string | null
redirects integer
title string | null
description string | null
canonical_url string | null
language string | null
favicon_url string | null
preview_image_url string | null
manifest_url string | null
theme_color string | null
open_graph object
twitter_card object
structured_data object
structured_data.types[] string[]
structured_data.items integer
structured_data.parse_errors integer
robots object
robots.meta[] string[]
robots.header[] string[]
robots.indexable boolean | null
security_headers object
links object
links.total integer
links.internal integer
links.external integer
social_profiles[] object[]
social_profiles[] object
social_profiles[].platform string
social_profiles[].type string
social_profiles[].handle string | null
social_profiles[].url string
social_profiles[].source string
social_profiles[].confidence string
contacts object
contacts.emails[] string[]
contacts.phones[] string[]
meta object
meta.checked_at string
meta.cached boolean
meta.fetch_transport string
meta.fetch_error string

请求示例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/url-intelligence?url=https%3A%2F%2Fexample.com&skip_cache=1"
const response = await fetch("https://domscan.net/v1/url-intelligence?url=https%3A%2F%2Fexample.com&skip_cache=1", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.get(
    "https://domscan.net/v1/url-intelligence?url=https%3A%2F%2Fexample.com&skip_cache=1",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
package main

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

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/url-intelligence?url=https%3A%2F%2Fexample.com&skip_cache=1", 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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/url-intelligence?url=https%3A%2F%2Fexample.com&skip_cache=1")
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))

响应示例

{
  "requested_url": "https://www.example.com/",
  "final_url": "https://www.example.com/",
  "status": 200,
  "fetch_state": "ok",
  "content_type": "text/html; charset=UTF-8",
  "redirects": 0,
  "title": "Example Co | Simple tools for small teams",
  "description": "Example Co builds simple tools for small teams.",
  "canonical_url": "https://www.example.com/",
  "language": "en",
  "favicon_url": "https://www.example.com/favicon.ico",
  "preview_image_url": "https://www.example.com/og.png",
  "manifest_url": "https://www.example.com/site.webmanifest",
  "theme_color": "#0b5fff",
  "open_graph": {
    "title": "Example Co",
    "type": "website",
    "url": "https://www.example.com/",
    "image": "https://www.example.com/og.png"
  },
  "twitter_card": {
    "card": "summary_large_image",
    "title": "Example Co"
  },
  "structured_data": {
    "types": [
      "Organization"
    ],
    "items": 1,
    "parse_errors": 0
  },
  "robots": {
    "meta": [
      "index",
      "follow"
    ],
    "header": [],
    "indexable": true
  },
  "security_headers": {
    "content-security-policy": "default-src 'self'",
    "strict-transport-security": "max-age=63072000; includeSubDomains",
    "x-content-type-options": "nosniff",
    "x-frame-options": "SAMEORIGIN",
    "referrer-policy": "strict-origin-when-cross-origin",
    "permissions-policy": null,
    "cross-origin-opener-policy": null
  },
  "links": {
    "total": 3,
    "internal": 2,
    "external": 1
  },
  "social_profiles": [
    {
      "platform": "linkedin",
      "type": "social",
      "handle": "example-co",
      "url": "https://www.linkedin.com/company/example-co",
      "source": "same_as",
      "confidence": "high"
    },
    {
      "platform": "github",
      "type": "developer",
      "handle": "example-co",
      "url": "https://github.com/example-co",
      "source": "same_as",
      "confidence": "high"
    }
  ],
  "contacts": {
    "emails": [
      "[email protected]"
    ],
    "phones": []
  },
  "meta": {
    "checked_at": "2026-10-09T10:15:30.000Z",
    "cached": false,
    "fetch_transport": "edge_relay"
  }
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 429 请求过多
  • 502 网关错误
POST /v1/url-intelligence/bulk 积分: 2/item

查询参数

参数 类型 必需
dry_run string
允许的值 true
可选

正文参数

参数 类型 必需
urls string[] 必需

响应字段

字段 类型
results[] object[]
results[] object
results[].input string
results[].data object
results[].error object
results[].error.error object
results[].error.error.code string
results[].error.error.type string
results[].error.error.message string
results[].error.error.status integer
results[].error.error.retryable boolean
results[].error.error.request_id string
results[].error.error.suggestion string
results[].error.error.details object
results[].error.error.retry_after integer
results[].error.error.docs_url string
meta object
meta.total integer
meta.succeeded integer
meta.failed integer
meta.unknown integer
meta.max_items integer
meta.credits_per_item integer
meta.duration_ms integer

请求示例

curl -X POST "https://domscan.net/v1/url-intelligence/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "urls": [
    "https://example.com",
    "https://github.com/about"
  ]
}'
const response = await fetch("https://domscan.net/v1/url-intelligence/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "urls": [
      "https://example.com",
      "https://github.com/about"
    ]
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/url-intelligence/bulk",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "urls": [
            "https://example.com",
            "https://github.com/about",
        ],
    },
)
print(response.json())
package main

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

func main() {
	body := strings.NewReader(`{
	  "urls": [
	    "https://example.com",
	    "https://github.com/about"
	  ]
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/url-intelligence/bulk", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	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))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/url-intelligence/bulk")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "urls" => [
    "https://example.com",
    "https://github.com/about"
  ]
})

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))

响应示例

{
  "results": [
    {
      "input": "example",
      "data": {},
      "error": {
        "error": {
          "code": "INVALID_DOMAIN",
          "type": "authentication_error",
          "message": "Invalid domain format",
          "status": 400,
          "retryable": false,
          "request_id": "request-id",
          "docs_url": "https://domscan.net/docs/check-availability",
          "suggestion": "example",
          "details": {},
          "retry_after": 300
        }
      }
    }
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "unknown": 1,
    "max_items": 10,
    "credits_per_item": 2,
    "duration_ms": 1
  }
}

HTTP 状态码

  • 200 成功
  • 400 请求错误
  • 401 未授权
  • 402 需要付款
  • 409 HTTP 409
  • 422 HTTP 422
  • 429 请求过多