Google Trends

FREEMIUM
Durch News.Agent-API | Aktualisiert vor einem Jahr | News, Media
Popularität

8.9 / 10

Latenz

1,384ms

Service Level

100%

Zurück zu allen Tutorials (4)

How to use - /api/v1/DailyTrendingSearchDetails Endpoint

The aim of this tutorial is to explain below items:

  1. API endpoint name: /api/v1/DailyTrendingSearchDetails
  2. API endpoint accepting parameters: /{requestId}/{searchToken}
  3. How to use this API method.

This is the second API endpoint you will need to call in order to access real time Google trends. It is accepting four (2) parameters , please see below for further details:

  1. {requestId} - This is a reference Id for you , so you can keep track when the API respond back to your call and in the respond it has the same request Id which you have sent in the request.
  2. {searchToken} - This is the token for the desired news title which you have received by calling /api/v1/DailyTrendingSearches Endpoint. As we explained from the response of (/api/v1/DailyTrendingSearches Endpoint) you will receive a collection of trending news titles, and once you have picked one of them, you can use it’s search token in this API method to query and get more details.

Once you are familiar with above parameters, now it is time to know how to consume this API. Please see below simple steps:

Prepare your request:

  1. We hope you are using this API for a product or a project, so you can stick to your favorite programming language.
  2. Once you pick the programming language , all you have to do is, Use it’s HTTP client module to connect to this API.
  3. Rapid API also has put some examples so you could never go wrong.
  4. In your HTTP client module , please set the HTTP URL as : https://google-trends.p.rapidapi.com/api/v1/DailyTrendingSearchDetails
  5. In your HTTP client module , please set the HTTP method as: GET
  6. Also you need to pass all the above parameters in this way: https://google-trends.p.rapidapi.com/api/v1/DailyTrendingSearchDetails/Ref12345/34ddf340-3f3gve34-fer4er-344534
  7. Also if you have subscribed to our API you should already have an API KEY, you need to add that as a herder key:value as below, into the HTTP request header section:
  8. x-rapidapi-key : {YOUR RAPID API KEY}

Using response :

  1. Once you have done above steps, Please see below which explain how to consume the response.
  2. In the response you would see below data
    {
    “errorMessage”: “NULL”,
    “friendlyFormattedDate”: “Wednesday, 23 September 2020”,
    “googleTrendingSearchBasicDetails”: [
    {
    “estimatedTraffic”: “20K+”,
    “friendlyShareUrl”: “https://trends.google.com/trends/trendingsearches/daily?geo=AU&tt=Luton+Town+vs+Man+United#Luton Town vs Man United”,
    “primaryArticleDetails”: {
    “articleImage”: “https://t1.gstatic.com/images?q=tbn:ANd9GcQIgU0jUnF-dZ9xK4UNZvV7pRjjV5q4ptl23Z5PoxMe_rlF8zoUWzs3ZrXL6UFvFAvDnR4XqRqW”,
    “articleURl”: “https://www.espn.com/soccer/report?gameId=583462”,
    “source”: “ESPN”
    },
    “relatedSearchQueries”: [
    {
    “queryName”: “Manchester United”
    },
    {
    “queryName”: “Carabao Cup”
    },
    {
    “queryName”: “Man Utd”
    }
    ],
    “requestSearchToken”: “749d54e2-5f1f-4305-a10b-1a4be78b94c5:AU-20200923”,
    “searchTitle”: “Luton Town vs Man United”
    }
    ],
    “tokenExpirationTime”: “Wednesday, 23 September 2020 21:44:38”,
    “tokenExpirationTimeInUtc”: “Wednesday, 23 September 2020 11:44:38”,
    “userRequestId”: “123”,
    “userSearchToken”: “749d54e2-5f1f-4305-a10b-1a4be78b94c5:AU-20200923”
    }
  3. As you can see above response has further details for the requested “Search Token”.
Bewertung: 5 - Stimmen: 1