Analytics

Fetch date statistics for a website

Retrieves date-based analytics statistics for a specific website. Returns a RankingStatsForFrontend object with global stats, date statistics, and source information.

post/analytics/website/date

Request

  • Base URL
    https://api.foudroyer.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

websiteIdstring required

The ID of the website to fetch analytics for

orderBy'clicks' | 'click_through_rate' | 'impressions' | 'position' | 'date'

Order by field for sorting results

Example request

{
  "websiteId": "website-123",
  "filter": {
    "source": "google",
    "query": "example query",
    "country": "US",
    "device": "desktop",
    "page": "https://example.com/page",
    "from": "2024-01-01",
    "to": "2024-01-31"
  },
  "orderBy": "clicks"
}

Response

Analytics statistics including date stats and global metrics

Example response

{
  "global": {
    "clicks": 1000,
    "previous_clicks": 500,
    "impressions": 10000,
    "previous_impressions": 5000,
    "position": 5.2,
    "previous_position": 10.5,
    "click_through_rate": 10.5,
    "previous_click_through_rate": 10
  },
  "date": [
    {
      "clicks": 100,
      "impressions": 1000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ],
  "sources": [
    {
      "source": "google",
      "clicks": 1000,
      "impressions": 10000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ],
  "devices": [
    {
      "clicks": 100,
      "impressions": 1000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ],
  "query": [
    {
      "clicks": 100,
      "impressions": 1000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ],
  "countries": [
    {
      "clicks": 100,
      "impressions": 1000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ],
  "pages": [
    {
      "clicks": 100,
      "impressions": 1000,
      "position": 5.2,
      "click_through_rate": 10.5
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.