مرجع API

API الخاص بـ واجهة برمجة تدقيق خرائط الموقع بصيغة XML

اكتشف ملفات XML sitemap ودقّقها مع عدد عناوين URL وحداثة lastmod ومشكلات البروتوكول. استخدم هذا المرجع لاختيار عملية ودمج عقد الاستجابة الموثق.

العمليات

GET /v1/sitemaps عرض مرجع API

GET /v1/sitemaps

العملية: getSitemapAudit الوحدات والمصادقة: 2 المصادقة مطلوبة
GET /v1/sitemaps الرصيد: 2

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

المعامل النوع مطلوب
url string اختياري
domain string اختياري
sitemap string اختياري
max_sitemaps integer
الافتراضي 5
اختياري

حقول الرد

الحقل النوع
classification object
classification.status string
classification.reason string
classification.evidence object
classification.evidence.source string
classification.evidence.method string
classification.evidence.observed_at string
classification.evidence.detail string
classification.checked_at string
url string
domain string
origin string
status string
checked_at string
fetch object
fetch.checked_url string
fetch.http_status integer | null
fetch.final_url string | null
fetch.via_proxy boolean | null
robots_txt object
robots_txt.status string
robots_txt.url string
robots_txt.http_status integer | null
robots_txt.declared_sitemaps[] object[]
robots_txt.declared_sitemaps[] object
robots_txt.declared_sitemaps[].url string
robots_txt.declared_sitemaps[].same_site boolean
sitemaps[] object[]
sitemaps[] object
sitemaps[].url string
sitemaps[].source string
sitemaps[].parent string | null
sitemaps[].status string
sitemaps[].http_status integer | null
sitemaps[].final_url string | null
sitemaps[].via_proxy boolean | null
sitemaps[].content_type string | null
sitemaps[].bytes integer | null
sitemaps[].type string | null
sitemaps[].url_count integer
sitemaps[].child_sitemap_count integer
sitemaps[].lastmod object
sitemaps[].lastmod.newest string | null
sitemaps[].lastmod.oldest string | null
sitemaps[].lastmod.with_lastmod_ratio number | null
sitemaps[].extensions object
sitemaps[].extensions.images boolean
sitemaps[].extensions.videos boolean
sitemaps[].extensions.news boolean
sitemaps[].extensions.hreflang boolean
sitemaps[].counts object
sitemaps[].counts.invalid_loc integer
sitemaps[].counts.missing_loc integer
sitemaps[].counts.loc_too_long integer
sitemaps[].counts.cross_host_urls integer
sitemaps[].counts.protocol_mismatch_urls integer
sitemaps[].counts.duplicate_urls integer
sitemaps[].counts.invalid_lastmod integer
sitemaps[].counts.future_lastmod integer
sitemaps[].counts.cross_site_child_sitemaps integer
sitemaps[].issues[] string[]
sitemaps[].sample_urls[] string[]
totals object
totals.sitemaps_checked integer
totals.sitemaps_discovered integer
totals.urls_counted integer
totals.budget_exhausted boolean
freshness object
freshness.newest_lastmod string | null
freshness.days_since_newest integer | null
issues[] string[]
caveats[] string[]

طلب مثال

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5"
const response = await fetch("https://domscan.net/v1/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5", {
  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/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5",
    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/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5", 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/sitemaps?url=https%3A%2F%2Fexample.com&domain=example.com&sitemap=https%3A%2F%2Fexample.com%2Fsitemap_index.xml&max_sitemaps=5")
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))

مثال الرد

