Get Traffic Data by Keywords
This endpoint returns the traffic data by keyword for a specific traffic segment and timeframe.
Note: This endpoint will return data only if SEOmonitor pulled Google Search Console and/or Google Analytics data for the selected timeframe through an active connection.
Request
(Required) This parameter specifies the ID of the campaign for which you want to return data.
Please refer to the Quick Start Guide to learn how to retrieve the IDs of your campaigns.
(Required) This parameter specifies the start date of the timeframe for which you want to return the data, in YYYY-MM-DD format.
(Required) This parameter specifies the end date of the timeframe for which you want to return the data, in YYYY-MM-DD format.
The name assigned to the segment in the platform.
Accepted values are all
, non-brand
, brand
, or the name of a custom traffic segment created in the SEOmonitor platform, e.g. "blog".
Unless otherwise specified, data will be returned for the Non-Brand segment by default.
This parameter determines the maximum number of records to return in a single request.
Maximum Value: 1000 records per request
If you do not specify a limit
, the default number of records returned per request will be 100.
This parameter specifies the starting point within the collection of resource results. It's typically used with the limit
parameter to implement pagination.
If you do not specify an offset
, the API will start from the first record.
This parameter enables you to sort the returned data based on a specified field.
The field names you can use to sort data are:
avg_position
sessions
transactions
goals
transactions_revenue
goals_revenue
If you do not specify an order_direction
, the default is asc
, which means the API will sort the data in ascending order.
This parameter determines the sorting direction of the order_by
field. You can sort the data in either ascending (asc
) or descending (desc
) order.
If the tracking_status
is not specified, data for all keywords is returned.
This parameter enables you to filter the results based on the keyword property of being tracked in the SEOmonitor platform. Allowed values are tracked
, untracked
, and all
.
If the tracking_status
is not specified, data for all keywords is returned.
The search
parameter allows you to filter the results based on a keyword search. The API will return only those records where the keyword matches (fully or partially) the provided search term.
The search parameter is case-insensitive, allowing partial matches irrespective of casing.
Request samples
Responses
{
"keyword": "<string>",
"tracked_keyword_id": "<integer>",
"brand": "<boolean>",
"current_page": "<string>",
"gsc_data": {
"impressions": "<integer>",
"clicks": "<integer>",
"avg_position": "<integer>"
},
"analytics_data": {
"sessions": "<integer>",
"ecommerce": {
"conversions": "<integer>",
"revenue": "<integer>"
},
"goals": {
"completions": "<integer>",
"revenue": "<integer>"
}
}
}