# Search archive

<mark style="color:blue;">`GET`</mark> `http://localhost:5001/appgregator/us-central1/facebook/archive`

#### Query Parameters

| Name                                                     | Type   | Description                                                                |
| -------------------------------------------------------- | ------ | -------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>                   | String | ft-4                                                                       |
| connection\_name<mark style="color:red;">\*</mark>       | String | fbads-01                                                                   |
| search<mark style="color:red;">\*</mark>                 | String | Perumahan Logam Bangun Setia 2                                             |
| ad\_reached\_countries<mark style="color:red;">\*</mark> | String | id                                                                         |
| limit<mark style="color:red;">\*</mark>                  | Number | 50                                                                         |
| languages<mark style="color:red;">\*</mark>              | String | id                                                                         |
| pagination\_token                                        | String | c2NyYXBpbmdfY3Vyc29yOk1UWTBOVFk1TWpVeE1Ub3pOemd4TURBNE56QXpOVGMyTVRrPQZDZD |
| search\_type<mark style="color:red;">\*</mark>           | String | KEYWORD\_UNORDERED                                                         |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "data": [
        {
            "id": "372300758093411",
            "ad_creation_time": "2022-03-30",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-30",
            "ad_delivery_stop_time": "2022-04-03",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=372300758093411&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram",
                "messenger"
            ]
        },
        {
            "id": "383658506943694",
            "ad_creation_time": "2022-03-23",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-23",
            "ad_delivery_stop_time": "2022-04-02",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=383658506943694&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram",
                "messenger"
            ]
        },
        {
            "id": "980742565893402",
            "ad_creation_time": "2022-03-21",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-21",
            "ad_delivery_stop_time": "2022-04-01",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=980742565893402&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram",
                "messenger"
            ]
        },
        {
            "id": "984133685543583",
            "ad_creation_time": "2022-03-18",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-18",
            "ad_delivery_stop_time": "2022-03-29",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=984133685543583&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram"
            ]
        },
        {
            "id": "446474813935396",
            "ad_creation_time": "2022-03-18",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-18",
            "ad_delivery_stop_time": "2022-03-28",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=446474813935396&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram",
                "messenger"
            ]
        },
        {
            "id": "1071433473439843",
            "ad_creation_time": "2022-03-18",
            "ad_creative_bodies": [
                "PERUM LBS 2 CIBITUNG BEKASI\n👉 HADIR KEMBALI DENGAN DP 0\n👉 DESIGN RUMAH LEBIH ELEGAN\n👉 INVESTASIKAN PENGHASILAN UNTUK MEMBELI RUMAH\n\n👉 Booking fee 1.000.000\n👉 Saldo endapan 2.850.000\n👉 Administrasi 800.000\n(TOTAL 4.650.000)\n\nSpesifikasi :\n√ Double dinding\n√ Kamar tidur 2\n√ Kamar mandi sdh dibelakang\n√ Tembok belakang tinggi 2,5meter\n√ Air sampe ngocoooorr + mesin\n\n👉 Sudah ramai penduduk\n👉 Sarana ibadah (Masjid)\n👉 Sudah terbentuk Rt Rw\n👉 Alfamart\n👉 Klinik 24jam\n\nInfo lengkap hubungi marketing kami.\nBerkah Agency Property - BAP\nwa.me/6287871300015"
            ],
            "ad_delivery_start_time": "2022-03-18",
            "ad_delivery_stop_time": "2022-03-30",
            "ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=1071433473439843&access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd",
            "page_id": "215485402619685",
            "page_name": "Perumahan Logam Bangun Setia 2",
            "publisher_platforms": [
                "facebook",
                "instagram",
                "messenger"
            ]
        }
    ],
    "paging": {
        "cursors": {
            "after": "c2NyYXBpbmdfY3Vyc29yOk1UWTBOell4TVRjM05qb3hNRGN4TkRNek5EY3pORE01T0RRegZDZD"
        },
        "next": "https://graph.facebook.com/v14.0/ads_archive?access_token=EAAIikVy3mZCABANRy0A0YI73xTdQxKnGQpVZAIMWJ7hO2DrRfuxz2sU2r0ZAKbAzQ0ZBMqJqii09MkbonRkGRPvnZCDsWWOmEiZALCKfkPIGBZBFEDK3AiZAkR6WSJqkdwrJx0ZBZAta3d2VkxOWTBwPHZB3jmipguh4WWbOsjYlUsSKDOqvktmKjFI1Mv1Kpq4dmeP1bdO1nEh41l0qM8M0GCd&fields=id%2Cad_creation_time%2Ccurrent_page_name%2Cad_creative_bodies%2Cad_creative_link_captions%2Cad_creative_link_descriptions%2Cad_creative_link_titles%2Cad_delivery_start_time%2Cad_delivery_stop_time%2Cad_snapshot_url%2Cprofile_picture_uri%2Cpage_id%2Cpage_name%2Cpublisher_platforms&search_terms=Perumahan+Logam+Bangun+Setia+2&search_type=KEYWORD_UNORDERED&ad_reached_countries=id&publisher_platforms=FACEBOOK&media_type=ALL&languages=id&limit=50&after=c2NyYXBpbmdfY3Vyc29yOk1UWTBOell4TVRjM05qb3hNRGN4TkRNek5EY3pORE01T0RRegZDZD"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```shell
curl --location --request GET 'http://localhost:5001/appgregator/us-central1/facebook/archive?name=ft-4&connection_name=fbads-01&search=Perumahan Logam Bangun Setia 2&ad_reached_countries=id&limit=50&languages=id&pagination_token=c2NyYXBpbmdfY3Vyc29yOk1UWTBOVFk1TWpVeE1Ub3pOemd4TURBNE56QXpOVGMyTVRrPQZDZD&search_type=KEYWORD_UNORDERED' \
--header 'x-api-key: U2Fsd...'
```

{% endtab %}

{% tab title="Second Tab" %}

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'http://localhost:5001/appgregator/us-central1/facebook/archive?name=ft-4&connection_name=fbads-01&search=Perumahan Logam Bangun Setia 2&ad_reached_countries=id&limit=50&languages=id&pagination_token=c2NyYXBpbmdfY3Vyc29yOk1UWTBOVFk1TWpVeE1Ub3pOemd4TURBNE56QXpOVGMyTVRrPQZDZD&search_type=KEYWORD_UNORDERED',
  headers: { 
    'x-api-key': 'U2Fsd...'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://localhost:5001/appgregator/us-central1/facebook/archive?name=ft-4&connection_name=fbads-01&search=Perumahan%20Logam%20Bangun%20Setia%202&ad_reached_countries=id&limit=50&languages=id&pagination_token=c2NyYXBpbmdfY3Vyc29yOk1UWTBOVFk1TWpVeE1Ub3pOemd4TURBNE56QXpOVGMyTVRrPQZDZD&search_type=KEYWORD_UNORDERED',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: U2Fsd...'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
