curl "https://api.scrapingdog.com/amazon/autocomplete?api_key=5eaa61a6e562fc52fe763tr516e4653&domain=com&prefix=spoon"
import requests
# API URL and key
api_url = "https://api.scrapingdog.com/amazon/autocomplete"
api_key = "5eaa61a6e562fc52fe763tr516e4653"
# Search parameters
domain = "com"
prefix = "spoon"
# Create a dictionary with the query parameters
params = {
"api_key": api_key,
"prefix": prefix
}
# Send the GET request with the specified parameters
response = requests.get(api_url, params=params)
# Check if the request was successful (status code 200)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"HTTP Request Error: {response.status_code}")
const axios = require('axios');
// API URL and key
const apiURL = 'https://api.scrapingdog.com/amazon/autocomplete';
const apiKey = '5eaa61a6e562fc52fe763tr516e4653';
// Search parameters
const prefix = 'spoon';
// Create an object with the query parameters
const params = {
api_key: apiKey,
prefix: prefix
};
// Send a GET request with the specified parameters
axios
.get(apiURL, { params: params })
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error('HTTP Request Error:', error);
});
<?php
// API URL and key
$apiURL = 'https://api.scrapingdog.com/amazon/autocomplete';
$apiKey = '5eaa61a6e562fc52fe763tr516e4653';
// Search parameters
$prefix = 'spoon';
// Create an array with the query parameters
$params = [
'api_key' => $apiKey,
'prefix' => $prefix
];
// Initialize cURL session
$ch = curl_init();
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $apiURL . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and get the response
$response = curl_exec($ch);
// Check for cURL errors
if (curl_errno($ch)) {
echo 'cURL error: ' . curl_error($ch);
}
// Close cURL session
curl_close($ch);
// Parse and use the response data
if ($response) {
$jsonData = json_decode($response, true);
print_r($jsonData);
} else {
echo 'No response received.';
}
require 'net/http'
require 'json'
api_url = 'https://api.scrapingdog.com/amazon/autcomplete'
api_key = '5eaa61a6e562fc52fe763tr516e4653'
query = 'spoon'
params = {
'api_key' => api_key,
'query' => query
}
uri = URI(api_url)
uri.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(uri)
if response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)
puts data
else
puts "Request failed with status code #{response.code}"
end
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
String apiURL = "https://api.scrapingdog.com/amazon/autocomplete";
String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
String prefix = "spoon";
try {
// Create the URL with query parameters
URL url = new URL(apiURL + "?api_key=" + apiKey + '"&prefix=" + prefix);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// Set the request method to GET
connection.setRequestMethod("GET");
// Get the response code
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
// Read the response data
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
}
reader.close();
// Print the response data
System.out.println(response.toString());
} else {
System.out.println("Request failed with response code: " + responseCode);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
[
{
"type": "KEYWORD",
"keyword": "cricket noise maker prank"
},
{
"type": "KEYWORD",
"keyword": "cricket printer"
},
{
"type": "KEYWORD",
"keyword": "cricket"
},
{
"type": "KEYWORD",
"keyword": "cricket bat"
},
{
"type": "KEYWORD",
"keyword": "live crickets"
},
{
"type": "KEYWORD",
"keyword": "cricket phones"
},
{
"type": "KEYWORD",
"keyword": "cricket keeper"
},
{
"type": "KEYWORD",
"keyword": "live crickets for reptiles"
},
{
"type": "KEYWORD",
"keyword": "cricket ball"
},
{
"type": "KEYWORD",
"keyword": "cricket shoes men"
}
]