IWebmasterApi.GetUrlTrafficInfo(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 traffic details for single page
public:
Microsoft::Bing::Webmaster::Api::Interfaces::UrlTrafficInfo ^ GetUrlTrafficInfo(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.UrlTrafficInfo GetUrlTrafficInfo (string siteUrl, string url);
abstract member GetUrlTrafficInfo : string * string -> Microsoft.Bing.Webmaster.Api.Interfaces.UrlTrafficInfo
Public Function GetUrlTrafficInfo (siteUrl As String, url As String) As UrlTrafficInfo
Parameters
- siteUrl
- String
- url
- String
Returns
- Attributes
Examples
XML request sample
GET /webmaster/api.svc/pox/GetUrlTrafficInfo?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: 255
Content-Type: application/xml; charset=utf-8
<UrlTrafficInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Clicks>10</Clicks>
<Impressions>100</Impressions>
<IsPage>false</IsPage>
<Url>example.com</Url>
</UrlTrafficInfo>
JSON request sample
GET /webmaster/api.svc/json/GetUrlTrafficInfo?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: 128
Content-Type: application/json; charset=utf-8
{
"d":
{
"__type":"UrlTrafficInfo:#Microsoft.Bing.Webmaster.Api",
"Clicks":10,
"Impressions":100,
"IsPage":false,
"Url":"example.com"
}
}
Remarks
"domain:" prefix can be used to get information for domain. For example: domain:bing.com