Schedule Search

All POST data should be sent in the JSON format (UTF-8 encoding). The task setting is done using the POST method when the array of tasks is sent into json format. We recommend to set up to 100 tasks at a time. Such limits were set due to the variations of task setting methods that you may use.

Requires authentication

POST https://api.serphouse.com/trends/schedule

Headers

NameTypeDescription

Authorization*

String

Bearer <YOUR_API_KEY>

Content-Type*

String

application/json

Request Body

NameTypeDescription

time_zone_offset*

integer

Pass Timezone offset. You can receive the list of available timezone of google trend with their offset value by making a separate request to the List of timezone and offset

keywords*

string

Search keyword single google or multiple google, youtube, yahoo Note:- maximum 5 string search.

time*

string

now 1-H - Return past hour result now 4-H Return past 4 hours result now 1-d Return past 1 day result now 7-d Return past 7 days result today 1-m Return past 1 month result today 3-m Return past 3 months result today 12-m Return past 1 year result today 5-y Return past 5 years result 2021-01-24 2021-02-25 To extract custom date range result

property

string

property should contain bellow list only. "" - Web Search(Default) images - Image Search news - News Search froogle - Google Shopping youtube - YouTube Search

category

integer

by Default category is 0 for all categories. You can receive the list of available categories of google trend with their sub category by making a separate request to the List of Categories

geo

string

by Default geo is "" for Worldwide. You can receive the list of available geo of google trend with their state by making a separate request to the List of Country and State.

langauge_code

string

by Default language code is "en". You can receive the list of available language of google trend with their ids by making a separate request to the List of Language.

postback_url

url

return URL for sending task results If you specify the Postback URL there will be no need to use Get Trend search Tasks Results for obtaining results. We will send the result of a completed task by a POST request to the URL as soon as the task is completed. You can change your webhook setting from Webhook Settings Page.

pingback_url

url

Pingback URL is Notification URL of a completed task, When a task is completed we will notify you by GET request sent to the URL you have specified. You can change your webhook setting from Webhook Settings Page.

{
    "status": "success",
    "msg": "Task(s) successfully scheduled",
    "results": [
        {
            "status": 0,
            "cronned": 0,
            "user_id": 4281,
            "se": "",
            "q": "google",
            "domain": "trends.google.com",
            "lang": "en",
            "country_iso": null,
            "loc": "US",
            "lat": null,
            "long": null,
            "device": "desktop",
            "serp_type": "trends",
            "verbatim": 0,
            "pingback_url": "https://webhook.site/277a9716-691d-4255-be89-a5f8f0240b58",
            "postback_url": "https://webhook.site/277a9716-691d-4255-be89-a5f8f0240b58",
            "is_scheduled": 1,
            "page": 0,
            "time_zone_offset": -330,
            "time": "now 1-d",
            "category": 0,
            "property": "youtube",
            "updated_at": "2023-05-27T06:43:44.000000Z",
            "created_at": "2023-05-27T06:43:44.000000Z",
            "id": 76849564
        }
    ]
}

Example request:

curl --location --request POST 'https://api.serphouse.com/trends/schedule' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data" : [
        {
            "time_zone_offset": -330,
            "keywords": "google",
            "time": "now 1-d",
            "property": "youtube",
            "category": 0,
            "geo": "us",
            "langauge_code": "en",
            "postback_url": "https:\/\/webhook.site\/277a9716-691d-4255-be89-a5f8f0240b58",
            "pingback_url": "https:\/\/webhook.site\/277a9716-691d-4255-be89-a5f8f0240b58"
        }
    ]
}'

Last updated