Export (0) Print
Expand All
Expand Minimize

IWebmasterApi.GetChildrenUrlInfo

Namespace: Microsoft.Bing.Webmaster.Api

IWebmasterApi.GetChildrenUrlInfo Method

Get index details for directory

Syntax

List<UrlInfo> GetChildrenUrlInfo(
string siteUrl,
string url,
ushort page,
FilterProperties filterProperties
)

Parameters

siteUrl
Type: System.String
Site url

url
Type: System.String
Directory (parent) url

page
Type: System.UInt16
Page number

filterProperties
Type: Microsoft.Bing.Webmaster.Api.FilterProperties
Filters

Return Value

List of UrlInfo objects

Remarks

"domain:" prefix can be used to get information for domain. For example: domain:bing.com

Examples

This example shows how to display AnchorCount field for all pages/directories in example.com directory.

var containerInfo = api.GetUrlInfo("http://example.com/", "example.com");
if(!containerInfo.IsPage &amp;&amp; containerInfo.TotalChildUrlCount > 0)
{
    List&lt;Api.UrlInfo&gt; values;
    ushort page = 0;
    do
    {
        values = api.GetChildrenUrlInfo("http://example.com/", containerInfo.Url, page, new FilterProperties());
        foreach (var urlInfo in values)
        {
            Console.WriteLine("Url: {0} AnchorCount: {1}", urlInfo.Url, urlInfo.AnchorCount);
        }
        ++page;
    } while (values.Count > 0);
}

XML request sample

POST /webmaster/api.svc/pox/GetChildrenUrlInfo?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com
Content-Length: 493

<GetChildrenUrlInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api">
<siteUrl>http://example.com</siteUrl>
<url>example.com</url>
<page>0</page>
<filterProperties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:CrawlDateFilter>LastWeek</a:CrawlDateFilter>
<a:DiscoveredDateFilter>Any</a:DiscoveredDateFilter>
<a:DocFlagsFilters>Any</a:DocFlagsFilters>
<a:HttpCodeFilters>Any</a:HttpCodeFilters>
</filterProperties>
</GetChildrenUrlInfo>

XML response sample

HTTP/1.1 200 OK
Content-Length: 476
Content-Type: application/xml; charset=utf-8

<ArrayOfUrlInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<UrlInfo>
<AnchorCount>50</AnchorCount>
<DiscoveryDate>2011-09-06T16:02:02.37-07:00</DiscoveryDate>
<DocumentSize>0</DocumentSize>
<HttpStatus>0</HttpStatus>
<IsPage>false</IsPage>
<LastCrawledDate>2011-09-16T16:02:02.37-07:00</LastCrawledDate>
<TotalChildUrlCount>100</TotalChildUrlCount>
<Url>example.com</Url>
</UrlInfo>
</ArrayOfUrlInfo>

JSON request sample

POST /webmaster/api.svc/json/GetChildrenUrlInfo?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com
Content-Length: 227


{
"siteUrl":"http:\/\/example.com",
"url":"example.com",
"page":0,
"filterProperties":
{
"__type":"FilterProperties:#Microsoft.Bing.Webmaster.Api",
"CrawlDateFilter":1,
"DiscoveredDateFilter":0,
"DocFlagsFilters":0,
"HttpCodeFilters":0
}
}

JSON response sample

HTTP/1.1 200 OK
Content-Length: 263
Content-Type: application/json; charset=utf-8


{
"d":[
{
"__type":"UrlInfo:#Microsoft.Bing.Webmaster.Api",
"AnchorCount":50,
"DiscoveryDate":"\/Date(1315349995284-0700)\/",
"DocumentSize":0,
"HttpStatus":0,
"IsPage":false,
"LastCrawledDate":"\/Date(1316213995284-0700)\/",
"TotalChildUrlCount":100,
"Url":"example.com"
}]
}

See Also

Show:
© 2014 Microsoft