IWebmasterApi.GetUrlInfo(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get index details for single page
public:
Microsoft::Bing::Webmaster::Api::Interfaces::UrlInfo ^ GetUrlInfo(System::String ^ siteUrl, System::String ^ url);
[System.ServiceModel.FaultContract(typeof(Microsoft.Bing.Webmaster.Api.Interfaces.ApiFault))]
[System.ServiceModel.OperationContract]
[System.ServiceModel.Web.WebGet(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest)]
public Microsoft.Bing.Webmaster.Api.Interfaces.UrlInfo GetUrlInfo (string siteUrl, string url);
abstract member GetUrlInfo : string * string -> Microsoft.Bing.Webmaster.Api.Interfaces.UrlInfo
Public Function GetUrlInfo (siteUrl As String, url As String) As UrlInfo
Parameters
- siteUrl
- String
- url
- String
Returns
- Attributes
Examples
XML request sample
GET /webmaster/api.svc/pox/GetUrlInfo?siteUrl=http://example.com&url=example.com&apikey=sampleapikeyedecc1ea4ae341cc8b6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com
XML response sample
HTTP/1.1 200 OK
Content-Length: 453
Content-Type: application/xml; charset=utf-8
<UrlInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AnchorCount>50</AnchorCount>
<DiscoveryDate>2011-09-06T16:02:02.3379968-07:00</DiscoveryDate>
<DocumentSize>0</DocumentSize>
<HttpStatus>0</HttpStatus>
<IsPage>false</IsPage>
<LastCrawledDate>2011-09-16T16:02:02.3379968-07:00</LastCrawledDate>
<TotalChildUrlCount>100</TotalChildUrlCount>
<Url>example.com</Url>
</UrlInfo>
JSON request sample
GET /webmaster/api.svc/json/GetUrlInfo?siteUrl=http://example.com&url=%22example.com%22&apikey=sampleapikeyedecc1ea4ae341cc8b6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com
JSON response sample
HTTP/1.1 200 OK
Content-Length: 261
Content-Type: application/json; charset=utf-8
{
"d":
{
"__type":"UrlInfo:#Microsoft.Bing.Webmaster.Api",
"AnchorCount":50,
"DiscoveryDate":"/Date(1315349995266-0700)/",
"DocumentSize":0,
"HttpStatus":0,
"IsPage":false,
"LastCrawledDate":"/Date(1316213995266-0700)/",
"TotalChildUrlCount":100,
"Url":"example.com"
}
}
Remarks
"domain:" prefix can be used to get information for domain. For example: domain:bing.com