API
Sprachenliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Sprachen. |
| └ lang_id | Nummer | Eindeutige Sprachkennung. |
| └ name | String | Sprachname auf Englisch. |
| └ iso_code | String | ISO-Sprachcode (z.B. "EN" für Englisch, "DE" für Deutsch). |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/languages');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Länderliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Länder. |
| └ country_id | Nummer | Eindeutige Länderkennung. |
| └ name | String | Ländername auf Englisch. |
| └ iso_code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/countries');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Browserliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Browser. |
| └ browser_id | Nummer | Eindeutige Browserkennung. |
| └ name | String | Browsername. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/browsers');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Geräteliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Gerätetypen. |
| └ device_id | Nummer | Eindeutige Gerätetyp-Kennung. |
| └ name | String | Anzeigename des Gerätetyps. |
| └ value | String | Gerätetyp-Wert für API-Anfragen. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/devices');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Betriebssystemliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Betriebssysteme. |
| └ os_id | Nummer | Eindeutige Betriebssystem-Kennung. |
| └ name | String | Anzeigename des Betriebssystems. |
| └ value | String | Betriebssystem-Wert für API-Anfragen. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/operating_systems');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Werbenetzwerkliste abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Array | Array verfügbarer Werbenetzwerke. |
| └ network_id | Nummer | Eindeutige Werbenetzwerk-Kennung. |
| └ name | String | Anzeigename des Werbenetzwerks. |
| └ value | String | Werbenetzwerk-Wert für API-Anfragen. |
| └ logo | String | URL zum Werbenetzwerk-Logo. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/filters/advertising_networks');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = ['api_key' => 'YOUR_API_KEY'];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Push-Creatives suchen
Suche nach Push-Creatives mit verschiedenen Filtern.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| limit | Nummer | Nein | Anzahl der Elemente pro Seite (10-100). Standard: 10. |
| offset | Nummer | Nein | Anzahl der zu überspringenden Elemente. Wird für Paginierung verwendet. Standard: 0. |
| keyword | String | Nein | Suchbegriff zum Filtern von Creatives nach Titel oder Beschreibung. |
| countries | Array | Nein | Array von ISO-2-Ländercodes (z.B. ["US", "GB", "DE"]). |
| country_ids | Array | Nein | Array von Länder-IDs vom Endpunkt /api/filters/countries. Hat Vorrang vor countries. |
| languages | Array | Nein | Array von ISO-Sprachcodes (z.B. ["EN", "DE", "FR"]). |
| lang_ids | Array | Nein | Array von Sprach-IDs vom Endpunkt /api/filters/languages. Hat Vorrang vor languages. |
| advertising_networks | Array | Nein | Array von Werbenetzwerk-Namen. |
| network_ids | Array | Nein | Array von Netzwerk-IDs vom Endpunkt /api/filters/advertising-networks. Hat Vorrang vor advertising_networks. |
| browsers | Array | Nein | Array von Browser-Namen. |
| browser_ids | Array | Nein | Array von Browser-IDs vom Endpunkt /api/filters/browsers. Hat Vorrang vor browsers. |
| operating_systems | Array | Nein | Array von Betriebssystem-Werten (z.B. ["windows", "macos", "android"]). |
| devices | Array | Nein | Array von Gerätetypen (z.B. ["desktop", "mobile", "tablet"]). |
| date_from | String | Nein | Startdatum für Filterung (Format: Y-m-d, z.B. "2025-01-01"). |
| date_to | String | Nein | Enddatum für Filterung (Format: Y-m-d, z.B. "2025-12-31"). |
| sort_by | String | Nein | Sortierfeld: creation, activity, popularity. |
| sort_order | String | Nein | Sortierrichtung: asc oder desc. |
| only_adult | Boolean | Nein | Nur Erwachsenen-Inhalte filtern. Boolean (true/false). |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Object | Array von Flow-Daten, die der Anfrage entsprechen. |
| └ format | String | Creative-Format (push, inpage, facebook, tiktok). |
| └ items | Array | Array von Creative-Objekten. |
| └ id | Nummer | Eindeutige Creative-Kennung. |
| └ title | String | Creative-Titeltext. |
| └ description | String | Creative-Beschreibungstext. |
| └ category | String | Creative-Format/Kategorie (push, inpage, facebook, tiktok). |
| └ country | Object | Länderinformations-Objekt (code, name, iso_code_3). |
| └ code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ name | String | Ländername auf Englisch. |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
| └ file_size | String | Formatierte Gesamtdateigröße. |
| └ icon_url | String | URL zum Creative-Icon-Bild. |
| └ landing_url | String | Landingpage-URL. |
| └ created_at | String | Creative-Erstellungsdatum (Y-m-d Format). |
| └ last_seen_at | String / null | Datum der letzten Sichtung des Creatives in der Quelle (Y-m-d), oder null, falls unbekannt. |
| └ advertising_networks | Array | Array von Werbenetzwerk-Namen. |
| └ languages | Array | Array von ISO-Sprachcodes. |
| └ operating_systems | Array | Array von Betriebssystem-Werten. |
| └ browsers | Array | Array von Browser-Namen. |
| └ devices | Array | Array von Gerätetypen. |
| └ main_image_url | String | URL zum Hauptbild des Creative. |
| └ is_adult | Boolean | Ob das Creative Erwachsenen-Inhalt enthält. |
| └ is_active | Boolean | Ob das Creative derzeit aktiv ist. |
| └ pagination | Object | Paginierungsinformations-Objekt. |
| └ total | Nummer | Gesamtzahl der Creatives, die den Filtern entsprechen. |
| └ limit | Nummer | Anzahl der Elemente pro Seite. |
| └ offset | Nummer | Aktueller Offset. |
| └ has_more | Boolean | Ob weitere Elemente verfügbar sind. |
| └ returned_count | Nummer | Anzahl der in dieser Antwort zurückgegebenen Elemente. |
| └ filters_applied | Object | Objekt mit den angewendeten Filtern. |
| └ timestamp | String | Antwort-Zeitstempel im ISO 8601-Format. |
<?php
function searchPushCreatives($params = [])
{
$ch = curl_init('https://spy.house/api/search/push');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if (!empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
return null;
}
// Example 1: Basic search with API key
$params = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
];
$result = searchPushCreatives($params);
if ($result && $result['status'] === 'success') {
foreach ($result['data']['items'] as $creative) {
echo "ID: " . $creative['id'] . " - " . $creative['title'] . "\n";
}
echo "Total: " . $result['data']['pagination']['total'] . "\n";
}
// Example 2: Search with ISO codes/names filters
$paramsWithFilters = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US', 'GB', 'DE'], // ISO-2 codes
'languages' => ['EN'], // ISO codes
'browsers' => ['Chrome', 'Firefox'], // Browser names
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$filteredResult = searchPushCreatives($paramsWithFilters);
// Example 3: Search with ID-based filters (recommended)
// Use IDs from /api/filters/* endpoints for better performance
$paramsWithIds = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'country_ids' => [1, 2, 3], // IDs from /api/filters/countries
'lang_ids' => [1], // IDs from /api/filters/languages
'network_ids' => [5, 10], // IDs from /api/filters/advertising-networks
'browser_ids' => [1, 2], // IDs from /api/filters/browsers
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$resultWithIds = searchPushCreatives($paramsWithIds);
// Note: ID-based filters take precedence over name-based filters
// If both country_ids and countries are provided, country_ids will be used
Inpage-Creatives suchen
Suche nach Inpage-Creatives mit verschiedenen Filtern.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| limit | Nummer | Nein | Anzahl der Elemente pro Seite (10-100). Standard: 10. |
| offset | Nummer | Nein | Anzahl der zu überspringenden Elemente. Wird für Paginierung verwendet. Standard: 0. |
| keyword | String | Nein | Suchbegriff zum Filtern von Creatives nach Titel oder Beschreibung. |
| countries | Array | Nein | Array von ISO-2-Ländercodes (z.B. ["US", "GB", "DE"]). |
| country_ids | Array | Nein | Array von Länder-IDs vom Endpunkt /api/filters/countries. Hat Vorrang vor countries. |
| languages | Array | Nein | Array von ISO-Sprachcodes (z.B. ["EN", "DE", "FR"]). |
| lang_ids | Array | Nein | Array von Sprach-IDs vom Endpunkt /api/filters/languages. Hat Vorrang vor languages. |
| advertising_networks | Array | Nein | Array von Werbenetzwerk-Namen. |
| network_ids | Array | Nein | Array von Netzwerk-IDs vom Endpunkt /api/filters/advertising-networks. Hat Vorrang vor advertising_networks. |
| browsers | Array | Nein | Array von Browser-Namen. |
| browser_ids | Array | Nein | Array von Browser-IDs vom Endpunkt /api/filters/browsers. Hat Vorrang vor browsers. |
| operating_systems | Array | Nein | Array von Betriebssystem-Werten (z.B. ["windows", "macos", "android"]). |
| devices | Array | Nein | Array von Gerätetypen (z.B. ["desktop", "mobile", "tablet"]). |
| date_from | String | Nein | Startdatum für Filterung (Format: Y-m-d, z.B. "2025-01-01"). |
| date_to | String | Nein | Enddatum für Filterung (Format: Y-m-d, z.B. "2025-12-31"). |
| sort_by | String | Nein | Sortierfeld: creation, activity, popularity. |
| sort_order | String | Nein | Sortierrichtung: asc oder desc. |
| only_adult | Boolean | Nein | Nur Erwachsenen-Inhalte filtern. Boolean (true/false). |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Object | Array von Flow-Daten, die der Anfrage entsprechen. |
| └ format | String | Creative-Format (push, inpage, facebook, tiktok). |
| └ items | Array | Array von Creative-Objekten. |
| └ id | Nummer | Eindeutige Creative-Kennung. |
| └ title | String | Creative-Titeltext. |
| └ description | String | Creative-Beschreibungstext. |
| └ category | String | Creative-Format/Kategorie (push, inpage, facebook, tiktok). |
| └ country | Object | Länderinformations-Objekt (code, name, iso_code_3). |
| └ code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ name | String | Ländername auf Englisch. |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
| └ file_size | String | Formatierte Gesamtdateigröße. |
| └ icon_url | String | URL zum Creative-Icon-Bild. |
| └ landing_url | String | Landingpage-URL. |
| └ created_at | String | Creative-Erstellungsdatum (Y-m-d Format). |
| └ last_seen_at | String / null | Datum der letzten Sichtung des Creatives in der Quelle (Y-m-d), oder null, falls unbekannt. |
| └ advertising_networks | Array | Array von Werbenetzwerk-Namen. |
| └ languages | Array | Array von ISO-Sprachcodes. |
| └ operating_systems | Array | Array von Betriebssystem-Werten. |
| └ browsers | Array | Array von Browser-Namen. |
| └ devices | Array | Array von Gerätetypen. |
| └ main_image_url | String | URL zum Hauptbild des Creative. |
| └ is_adult | Boolean | Ob das Creative Erwachsenen-Inhalt enthält. |
| └ is_active | Boolean | Ob das Creative derzeit aktiv ist. |
| └ pagination | Object | Paginierungsinformations-Objekt. |
| └ total | Nummer | Gesamtzahl der Creatives, die den Filtern entsprechen. |
| └ limit | Nummer | Anzahl der Elemente pro Seite. |
| └ offset | Nummer | Aktueller Offset. |
| └ has_more | Boolean | Ob weitere Elemente verfügbar sind. |
| └ returned_count | Nummer | Anzahl der in dieser Antwort zurückgegebenen Elemente. |
| └ filters_applied | Object | Objekt mit den angewendeten Filtern. |
| └ timestamp | String | Antwort-Zeitstempel im ISO 8601-Format. |
<?php
function searchInpageCreatives($params = [])
{
$ch = curl_init('https://spy.house/api/search/inpage');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if (!empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
return null;
}
// Example 1: Basic search with API key
$params = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
];
$result = searchInpageCreatives($params);
if ($result && $result['status'] === 'success') {
foreach ($result['data']['items'] as $creative) {
echo "ID: " . $creative['id'] . " - " . $creative['title'] . "\n";
}
echo "Total: " . $result['data']['pagination']['total'] . "\n";
}
// Example 2: Search with ISO codes/names filters
$paramsWithFilters = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US', 'GB', 'DE'], // ISO-2 codes
'languages' => ['EN'], // ISO codes
'browsers' => ['Chrome', 'Firefox'], // Browser names
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$filteredResult = searchInpageCreatives($paramsWithFilters);
// Example 3: Search with ID-based filters (recommended)
// Use IDs from /api/filters/* endpoints for better performance
$paramsWithIds = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'country_ids' => [1, 2, 3], // IDs from /api/filters/countries
'lang_ids' => [1], // IDs from /api/filters/languages
'network_ids' => [5, 10], // IDs from /api/filters/advertising-networks
'browser_ids' => [1, 2], // IDs from /api/filters/browsers
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$resultWithIds = searchInpageCreatives($paramsWithIds);
// Note: ID-based filters take precedence over name-based filters
// If both country_ids and countries are provided, country_ids will be used
Native-Creatives suchen
Suche nach Native-Creatives (MGID/Taboola) mit verschiedenen Filtern.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| limit | Nummer | Nein | Anzahl der Elemente pro Seite (10-100). Standard: 10. |
| offset | Nummer | Nein | Anzahl der zu überspringenden Elemente. Wird für Paginierung verwendet. Standard: 0. |
| keyword | String | Nein | Suchbegriff zum Filtern von Creatives nach Titel oder Beschreibung. |
| countries | Array | Nein | Array von ISO-2-Ländercodes (z.B. ["US", "GB", "DE"]). |
| country_ids | Array | Nein | Array von Länder-IDs vom Endpunkt /api/filters/countries. Hat Vorrang vor countries. |
| languages | Array | Nein | Array von ISO-Sprachcodes (z.B. ["EN", "DE", "FR"]). |
| lang_ids | Array | Nein | Array von Sprach-IDs vom Endpunkt /api/filters/languages. Hat Vorrang vor languages. |
| advertising_networks | Array | Nein | Array von Werbenetzwerk-Namen. |
| network_ids | Array | Nein | Array von Netzwerk-IDs vom Endpunkt /api/filters/advertising-networks. Hat Vorrang vor advertising_networks. |
| browsers | Array | Nein | Array von Browser-Namen. |
| browser_ids | Array | Nein | Array von Browser-IDs vom Endpunkt /api/filters/browsers. Hat Vorrang vor browsers. |
| operating_systems | Array | Nein | Array von Betriebssystem-Werten (z.B. ["windows", "macos", "android"]). |
| devices | Array | Nein | Array von Gerätetypen (z.B. ["desktop", "mobile", "tablet"]). |
| date_from | String | Nein | Startdatum für Filterung (Format: Y-m-d, z.B. "2025-01-01"). |
| date_to | String | Nein | Enddatum für Filterung (Format: Y-m-d, z.B. "2025-12-31"). |
| sort_by | String | Nein | Sortierfeld: creation, activity, popularity. |
| sort_order | String | Nein | Sortierrichtung: asc oder desc. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Object | Array von Flow-Daten, die der Anfrage entsprechen. |
| └ format | String | Creative-Format (push, inpage, facebook, tiktok). |
| └ items | Array | Array von Creative-Objekten. |
| └ id | Nummer | Eindeutige Creative-Kennung. |
| └ title | String | Creative-Titeltext. |
| └ description | String | Creative-Beschreibungstext. |
| └ category | String | Creative-Format/Kategorie (push, inpage, facebook, tiktok). |
| └ country | Object | Länderinformations-Objekt (code, name, iso_code_3). |
| └ code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ name | String | Ländername auf Englisch. |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
| └ file_size | String | Formatierte Gesamtdateigröße. |
| └ icon_url | String | URL zum Creative-Icon-Bild. |
| └ main_image_url | String | URL zum Hauptbild des Creative. |
| └ landing_url | String | Landingpage-URL. |
| └ created_at | String | Creative-Erstellungsdatum (Y-m-d Format). |
| └ last_seen_at | String / null | Datum der letzten Sichtung des Creatives in der Quelle (Y-m-d), oder null, falls unbekannt. |
| └ advertising_networks | Array | Array von Werbenetzwerk-Namen. |
| └ languages | Array | Array von ISO-Sprachcodes. |
| └ operating_systems | Array | Array von Betriebssystem-Werten. |
| └ browsers | Array | Array von Browser-Namen. |
| └ devices | Array | Array von Gerätetypen. |
| └ is_adult | Boolean | Ob das Creative Erwachsenen-Inhalt enthält. |
| └ is_active | Boolean | Ob das Creative derzeit aktiv ist. |
| └ pagination | Object | Paginierungsinformations-Objekt. |
| └ total | Nummer | Gesamtzahl der Creatives, die den Filtern entsprechen. |
| └ limit | Nummer | Anzahl der Elemente pro Seite. |
| └ offset | Nummer | Aktueller Offset. |
| └ has_more | Boolean | Ob weitere Elemente verfügbar sind. |
| └ returned_count | Nummer | Anzahl der in dieser Antwort zurückgegebenen Elemente. |
| └ filters_applied | Object | Objekt mit den angewendeten Filtern. |
| └ timestamp | String | Antwort-Zeitstempel im ISO 8601-Format. |
<?php
function searchNativeCreatives($params = [])
{
$ch = curl_init('https://spy.house/api/search/native');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if (!empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
return null;
}
// Example 1: Basic search with API key
$params = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
];
$result = searchNativeCreatives($params);
if ($result && $result['status'] === 'success') {
foreach ($result['data']['items'] as $creative) {
echo "ID: " . $creative['id'] . " - " . $creative['title'] . "\n";
}
echo "Total: " . $result['data']['pagination']['total'] . "\n";
}
// Example 2: Search with ISO codes/names filters
$paramsWithFilters = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US', 'GB', 'DE'], // ISO-2 codes
'languages' => ['EN'], // ISO codes
'browsers' => ['Chrome', 'Firefox'], // Browser names
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$filteredResult = searchNativeCreatives($paramsWithFilters);
// Example 3: Search with ID-based filters (recommended)
// Use IDs from /api/filters/* endpoints for better performance
$paramsWithIds = [
'api_key' => 'YOUR_API_KEY',
'limit' => 50,
'offset' => 0,
'keyword' => 'casino',
'country_ids' => [1, 2, 3], // IDs from /api/filters/countries
'lang_ids' => [1], // IDs from /api/filters/languages
'network_ids' => [5, 10], // IDs from /api/filters/advertising-networks
'browser_ids' => [1, 2], // IDs from /api/filters/browsers
'sort_by' => 'creation',
'sort_order' => 'desc',
];
$resultWithIds = searchNativeCreatives($paramsWithIds);
// Note: ID-based filters take precedence over name-based filters
// If both country_ids and countries are provided, country_ids will be used
Facebook-Creatives suchen
Suche nach Facebook-Creatives mit verschiedenen Filtern. Bei wenigen Ergebnissen kann die API eine Live-Suche starten und einen scrapingJob für Polling zurückgeben.
Wenn scrapingJob.needStartPolling true ist, rufen Sie denselben Endpunkt mit isPolling=true und job_id auf, um neue Elemente zu erhalten. Wenn der Status recently_completed oder rejected ist, wird kein Job erstellt und Polling sollte nicht gestartet werden.
Live-Suche startet nur, wenn genau ein Land im countries-Array angegeben ist.
Live-Suche startet nur, wenn ein nicht-leeres Keyword angegeben ist.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| limit | Nummer | Nein | Anzahl der Elemente pro Seite (10-100). Standard: 10. |
| offset | Nummer | Nein | Anzahl der zu überspringenden Elemente. Wird für Paginierung verwendet. Standard: 0. |
| keyword | String | Nein | Suchbegriff zum Filtern von Creatives nach Titel oder Beschreibung. |
| countries | Array | Nein | Array von ISO-2-Ländercodes (z.B. ["US", "GB", "DE"]). |
| country_ids | Array | Nein | Array von Länder-IDs vom Endpunkt /api/filters/countries. Hat Vorrang vor countries. |
| languages | Array | Nein | Array von ISO-Sprachcodes (z.B. ["EN", "DE", "FR"]). |
| lang_ids | Array | Nein | Array von Sprach-IDs vom Endpunkt /api/filters/languages. Hat Vorrang vor languages. |
| date_from | String | Nein | Startdatum für Filterung (Format: Y-m-d, z.B. "2025-01-01"). |
| date_to | String | Nein | Enddatum für Filterung (Format: Y-m-d, z.B. "2025-12-31"). |
| sort_by | String | Nein | Sortierfeld: creation, activity, popularity. |
| sort_order | String | Nein | Sortierrichtung: asc oder desc. |
| status | String | Nein | Anzeigenstatus-Filter: ALL, ACTIVE, INACTIVE. |
| media_type | String | Nein | Medientyp-Filter: ALL, IMAGE, VIDEO. |
| search_type | String | Nein | Suchtyp: keyword_unordered, keyword_exact_phrase. |
| isPolling | Boolean | Nein | Polling für Live-Suche-Updates aktivieren. Mit job_id verwenden. |
| lastId | Nummer | Nein | Letzte Creative-ID für inkrementelles Polling (optional). |
| perPage | Nummer | Nein | Erwartete Seitengröße für Erkennung weniger Ergebnisse (12-96). |
| job_id | String | Nein | Live-Suche-Job-ID aus scrapingJob. Erforderlich wenn isPolling=true. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Object | Array von Flow-Daten, die der Anfrage entsprechen. |
| └ format | String | Creative-Format (push, inpage, facebook, tiktok). |
| └ items | Array | Array von Creative-Objekten. |
| └ id | Nummer | Eindeutige Creative-Kennung. |
| └ title | String | Creative-Titeltext. |
| └ description | String | Creative-Beschreibungstext. |
| └ category | String | Creative-Format/Kategorie (push, inpage, facebook, tiktok). |
| └ country | Object | Länderinformations-Objekt (code, name, iso_code_3). |
| └ code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ name | String | Ländername auf Englisch. |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
| └ file_size | String | Formatierte Gesamtdateigröße. |
| └ icon_url | String | URL zum Creative-Icon-Bild. |
| └ landing_url | String | Landingpage-URL. |
| └ created_at | String | Creative-Erstellungsdatum (Y-m-d Format). |
| └ last_seen_at | String / null | Datum der letzten Sichtung des Creatives in der Quelle (Y-m-d), oder null, falls unbekannt. |
| └ advertising_networks | Array | Array von Werbenetzwerk-Namen. |
| └ languages | Array | Array von ISO-Sprachcodes. |
| └ operating_systems | Array | Array von Betriebssystem-Werten. |
| └ browsers | Array | Array von Browser-Namen. |
| └ devices | Array | Array von Gerätetypen. |
| └ main_image_url | String | URL zum Hauptbild des Creative. |
| └ has_video | Boolean | Ob das Creative Video enthält. |
| └ video_url | String | URL zum Video (wenn has_video true ist). |
| └ video_duration | Nummer | Videodauer in Sekunden (falls zutreffend). |
| └ social_likes | Nummer | Anzahl der Likes (für Social Ads). |
| └ social_comments | Nummer | Anzahl der Kommentare (für Social Ads). |
| └ social_shares | Nummer | Anzahl der Shares (für Social Ads). |
| └ is_adult | Boolean | Ob das Creative Erwachsenen-Inhalt enthält. |
| └ is_active | Boolean | Ob das Creative derzeit aktiv ist. |
| └ pagination | Object | Paginierungsinformations-Objekt. |
| └ total | Nummer | Gesamtzahl der Creatives, die den Filtern entsprechen. |
| └ limit | Nummer | Anzahl der Elemente pro Seite. |
| └ offset | Nummer | Aktueller Offset. |
| └ has_more | Boolean | Ob weitere Elemente verfügbar sind. |
| └ returned_count | Nummer | Anzahl der in dieser Antwort zurückgegebenen Elemente. |
| └ filters_applied | Object | Objekt mit den angewendeten Filtern. |
| └ scrapingJob | Object | Live-Suche-Job-Objekt (vorhanden wenn Live-Suche gestartet oder aktiv ist). |
| └ type | String | Live-Suche-Typ-Identifier (z.B. facebook_search). |
| └ status | String | Job-Status: dispatched, running, post_processing, completed, failed, error, recently_completed, rejected. |
| └ needStartPolling | Boolean | Ob der Client mit dem Polling für Updates beginnen soll. |
| └ needStopPolling | Boolean | Ob der Client das Polling beenden soll. |
| └ job_id | String | Job-Identifier für Polling (nicht vorhanden wenn Status recently_completed oder rejected ist). |
| └ polling_interval_seconds | Nummer | Empfohlenes Polling-Intervall in Sekunden. |
| └ estimatedDuration | Nummer | Geschätzte Dauer in Sekunden (0 bei completed oder recently_completed). |
| └ message | String | Zusätzliche Statusnachricht vom Server oder Parser. |
| └ retry_after_seconds | Nummer | Wie lange vor erneutem Versuch bei recently_completed/rejected warten (falls angegeben). |
| └ error | String | Fehlerdetails (vorhanden wenn Status failed oder error ist). |
| └ timestamp | String | Antwort-Zeitstempel im ISO 8601-Format. |
<?php
function searchFacebookCreatives($params = [])
{
$ch = curl_init('https://spy.house/api/search/facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if (!empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
return null;
}
// Example 1: Basic search with API key
$params = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
];
// Example 2: Social filters (status/media_type/search_type)
$paramsWithSocialFilters = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
'status' => 'ACTIVE',
'media_type' => 'VIDEO',
'search_type' => 'keyword_unordered',
];
$result = searchFacebookCreatives($paramsWithSocialFilters);
// Example 3: Live search polling (when scrapingJob.needStartPolling is true)
$initial = searchFacebookCreatives([
'api_key' => 'YOUR_API_KEY',
'limit' => 10,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
'status' => 'ACTIVE',
]);
if ($initial && !empty($initial['data']['scrapingJob'])) {
$scrapingJob = $initial['data']['scrapingJob'];
if (!empty($scrapingJob['needStartPolling']) && !empty($scrapingJob['job_id'])) {
$pollingResult = searchFacebookCreatives([
'api_key' => 'YOUR_API_KEY',
'isPolling' => true,
'job_id' => $scrapingJob['job_id'],
'limit' => 10,
'offset' => 0,
]);
}
}
// Note: If scrapingJob.status is "recently_completed" or "rejected",
// the job will not be created and polling should not be started.
TikTok-Creatives suchen
Suche nach TikTok-Creatives mit verschiedenen Filtern. Bei wenigen Ergebnissen kann die API eine Live-Suche starten und einen scrapingJob für Polling zurückgeben.
Wenn scrapingJob.needStartPolling true ist, rufen Sie denselben Endpunkt mit isPolling=true und job_id auf, um neue Elemente zu erhalten. Wenn der Status recently_completed oder rejected ist, wird kein Job erstellt und Polling sollte nicht gestartet werden.
Live-Suche startet nur, wenn genau ein Land im countries-Array angegeben ist.
Live-Suche startet nur, wenn ein nicht-leeres Keyword angegeben ist.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| limit | Nummer | Nein | Anzahl der Elemente pro Seite (10-100). Standard: 10. |
| offset | Nummer | Nein | Anzahl der zu überspringenden Elemente. Wird für Paginierung verwendet. Standard: 0. |
| keyword | String | Nein | Suchbegriff zum Filtern von Creatives nach Titel oder Beschreibung. |
| countries | Array | Nein | Array von ISO-2-Ländercodes (z.B. ["US", "GB", "DE"]). |
| country_ids | Array | Nein | Array von Länder-IDs vom Endpunkt /api/filters/countries. Hat Vorrang vor countries. |
| languages | Array | Nein | Array von ISO-Sprachcodes (z.B. ["EN", "DE", "FR"]). |
| lang_ids | Array | Nein | Array von Sprach-IDs vom Endpunkt /api/filters/languages. Hat Vorrang vor languages. |
| date_from | String | Nein | Startdatum für Filterung (Format: Y-m-d, z.B. "2025-01-01"). |
| date_to | String | Nein | Enddatum für Filterung (Format: Y-m-d, z.B. "2025-12-31"). |
| sort_by | String | Nein | Sortierfeld: creation, activity, popularity. |
| sort_order | String | Nein | Sortierrichtung: asc oder desc. |
| video_duration | String | Nein | TikTok-Videodauer-Filter: ALL, SHORT, MEDIUM, LONG. |
| isPolling | Boolean | Nein | Polling für Live-Suche-Updates aktivieren. Mit job_id verwenden. |
| lastId | Nummer | Nein | Letzte Creative-ID für inkrementelles Polling (optional). |
| perPage | Nummer | Nein | Erwartete Seitengröße für Erkennung weniger Ergebnisse (12-96). |
| job_id | String | Nein | Live-Suche-Job-ID aus scrapingJob. Erforderlich wenn isPolling=true. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Object | Array von Flow-Daten, die der Anfrage entsprechen. |
| └ format | String | Creative-Format (push, inpage, facebook, tiktok). |
| └ items | Array | Array von Creative-Objekten. |
| └ id | Nummer | Eindeutige Creative-Kennung. |
| └ title | String | Creative-Titeltext. |
| └ description | String | Creative-Beschreibungstext. |
| └ category | String | Creative-Format/Kategorie (push, inpage, facebook, tiktok). |
| └ country | Object | Länderinformations-Objekt (code, name, iso_code_3). |
| └ code | String | ISO 3166-1 alpha-2 Ländercode (z.B. "DE" für Deutschland). |
| └ name | String | Ländername auf Englisch. |
| └ iso_code_3 | String | ISO 3166-1 alpha-3 Ländercode (z.B. "DEU" für Deutschland). |
| └ file_size | String | Formatierte Gesamtdateigröße. |
| └ icon_url | String | URL zum Creative-Icon-Bild. |
| └ landing_url | String | Landingpage-URL. |
| └ created_at | String | Creative-Erstellungsdatum (Y-m-d Format). |
| └ last_seen_at | String / null | Datum der letzten Sichtung des Creatives in der Quelle (Y-m-d), oder null, falls unbekannt. |
| └ advertising_networks | Array | Array von Werbenetzwerk-Namen. |
| └ languages | Array | Array von ISO-Sprachcodes. |
| └ operating_systems | Array | Array von Betriebssystem-Werten. |
| └ browsers | Array | Array von Browser-Namen. |
| └ devices | Array | Array von Gerätetypen. |
| └ main_image_url | String | URL zum Hauptbild des Creative. |
| └ has_video | Boolean | Ob das Creative Video enthält. |
| └ video_url | String | URL zum Video (wenn has_video true ist). |
| └ video_duration | Nummer | Videodauer in Sekunden (falls zutreffend). |
| └ social_likes | Nummer | Anzahl der Likes (für Social Ads). |
| └ social_comments | Nummer | Anzahl der Kommentare (für Social Ads). |
| └ social_shares | Nummer | Anzahl der Shares (für Social Ads). |
| └ is_adult | Boolean | Ob das Creative Erwachsenen-Inhalt enthält. |
| └ is_active | Boolean | Ob das Creative derzeit aktiv ist. |
| └ pagination | Object | Paginierungsinformations-Objekt. |
| └ total | Nummer | Gesamtzahl der Creatives, die den Filtern entsprechen. |
| └ limit | Nummer | Anzahl der Elemente pro Seite. |
| └ offset | Nummer | Aktueller Offset. |
| └ has_more | Boolean | Ob weitere Elemente verfügbar sind. |
| └ returned_count | Nummer | Anzahl der in dieser Antwort zurückgegebenen Elemente. |
| └ filters_applied | Object | Objekt mit den angewendeten Filtern. |
| └ scrapingJob | Object | Live-Suche-Job-Objekt (vorhanden wenn Live-Suche gestartet oder aktiv ist). |
| └ type | String | Live-Suche-Typ-Identifier (z.B. facebook_search). |
| └ status | String | Job-Status: dispatched, running, post_processing, completed, failed, error, recently_completed, rejected. |
| └ needStartPolling | Boolean | Ob der Client mit dem Polling für Updates beginnen soll. |
| └ needStopPolling | Boolean | Ob der Client das Polling beenden soll. |
| └ job_id | String | Job-Identifier für Polling (nicht vorhanden wenn Status recently_completed oder rejected ist). |
| └ polling_interval_seconds | Nummer | Empfohlenes Polling-Intervall in Sekunden. |
| └ estimatedDuration | Nummer | Geschätzte Dauer in Sekunden (0 bei completed oder recently_completed). |
| └ message | String | Zusätzliche Statusnachricht vom Server oder Parser. |
| └ retry_after_seconds | Nummer | Wie lange vor erneutem Versuch bei recently_completed/rejected warten (falls angegeben). |
| └ error | String | Fehlerdetails (vorhanden wenn Status failed oder error ist). |
| └ timestamp | String | Antwort-Zeitstempel im ISO 8601-Format. |
<?php
function searchTikTokCreatives($params = [])
{
$ch = curl_init('https://spy.house/api/search/tiktok');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if (!empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
return null;
}
// Example 1: Basic search with API key
$params = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
];
// Example 2: TikTok filter (video_duration)
$paramsWithVideoDuration = [
'api_key' => 'YOUR_API_KEY',
'limit' => 20,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
'video_duration' => 'SHORT',
];
$result = searchTikTokCreatives($paramsWithVideoDuration);
// Example 3: Live search polling (when scrapingJob.needStartPolling is true)
$initial = searchTikTokCreatives([
'api_key' => 'YOUR_API_KEY',
'limit' => 10,
'offset' => 0,
'keyword' => 'casino',
'countries' => ['US'],
]);
if ($initial && !empty($initial['data']['scrapingJob'])) {
$scrapingJob = $initial['data']['scrapingJob'];
if (!empty($scrapingJob['needStartPolling']) && !empty($scrapingJob['job_id'])) {
$pollingResult = searchTikTokCreatives([
'api_key' => 'YOUR_API_KEY',
'isPolling' => true,
'job_id' => $scrapingJob['job_id'],
'limit' => 10,
'offset' => 0,
]);
}
}
// Note: If scrapingJob.status is "recently_completed" or "rejected",
// the job will not be created and polling should not be started.
Geld überweisen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| amount | Nummer | Ja | Überweisungsbetrag (mindestens 10 USD). |
| String | Ja | E-Mail des Empfängers. Muss gültig sein. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| transaction_number | String | Eindeutige Transaktionsnummer der Überweisung. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/accounts/transfer_funds');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = [
'api_key' => 'YOUR_API_KEY',
'amount' => 100,
'email' => '[email protected]'
];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Kontostand abrufen
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| balance | Nummer | Aktueller Kontostand des Benutzers. |
<?php
function api_request($data = [])
{
$ch = curl_init('https://spy.house/api/accounts/balance');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ( ! empty($info['http_code']) && $info['http_code'] == 200) {
return json_decode($body, TRUE);
}
}
$body_request = [
'api_key' => 'YOUR_API_KEY'
];
$api_request = api_request($body_request);
if ( ! empty($api_request['status'])) {
echo '<pre>';
print_r($api_request);
echo '</pre>';
}
Abruf von Nutzung und Kontingenten
Nur-Lese-Endpunkt. Liefert Abonnement, Such- und Uniqueization-Kontingente sowie den Kontostand. Das Abrufen verbraucht kein Kontingent und legt keine Kontingentperiode an.
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
Verfügbar mit aktivem kostenpflichtigem Abonnement und aktiviertem API-Zugang. Trial-Konten erhalten 403.
Fehler im Standardformat: 400 - api_key fehlt oder ist fehlerhaft; 401 - unbekannter api_key; 403 - API-Zugang für dieses Konto nicht erlaubt (einschließlich Trial).
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data | Objekt | Array von Flow-Daten, die der Anfrage entsprechen. |
| data.subscription | Objekt | Abo-Tarif und erlaubte Creative-Formate. |
| data.subscription.plan | String | Name des Abo-Tarifs. |
| data.subscription.allowed_formats | Array | Vom Tarif erlaubte Creative-Formate. Die Liste hängt vom Tarif ab. |
| data.quotas | Objekt | Such- und Uniqueization-Kontingente. |
| data.quotas.search | Objekt | Such-Kontingent für die aktuelle Periode. |
| data.quotas.search.limit | Nummer | Kontingentlimit. null bei unbegrenzter Suche. |
| data.quotas.search.used | Nummer | In der aktuellen Periode verbrauchte Einheiten. |
| data.quotas.search.remaining | Nummer | Verbleibende Einheiten. null bei unbegrenzter Suche. |
| data.quotas.search.is_unlimited | Boolescher Wert | true, wenn die Suche durch den Tarif nicht begrenzt ist. |
| data.quotas.uniqueization | Objekt | Uniqueization-Kontingent für die aktuelle Periode. |
| data.quotas.uniqueization.source | String | Kontingentquelle: subscription oder none. |
| data.quotas.uniqueization.limit | Nummer | Kontingentlimit für die aktuelle Periode. |
| data.quotas.uniqueization.used | Nummer | In der aktuellen Periode verbrauchte Einheiten. |
| data.quotas.uniqueization.remaining | Nummer | Verbleibende Einheiten in der aktuellen Periode. |
| data.quotas.uniqueization.can_generate | Boolescher Wert | true, wenn mindestens eine Einheit übrig ist. |
| data.quotas.uniqueization.period_start | String | Beginn der Periode im Format ISO 8601. null, wenn kein Kontingent besteht. |
| data.quotas.uniqueization.period_end | String | Ende der Periode im Format ISO 8601. null, wenn kein Kontingent besteht. |
| data.account | Objekt | Kontodaten. |
| data.account.balance | Nummer | Aktueller Kontostand des Benutzers. |
Bei unbegrenzter Suche sind limit und remaining null, used zählt weiterhin mit.
Ist das Such-Kontingent erschöpft, antwortet der Endpunkt weiterhin mit 200 und remaining = 0.
Gibt es für die aktuelle Periode kein Uniqueization-Kontingent, ist source none, limit, used und remaining sind 0, can_generate ist false und die Periodendaten sind null.
Die aktuelle Uniqueization-Periode wird vor der ersten Nutzung angezeigt. Der Kontingent-Datensatz entsteht erst bei der ersten Generierung.
Antwortbeispiel
{
"status": "success",
"msg": "",
"code": 200,
"data": {
"subscription": {
"plan": "Starter",
"allowed_formats": ["push", "inpage", "facebook", "tiktok"]
},
"quotas": {
"search": {
"limit": 300,
"used": 12,
"remaining": 288,
"is_unlimited": false
},
"uniqueization": {
"source": "subscription",
"limit": 100,
"used": 7,
"remaining": 93,
"can_generate": true,
"period_start": "2026-11-01T00:00:00+00:00",
"period_end": "2026-12-01T00:00:00+00:00"
}
},
"account": {
"balance": 125.5
}
}
}
<?php
$url = 'https://spy.house/api/accounts/usage?' . http_build_query([
'api_key' => 'YOUR_API_KEY',
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$body = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$response = json_decode($body, true);
print_r($response['data']);
}
Retrieving a list of white pages
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| search | String | Nein | String for searching by White Page name. |
| date_from | String | Nein | Start date for filtering (format: Y-m-d). (YYYY-MM-DD) |
| date_to | String | Nein | End date for filtering (format: Y-m-d). (YYYY-MM-DD) |
| limit | Nummer | Nein | Number of items per page (1 to 100). Default: 10. |
| page | Nummer | Nein | Page number, starting from 1. Default: 1. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.items | Array | Array of user's White Pages. |
| data.items[].id | Nummer | Unique identifier of the White Page. |
| data.items[].name | String | Name of the White Page. |
| data.items[].status | String | Status value: generating, pending, in_progress, completed, failed, error. |
| data.items[].status_label | String | Translated status description. |
| data.items[].generator_label | String | AI generator name. |
| data.items[].vertical_label | String | Selected niche/vertical name. |
| data.items[].language_label | String | Target language. |
| data.items[].theme_label | String | Selected template/theme name. |
| data.items[].amount | Nummer | Price charged for generation (e.g., 5.00) or null. |
| data.items[].can_retry | Boolean | Whether generation can be retried. |
| data.items[].can_download | Boolean | Whether the zip archive is ready to download. |
| data.items[].error_message | String | Localized error reason if generation failed. |
| data.items[].created_at | String | Creation date and time. |
<?php
function get_white_pages($apiKey)
{
$ch = curl_init('https://spy.house/api/white-pages?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$result = get_white_pages('YOUR_API_KEY');
print_r($result);
Retrieving generator configuration options
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.generators | Array | List of available AI generators for id_generator param. |
| data.generators[].id | Nummer | Numeric ID of the option. |
| data.generators[].slug | String | Slug/value of the option. |
| data.generators[].label | String | Translated name of the option. |
| data.verticals | Array | List of available niche verticals for id_vertical param. |
| data.verticals[].id | Nummer | Numeric ID of the option. |
| data.verticals[].slug | String | Slug/value of the option. |
| data.verticals[].label | String | Translated name of the option. |
| data.languages | Array | List of target languages for id_language param. |
| data.languages[].id | Nummer | Numeric ID of the option. |
| data.languages[].slug | String | Slug/value of the option. |
| data.languages[].label | String | Translated name of the option. |
| data.themes | Object | Templates map grouped by id_generator key. |
<?php
function get_generator_options($apiKey)
{
$ch = curl_init('https://spy.house/api/white-pages/options?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($chcurl_close($ch);
return json_decode($body, TRUE);
}
$result = get_generator_options('YOUR_API_KEY');
print_r($result);
Generating a white page
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| name | String | Ja | Name of the White Page (for reference, max 64 chars). |
| id_generator | Nummer | Ja | Generator ID from options endpoint. |
| id_vertical | Nummer | Ja | Vertical ID from options endpoint. |
| id_language | Nummer | Ja | Language ID from options endpoint. |
| theme | String | Ja | Theme slug string corresponding to the selected generator. |
| wp_domain | String | Nein | Optional target domain name. |
| wp_company | String | Nein | Optional company name for copy/legal page sections. |
| wp_phone | String | Nein | Optional contact phone number. |
| wp_email | String | Nein | Optional contact email address. |
| wp_keywords | String | Nein | Optional comma-separated keywords to tailor site content. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.id | Nummer | Unique identifier of the White Page. |
| data.name | String | Name of the White Page. |
| data.status | String | Status value: generating, pending, in_progress, completed, failed, error. |
| data.status_label | String | Translated status description. |
<?php
function generate_white_page($apiKey, $params)
{
$ch = curl_init('https://spy.house/api/white-pages/generate?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$params = [
'name' => 'My First WhitePage',
'id_generator' => 1,
'id_vertical' => 2,
'id_language' => 1,
'theme' => 'travel'
];
$result = generate_white_page('YOUR_API_KEY', $params);
print_r($result);
Retrieving generation status
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.id | Nummer | Unique identifier of the White Page. |
| data.status | String | Status value: generating, pending, in_progress, completed, failed, error. |
| data.status_label | String | Translated status description. |
| data.can_retry | Boolean | Whether generation can be retried. |
| data.can_download | Boolean | Whether the zip archive is ready to download. |
| data.error_message | String | Localized error reason if generation failed. |
<?php
function get_white_page_status($apiKey, $id)
{
$ch = curl_init('https://spy.house/api/white-pages/' . $id . '/status?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$result = get_white_page_status('YOUR_API_KEY'123);
print_r($result);
Retrieving download link
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.download_url | String | Temporary authenticated URL to download the zip file. |
<?php
function get_white_page_download_url($apiKey$id)
{
$ch = curl_init('https://spy.house/api/white-pages/' . $id . '/download');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['api_key' => $apiKey]));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$result = get_white_page_download_url('YOUR_API_KEY', 123);
print_r($result);
Downloading white page file
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
Returns the zip archive payload as binary stream with `Content-Type: application/zip` and `Content-Disposition: attachment` headers.
<?php
function download_white_page_file($apiKey, $id, $saveToPath)
{
$fp = fopen($saveToPath, 'w+');
$ch = curl_init('https://spy.house/api/white-pages/' . $id . '/file');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['api_key' => $apiKey]));
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_exec($chcurl_close($ch);
fclose($fp);
}
download_white_page_file('YOUR_API_KEY', 123, '/path/to/save/archive.zip');
Deleting a white page
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.deleted | Boolean | True if deletion succeeded. |
<?php
function delete_white_page($apiKey, $id)
{
$ch = curl_init('https://spy.house/api/white-pages/' . $id . '?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$result = delete_white_page('YOUR_API_KEY', 123);
print_r($result);
Retrying failed generation
Anfrage-URL
| Parameter | Datentyp | Erforderlich | Beschreibung |
|---|---|---|---|
| api_key | String | Ja | Eindeutiger API-Schlüssel zur Anfrage-Authentifizierung. |
| Parameter | Datentyp | Beschreibung |
|---|---|---|
| status | String | Feld, das die erfolgreiche Ausführung ("success") oder einen Fehler ("error") anzeigt. |
| msg | String | Fehlermeldung oder zusätzliche Anfrageinformationen. |
| code | Nummer | Antwortcode, z.B. 200 für eine erfolgreiche Anfrage. |
| data.id | Nummer | Unique identifier of the White Page. |
| data.status | String | Status value: generating, pending, in_progress, completed, failed, error. |
| data.generating_label | String | Translated label for the new generating status. |
<?php
function retry_white_page($apiKey, $id)
{
$ch = curl_init('https://spy.house/api/white-pages/' . $id . '/retry?api_key=' . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, TRUE);
}
$result = retry_white_page('YOUR_API_KEY', 123);
print_r($result);