Skip to content
On this page

Data Series

Using Nightwatch API, you can retrieve data series for the following resources:

  • URL and Competitor URLs
  • Keyword
  • Keyword View
  • Group

All series are represented by an array of date-value pairs, which you can use to visualize graphs and calculate statistics.

URL Series

shell
curl 'https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN&url_ids[]=161490&date_from=2019-04-02&date_to=2019-07-01&with_competitors=false'

The above command returns JSON structured like this:

json
[{
  url_id: 161490,
  url: "example.com",
  url_series: [
    {
      name: "average_position",
      series:  [["2019-04-22", 100], ...]
    }, ...
  ],
  competitor_series: [
    {
      competitor_id: 123,
      competitor_url: "example.com",
      name: "average_position",
      series:  [["2019-04-22", 3], ...]
    }, ...
  ]
]

HTTP Request

GET https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN

ParameterDescription
url_ids*Array of URL ids
with_competitorsInclude competititor URL series (true or false, default: true)
date_from*Start date for series in YYYY-MM-DD format (e.g 2019-01-02)
date_to*End date for series in YYYY-MM-DD format (e.g. 2019-04-02)

Parameters marked with * are mandatory.

Available URL series:

SeriesDescription
average_positionAverage rank position
search_visibility_indexSearch visibility index (more info)
click_potentialClick potential (more info)
keyword_distributionDistribution of keyword positions in Top 3, Top 10, Top 100, No rank
total_keywordsNumber of keywords tracked
indexed_pagesNumber of indexed pages on Google
clicksNumber of organic search clicks (when Search Console property is connected)
impressionsNumber of organic search impressions (when Search Console property is connected)
sessionsNumber of Google Analytics Sessions (when Google Analytics property is connected)
pageviewsNumber of Google Analytics Pageviews (when Google Analytics property is connected)
usersNumber of Google Analytics Users (when Google Analytics property is connected)
search_console_positionSearch Console average position (when Search Console property is connected)
ctrSearch Console CTR (when Search Console property is connected)

Keyword series

shell
curl 'https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN&keyword_ids[]=1212189&date_from=2019-06-04&date_to=2019-07-04'

The above command returns JSON structured like this:

json
[{
  keyword_id: 1212189,
  keyword: "goji berries",
  keyword_series: [
    {
      name: "position",
      series:  [["2019-04-22", 3], ...]
    }, ...
  ],
  competitor_series: [
    {
      competitor_id: 123,
      competitor_url: "example.com",
      name: "position",
      series:  [["2019-04-22", 3], ...]
    }, ...
  ]
]

HTTP Request

GET https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN

ParameterDescription
keyword_ids*Array of keyword ids
date_from*Start date for series in YYYY-MM-DD format (e.g 2019-01-02)
date_to*End date for series in YYYY-MM-DD format (e.g. 2019-04-02)

Parameters marked with * are mandatory.

Available keyword series:

SeriesDescription
positionKeyword's rank
position_organicKeyword's organic rank
position_local_packKeyword's local pack rank
position_placesKeywords rank in Google Places (when engine is Google Places)
position_places_imageKeywords rank in image carousel (when engine is Google)
clicksNumber of organic search clicks (when Search Console property is connected)
impressionsNumber of organic search impressions (when Search Console property is connected)
search_console_positionSearch Console average position (when Search Console property is connected)
ctrSearch Console CTR (when Search Console property is connected)

Keyword view series

shell
curl 'https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN&dynamic_view_ids[]=123&date_from=2019-06-04&date_to=2019-07-04'
json
[{
  dynamic_view_id: 161490,
  dynamic_view_name: "A view"
  dynamic_view_series: [
    {
      name: "average_position",
      series:  [["2019-06-04", 10], ...]
    }, ...
  ]
]

HTTP Request

GET https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN

ParameterDescription
dynamic_view_ids*Array of keyword view ids
date_from*Start date for series in YYYY-MM-DD format (e.g 2019-01-02)
date_to*End date for series in YYYY-MM-DD format (e.g. 2019-04-02)

Parameters marked with * are mandatory.

Available keyword series:

SeriesDescription
average_positionAverage rank position
search_visibility_indexSearch visibility index (more info)
click_potentialClick potential (more info)
keyword_distributionDistribution of keyword positions in Top 3, Top 10, Top 100, No rank
total_keywordsNumber of keywords that fall into view's filters on specified days
up_downNumber of keywords whose position increased and decreased

Group series

shell
curl 'https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN&url_group_ids[]=123&date_from=2019-06-04&date_to=2019-07-04'
json
[{
  url_group_id: 123,
  url_group_name: "A group"
  url_group_series: [
    {
      name: "average_position",
      series:  [["2019-06-04", 10], ...]
    }, ...
  ]
]

HTTP Request

GET https://api.nightwatch.io/api/v1/series?access_token=ACCESS_TOKEN

ParameterDescription
url_group_ids*Array of group ids
date_from*Start date for series in YYYY-MM-DD format (e.g 2019-01-02)
date_to*End date for series in YYYY-MM-DD format (e.g. 2019-04-02)

Parameters marked with * are mandatory.

Available keyword series:

SeriesDescription
average_positionAverage rank position
search_visibility_indexSearch visibility index (more info)
click_potentialClick potential (more info)
keyword_distributionDistribution of keyword positions in Top 3, Top 10, Top 100, No rank
total_keywordsNumber of keywords in the group on specified days
up_downNumber of keywords whose position increased and decreased