{
  "url": "https://example.com/",
  "domain": "example.com",
  "origin": "https://example.com",
  "status": "found",
  "checked_at": "2026-10-09T12:00:00.000Z",
  "fetch": {
    "checked_url": "https://example.com/robots.txt",
    "http_status": 200,
    "final_url": "https://example.com/robots.txt",
    "via_proxy": true
  },
  "robots_txt": {
    "status": "found",
    "url": "https://example.com/robots.txt",
    "http_status": 200,
    "declared_sitemaps": [
      {
        "url": "https://example.com/sitemap_index.xml",
        "same_site": true
      },
      {
        "url": "https://sitemaps.example.net/example.xml",
        "same_site": false
      }
    ]
  },
  "sitemaps": [
    {
      "url": "https://example.com/sitemap_index.xml",
      "source": "robots",
      "parent": null,
      "status": "ok",
      "http_status": 200,
      "final_url": "https://example.com/sitemap_index.xml",
      "via_proxy": true,
      "content_type": "application/xml; charset=utf-8",
      "bytes": 412,
      "type": "sitemapindex",
      "url_count": 0,
      "child_sitemap_count": 2,
      "lastmod": {
        "newest": "2026-10-01T00:00:00.000Z",
        "oldest": "2026-10-01T00:00:00.000Z",
        "with_lastmod_ratio": 1
      },
      "extensions": {
        "images": false,
        "videos": false,
        "news": false,
        "hreflang": false
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 0,
        "duplicate_urls": 0,
        "invalid_lastmod": 0,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [],
      "sample_urls": [
        "https://example.com/posts.xml",
        "https://example.com/pages.xml"
      ]
    },
    {
      "url": "https://example.com/posts.xml",
      "source": "index_child",
      "parent": "https://example.com/sitemap_index.xml",
      "status": "ok",
      "http_status": 200,
      "final_url": "https://example.com/posts.xml",
      "via_proxy": true,
      "content_type": "application/xml",
      "bytes": 18234,
      "type": "urlset",
      "url_count": 120,
      "child_sitemap_count": 0,
      "lastmod": {
        "newest": "2026-10-05T00:00:00.000Z",
        "oldest": "2024-03-11T00:00:00.000Z",
        "with_lastmod_ratio": 0.975
      },
      "extensions": {
        "images": true,
        "videos": false,
        "news": false,
        "hreflang": true
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 2,
        "duplicate_urls": 1,
        "invalid_lastmod": 3,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [
        "protocol_mismatch",
        "duplicate_urls",
        "invalid_lastmod"
      ],
      "sample_urls": [
        "https://example.com/blog/a",
        "https://example.com/blog/b",
        "https://example.com/blog/c",
        "http://example.com/blog/d",
        "https://example.com/blog/e"
      ]
    },
    {
      "url": "https://example.com/pages.xml",
      "source": "index_child",
      "parent": "https://example.com/sitemap_index.xml",
      "status": "unknown",
      "http_status": 429,
      "final_url": "https://example.com/pages.xml",
      "via_proxy": true,
      "content_type": "text/html",
      "bytes": 162,
      "type": null,
      "url_count": 0,
      "child_sitemap_count": 0,
      "lastmod": {
        "newest": null,
        "oldest": null,
        "with_lastmod_ratio": null
      },
      "extensions": {
        "images": false,
        "videos": false,
        "news": false,
        "hreflang": false
      },
      "counts": {
        "invalid_loc": 0,
        "missing_loc": 0,
        "loc_too_long": 0,
        "cross_host_urls": 0,
        "protocol_mismatch_urls": 0,
        "duplicate_urls": 0,
        "invalid_lastmod": 0,
        "future_lastmod": 0,
        "cross_site_child_sitemaps": 0
      },
      "issues": [
        "rate_limited"
      ],
      "sample_urls": []
    }
  ],
  "totals": {
    "sitemaps_checked": 3,
    "sitemaps_discovered": 4,
    "urls_counted": 120,
    "budget_exhausted": false
  },
  "freshness": {
    "newest_lastmod": "2026-10-05T00:00:00.000Z",
    "days_since_newest": 4
  },
  "issues": [
    "cross_site_sitemap_declared",
    "protocol_mismatch",
    "duplicate_urls",
    "invalid_lastmod",
    "rate_limited"
  ],
  "caveats": [
    "counts_cover_fetched_files_only",
    "cross_site_sitemaps_not_fetched"
  ]
}

رموز حالة HTTP

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

موارد المرجع