Skip to main content
POST
/
html-source-code-search
Search HTML Source Code
curl --request POST \
  --url https://api.growthmarketing.ai/html-source-code-search \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "search_terms": [
    "data-attrid"
  ],
  "order_by": [
    "last_visited,desc"
  ],
  "limit": 10,
  "offset": 0
}
'
import requests

url = "https://api.growthmarketing.ai/html-source-code-search"

payload = {
"search_terms": ["data-attrid"],
"order_by": ["last_visited,desc"],
"limit": 10,
"offset": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search_terms: ['data-attrid'],
order_by: ['last_visited,desc'],
limit: 10,
offset: 0
})
};

fetch('https://api.growthmarketing.ai/html-source-code-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.growthmarketing.ai/html-source-code-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'search_terms' => [
'data-attrid'
],
'order_by' => [
'last_visited,desc'
],
'limit' => 10,
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.growthmarketing.ai/html-source-code-search"

payload := strings.NewReader("{\n \"search_terms\": [\n \"data-attrid\"\n ],\n \"order_by\": [\n \"last_visited,desc\"\n ],\n \"limit\": 10,\n \"offset\": 0\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.growthmarketing.ai/html-source-code-search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"search_terms\": [\n \"data-attrid\"\n ],\n \"order_by\": [\n \"last_visited,desc\"\n ],\n \"limit\": 10,\n \"offset\": 0\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.growthmarketing.ai/html-source-code-search")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"search_terms\": [\n \"data-attrid\"\n ],\n \"order_by\": [\n \"last_visited,desc\"\n ],\n \"limit\": 10,\n \"offset\": 0\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "total_count": 1233,
    "items_count": 2,
    "offset": 0,
    "offset_token": "eyJDdXJyZW50T2Zmc2V0IjoyLCJSYXdSZXF1ZXN0...",
    "items": [
      {
        "type": "domain_technology_item",
        "domain": "example.com",
        "title": "Example Website Title",
        "description": "Example website description",
        "meta_keywords": [
          "keyword1",
          "keyword2"
        ],
        "domain_rank": 537,
        "last_visited": "2024-12-21 15:49:23 +00:00",
        "country_iso_code": "GB",
        "language_code": "en",
        "content_language_code": "en",
        "emails": [
          "contact@example.com"
        ],
        "social_graph_urls": [
          "https://twitter.com/example"
        ],
        "technologies": {
          "other": {
            "widgets": [
              "AddThis",
              "Twitter"
            ]
          },
          "web_development": {
            "javascript_libraries": [
              "Axios",
              "jQuery"
            ]
          }
        }
      }
    ]
  }
}
{
"success": false,
"error": "Error message",
"details": "Additional error details"
}
{
"success": false,
"error": "Error message",
"details": "Additional error details"
}

Authorizations

X-API-Key
string
header
required

Body

application/json
search_terms
string[]
required

Array of strings to search for in the HTML source code

Example:
["data-attrid"]
order_by
string[]

Array of strings specifying the sorting order (e.g., 'last_visited,desc')

Example:
["last_visited,desc"]
limit
integer
default:10

Maximum number of results to return per page

Example:

10

offset
integer
default:0

Number of results to skip for pagination

Example:

0

Response

Successful response

success
boolean
Example:

true

data
object