Sitemaps: list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cần phải uỷ quyền
Liệt kê các sitemaps-entries được gửi cho trang web này hoặc được đưa vào tệp chỉ mục sơ đồ trang web (nếu sitemapIndex
được chỉ định trong yêu cầu).
Thử ngay.
Yêu cầu
Yêu cầu HTTP
GET https://www.googleapis.com/webmasters/v3/sites/siteUrl/sitemaps
Tham số
url
Tên thông số |
Giá trị | Mô tả |
Tham số đường dẫn |
siteUrl |
string |
URL của tài sản như được xác định trong Search Console. Ví dụ:
http://www.example.com/
(tài sản tiền tố URL),
hoặc sc-domain:example.com
(Tài sản miền).
|
Tham số truy vấn không bắt buộc |
sitemapIndex |
string |
URL chỉ mục sơ đồ trang web của một trang web. Ví dụ: http://www.example.com/sitemapindex.xml
|
Ủy quyền
Yêu cầu này cần có sự uỷ quyền với ít nhất một trong các phạm vi sau (đọc thêm về tính năng xác thực và uỷ quyền).
Phạm vi |
https://www.googleapis.com/auth/webmasters.readonly |
https://www.googleapis.com/auth/webmasters |
Nội dung yêu cầu
Đừng cung cấp nội dung yêu cầu bằng phương thức này.
Phản hồi
Nếu thành công, phương thức này sẽ trả về nội dung phản hồi có cấu trúc như sau:
{
"sitemap": [
sitemaps Resource
]
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
sitemap[] |
list |
Chứa thông tin chi tiết về một URL cụ thể được gửi dưới dạng sơ đồ trang web. |
|
Hãy dùng thử!
Hãy sử dụng APIs Explorer (Trình khám phá API) bên dưới để gọi phương thức này trên dữ liệu trực tiếp và xem phản hồi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-24 UTC."],[[["\u003cp\u003eLists sitemaps submitted for a site, including those in the sitemap index file.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes for access.\u003c/p\u003e\n"],["\u003cp\u003eEmploys a simple GET request with optional parameters for filtering.\u003c/p\u003e\n"],["\u003cp\u003eResponse provides detailed information about each submitted sitemap.\u003c/p\u003e\n"],["\u003cp\u003eAllows users to try the API call directly using the provided explorer tool.\u003c/p\u003e\n"]]],["This API endpoint retrieves a list of sitemap entries for a specified site. The request, using `GET`, requires the `siteUrl` path parameter, which is the site's URL as defined in Search Console. Optionally, it takes a `sitemapIndex` query parameter to list entries within a specific sitemap index. Authorization is necessary using `webmasters.readonly` or `webmasters` scopes. A successful response returns a list of sitemap resources, each detailing a submitted URL. No request body is needed.\n"],null,["# Sitemaps: list\n\n**Requires [authorization](#auth)**\n\nLists the [sitemaps-entries](/webmaster-tools/v1/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/webmasters/v3/sites/siteUrl/sitemaps\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `siteUrl` | `string` | The URL of the property as defined in Search Console. For example: `http://www.example.com/` ([URL-prefix](https://support.google.com/webmasters/answer/34592#url_prefix_prop_tips) property), or `sc-domain:example.com` ([Domain](https://support.google.com/webmasters/answer/34592#domain_property) property). |\n| **Optional query parameters** |||\n| `sitemapIndex` | `string` | A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml` |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/webmaster-tools/v1/how-tos/authorizing)).\n\n| Scope |\n|-------------------------------------------------------|\n| `https://www.googleapis.com/auth/webmasters.readonly` |\n| `https://www.googleapis.com/auth/webmasters` |\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```objective-c\n{\n \"sitemap\": [\n sitemaps Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|--------|-----------------------------------------------------------------------------------------------------------------------------------|-------|\n| `sitemap[]` | `list` | Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184). | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]