---
title: "Get Rankings Distribution By Time"
method: POST
path: "/locations/ranking-sitewise-histogram"
tags: ["Rankings"]
---

# Get Rankings Distribution By Time

`POST /locations/ranking-sitewise-histogram`

## Request

- Base URL: `https://api.synup.com/api/v4`
- URL: `https://api.synup.com/api/v4/locations/ranking-sitewise-histogram`
- Auth: none required
- TypeScript: <https://skmtc.dev/synup/apis/synup-api/docs/locations/ranking-sitewise-histogram/post.ts> (a function with typed inputs; its response is checked against the schema)

This API provides the weekly distribution of keyword rankings across four predefined rank buckets (1-3, 3-10, 10-20, 20-50) for each site. It returns the number of keywords falling within each rank range on specific dates for these sites. This helps track keyword performance trends over a time period.

## Headers

- `Authorization` string, required

## Request body

- object
  - `fromDate` string, date, required: Date from where data has to be fetched
  - `toDate` string, date, required: Date till where data has to be fetched
  - `locationIds` string[], required: IDs to fetch data
  - `source` string[], required: List of sources

## Response `200`

Successful response

- object
  - `data` object
    - `rankingsRollupByKeywordCount` object[]
      - `site` string: Source name
      - `keywordCountByBucket` object[]
        - `rankRange` 'rank_from_1_to_3' | 'rank_from_3_to_10' | 'rank_from_10_to_20' | 'rank_from_20_to_50': Rank range bucket
        - `dailyKeywordCount` object[]
          - `rankDate` string, date: Specific date
          - `keywordCount` integer: The value for the date

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/synup/apis/synup-api.md) - [All operations](https://skmtc.dev/synup/apis/synup-api/llms.txt) - [OpenAPI document](https://skmtc.dev/synup/apis/synup-api/revisions/67de2d51c22e?raw)
