SERPHouse
HomePricingAPI PlaygroundLogin
  • Introduction
    • Registration
    • About the SERP API
    • HTTP Status Codes
    • Authentication
    • Rate Limits
    • Webhook
    • Libraries
  • SERP API
    • Getting Started
    • Live (Using HTTP GET method)
    • Live (Using HTTP POST method)
    • Schedule SERP
    • Check SERP Status
    • Get SERP Result
  • Extra APIs
    • Domains List
    • Languages List
    • Locations List
    • Account Info
  • Trend API
    • Trend Search
    • Schedule Search
    • TimeZone List
    • Categories list
    • Country and State list
    • Language list
    • Get Search Result
    • Check Search Status
Powered by GitBook
On this page
  • Get a status of your trend search task
  • Example request:

Was this helpful?

  1. Trend API

Check Search Status

As a response of the API server, you will get a status of your trend search task.

Requires authentication

Get a status of your trend search task

GET https://api.serphouse.com/trends/check

Query Parameters

Name
Type
Description

id*

String

unique identifier of your serp task

Headers

Name
Type
Description

Authorization*

String

Bearer <YOUR_API_KEY>

{
    "status": "success",
    "msg": "Completed",
    "results": ""
}
{
    "status": "error",
    "msg": "validation_error",
    "error": {
        "id": [
            "The id field is required."
        ]
    }
}
{
    "status": "success",
    "msg": "Not found",
    "results": ""
}
{
    "status": "success",
    "msg": "Processing in a queue",
    "results": ""
}
{
    "status": "success",
    "msg": "Waiting for a process",
    "results": ""
}
{
    "status": "error",
    "msg": "Unauthenticated"
}

Example request:

curl --location --request GET 'https://api.serphouse.com/trends/check?id=76850016' \
--header 'Authorization: Bearer <YOUR_API_KEY>'
require "uri"
require "net/http"

url = URI("https://api.serphouse.com/trends/check?id=76850016")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <YOUR_API_KEY>"

response = https.request(request)
puts response.read_body
import requests

url = "https://api.serphouse.com/trends/check?id=76850016"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.serphouse.com/trends/check?id=76850016',
  headers: { 
    'Authorization': 'Bearer <YOUR_API_KEY>'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
<?php
$serphouse = new SERPHouse\SERPHouseClient('YOUR_API_KEY');
$res = $serphouse->trends->check(76850016);
echo $res->getResponse();
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
  .url("https://api.serphouse.com/trends/check?id=76850016")
  .get()
  .addHeader("Authorization", "Bearer <YOUR_API_KEY>")
  .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_KEY>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.serphouse.com/trends/check?id=76850016", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.serphouse.com/trends/check?id=76850016"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
var client = new RestClient("https://api.serphouse.com/trends/check?id=76850016");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <YOUR_API_KEY>");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
PreviousGet Search Result

Last updated 1 year ago

Was this helpful?