Query Samples | Yext Hitchhikers Platform

This query sample section provides you codes for the solution that best fits how you are using Yext. Copy & Paste the corresponding code and you can customize the dataset however you need, this is just a starting point! Feel free to delete or reorder columns and rows as you see fit! Remember to replace [YOUR API KEY] with the key you just generated. You should remove the default code in the Editor.

Site Search Analytics

let
    url = 
"https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = 
[#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = 
{"ANSWERS_CLICK_THROUGH_RATE", "ANSWERS_CLICKS", "ANSWERS_CLUSTERS", "ANSWERS_KG_RESULT_RATE", "ANSWERS_PERCENTAGE_OF_TOTAL_SEARCHES", "ANSWERS_SEARCH_TERMS", "ANSWERS_SEARCHES","ANSWERS_SEARCHES_WITH_CLICKS", "ANSWERS_SEARCHES_WITH_KG_RESULTS", "ANSWERS_SESSIONS", "ANSWERS_THUMBS_DOWN_EVENTS", "ANSWERS_THUMBS_UP_EVENTS", "ANSWERS_VOICE_SEARCHES"}, dimensions = {"ENTITY_IDS", "DAYS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = 
header,Content=Text.ToBinary(body)]))
    in
    Source

Support Search Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"ANSWERS_CASE_DEFLECTION_RATE", "ANSWERS_CASE_DEFLECTIONS", "ANSWERS_CASE_STARTS", "ANSWERS_CASE_SUBMITS", "ANSWERS_CLICK_THROUGH_RATE", "ANSWERS_CLICKS", "ANSWERS_CLUSTERS", "ANSWERS_KG_RESULT_RATE", "ANSWERS_PERCENTAGE_OF_TOTAL_SEARCHES", "ANSWERS_SEARCH_TERMS", "ANSWERS_SEARCHES","ANSWERS_SEARCHES_WITH_CLICKS", "ANSWERS_SEARCHES_WITH_KG_RESULTS", "ANSWERS_SESSIONS", "ANSWERS_THUMBS_DOWN_EVENTS", "ANSWERS_THUMBS_UP_EVENTS", "ANSWERS_VOICE_SEARCHES"}, dimensions = {"DAYS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
in
    Source

Listings Management Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"TICKET_CLICKS", "DUPLICATES_DETECTED", "DUPLICATES_SUPPRESSED", "LISTINGS_LIVE","CLICKS", "CONVERSION_RATE", "CONVERSION_SEARCHES", "CONVERSION_VALUE", "CONVERSIONS", "SESSIONS", "VALUE_PER_CONVERSION"}, dimensions = {"DAYS", "ENTITY_IDS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source

Listings Management - Social Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"FACEBOOK_CHECKINS", "FACEBOOK_CTA_CLICKS", "FACEBOOK_IMPRESSIONS", "FACEBOOK_LIKES", "FACEBOOK_PAGE_VIEWS", "FACEBOOK_POST_IMPRESSIONS", "FACEBOOK_TALKING_ABOUT", "FOURSQUARE_DAILY_CHECKINS", "GOOGLE_USER_PHOTOS", "INSTAGRAM_POSTS", "SOCIAL_ACTIVITIES", "CLICKS", "CONVERSION_RATE", "CONVERSION_SEARCHES", "CONVERSION_VALUE", "CONVERSIONS", "SESSIONS", "VALUE_PER_CONVERSION"}, dimensions = {"DAYS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source

Listings Management - Search Tracking Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"IST_AD_MATCHES", "IST_AD_PRESENCE", "IST_AVERAGE_FIRST_LOCAL_PACK_MATCH_POSITION", "IST_AVERAGE_FIRST_MATCH_POSITION", "IST_AVERAGE_FIRST_ORGANIC_MATCH_POSITION", "IST_AVERAGE_LOCAL_PACK_NUMBER_OF_RESULTS", "IST_AVERAGE_LOCAL_PACK_POSITION", "IST_LOCAL_PACK_EXISTED", "IST_KNOWLEDGE_CARD_EXISTED", "IST_LOCAL_PACK_PRESENCE", "IST_LOCAL_PACK_SHARE_OF_SEARCH", "IST_MATCHES_PER_SEARCH", "IST_ORGANIC_SHARE_OF_SEARCH", "IST_SEARCH_REQUESTS", "IST_SHARE_OF_INTELLIGENT_SEARCH", "IST_TOTAL_MATCHES"}, dimensions = {"DAYS", "IST_KEYWORD", "IST_QUERY_TEMPLATE", "IST_SEARCH_ENGINE", "ENTITY_IDS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source

Reputation Management - Review Response Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"AVERAGE_RATING", "NEW_REVIEWS", "RESPONSE_COUNT", "RESPONSE_RATE", "RESPONSE_TIME"}, dimensions = {"DAYS", "REVIEW_KEYWORDS", "RATINGS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
   in
    Source

Reputation Management - Review Sentiment Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"AVERAGE_RATING", "NEW_REVIEWS", "KEYWORD_MENTIONS", "KEYWORD_SENTIMENT"}, dimensions = {"DAYS", "RATINGS", "SENTIMENT_COLLECTION", "PARTNERS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source

Location Pages Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = { "STOREPAGES_CALLTOACTIONCLICKS", "STOREPAGES_PHONECALLS", "STOREPAGES_CLICKSTOWEBSITE", "STOREPAGES_DRIVINGDIRECTIONS", "GSC_CLICKS", "GSC_CTR", "GSC_IMPRESSIONS", "GSC_POSITION", "STOREPAGES_PAGEVIEWS", "STOREPAGES_SESSIONS"}, dimensions = {"STOREPAGES_PAGE_URL", "DAYS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source

Pages Analytics

let
    url = "https://api.yextapis.com/v2/accounts/me/analytics/reports?&v=20220310&api_key=[YOUR API KEY]",
    header = [#"Content-Type"="application/json",#"Accept"="application/json"],
    body = Text.FromBinary(Json.FromValue([metrics = {"STOREPAGES_CALLTOACTIONCLICKS", "STOREPAGES_PHONECALLS", "STOREPAGES_CLICKSTOWEBSITE", "STOREPAGES_DRIVINGDIRECTIONS", "GSC_CLICKS", "GSC_CTR", "GSC_IMPRESSIONS", "GSC_POSITION", "STOREPAGES_PAGEVIEWS", "STOREPAGES_SESSIONS", "CLICKS", "CONVERSION_RATE", "CONVERSION_SEARCHES", "CONVERSION_VALUE", "CONVERSIONS", "SESSIONS", "VALUE_PER_CONVERSION"}, dimensions = { "DAYS"}])),
    Source = Json.Document(Web.Contents(url,[Headers = header,Content=Text.ToBinary(body)]))
    in
    Source
Feedback