Skip to content

Latest commit

 

History

History
1583 lines (1100 loc) · 45.2 KB

File metadata and controls

1583 lines (1100 loc) · 45.2 KB

ScrapeBadger\FacebookApi

All URIs are relative to https://scrapebadger.com, except if the operation defines another base path.

Method HTTP request Description
facebookBrowseAMarketplaceCategory() GET /v1/facebook/marketplace/category/{category} Browse a Marketplace category
facebookGetAMarketplaceItem() GET /v1/facebook/marketplace/item/{item_id} Get a Marketplace item
facebookGetAdvertiserPageInfo() GET /v1/facebook/ads/pages/{page_id} Get advertiser page info
facebookGetAnAd() GET /v1/facebook/ads/{ad_archive_id} Get an ad
facebookGetGroupDetail() GET /v1/facebook/groups/{group_id} Get group detail
facebookGetGroupPosts() GET /v1/facebook/groups/{group_id}/posts Get group posts
facebookGetPageDetail() GET /v1/facebook/pages/{identifier} Get page detail
facebookGetPagePosts() GET /v1/facebook/pages/{identifier}/posts Get page posts
facebookGetPostComments() GET /v1/facebook/posts/{post_id}/comments Get post comments
facebookGetPostDetail() GET /v1/facebook/posts/{post_id} Get post detail
facebookGetProfileDetail() GET /v1/facebook/profiles/{identifier} Get profile detail
facebookGetProfilePosts() GET /v1/facebook/profiles/{identifier}/posts Get profile posts
facebookListCategories() GET /v1/facebook/marketplace/categories List categories
facebookListLocations() GET /v1/facebook/marketplace/locations List locations
facebookSearchAdvertiserPages() GET /v1/facebook/ads/pages/search Search advertiser pages
facebookSearchEvents() GET /v1/facebook/search/events Search events
facebookSearchEverything() GET /v1/facebook/search Search everything
facebookSearchGroups() GET /v1/facebook/search/groups Search groups
facebookSearchMarketplace() GET /v1/facebook/marketplace/search Search Marketplace
facebookSearchPages() GET /v1/facebook/search/pages Search Pages
facebookSearchPeople() GET /v1/facebook/search/people Search people
facebookSearchPlaces() GET /v1/facebook/search/places Search places
facebookSearchPosts() GET /v1/facebook/search/posts Search posts
facebookSearchTheAdLibrary() GET /v1/facebook/ads/search Search the Ad Library

facebookBrowseAMarketplaceCategory()

facebookBrowseAMarketplaceCategory($category, $location, $min_price, $max_price, $sort_by, $after): mixed

Browse a Marketplace category

Browse Marketplace listings in a category (vehicles, electronics, ...).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$category = 'category_example'; // string
$location = 'nyc'; // string
$min_price = 56; // int
$max_price = 56; // int
$sort_by = 'sort_by_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookBrowseAMarketplaceCategory($category, $location, $min_price, $max_price, $sort_by, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookBrowseAMarketplaceCategory: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
category string
location string [optional] [default to 'nyc']
min_price int [optional]
max_price int [optional]
sort_by string [optional]
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetAMarketplaceItem()

facebookGetAMarketplaceItem($item_id): mixed

Get a Marketplace item

Get full detail for a single Marketplace listing.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$item_id = 'item_id_example'; // string

try {
    $result = $apiInstance->facebookGetAMarketplaceItem($item_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetAMarketplaceItem: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
item_id string

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetAdvertiserPageInfo()

facebookGetAdvertiserPageInfo($page_id, $country): mixed

Get advertiser page info

Get advertiser page info: category, followers, page transparency (creation date, name history, managing organization, admin-account locations), related pages, and ad spend (for political/issue advertisers).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page_id = 'page_id_example'; // string
$country = 'US'; // string

try {
    $result = $apiInstance->facebookGetAdvertiserPageInfo($page_id, $country);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetAdvertiserPageInfo: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page_id string
country string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetAnAd()

facebookGetAnAd($ad_archive_id, $country): mixed

Get an ad

Get a single Ad Library ad by its archive id. For EU/UK-targeted ads the response also includes transparency insights (payer/beneficiary, total EU reach, and age/gender/country reach breakdowns).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$ad_archive_id = 'ad_archive_id_example'; // string
$country = 'US'; // string | ISO country code (an EU code returns EU transparency)

try {
    $result = $apiInstance->facebookGetAnAd($ad_archive_id, $country);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetAnAd: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ad_archive_id string
country string ISO country code (an EU code returns EU transparency) [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetGroupDetail()

facebookGetGroupDetail($group_id): mixed

Get group detail

Get a Facebook group's details.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group_id = 'group_id_example'; // string

try {
    $result = $apiInstance->facebookGetGroupDetail($group_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetGroupDetail: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
group_id string

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetGroupPosts()

facebookGetGroupPosts($group_id, $after): mixed

Get group posts

Get a Facebook group's post feed.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$group_id = 'group_id_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookGetGroupPosts($group_id, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetGroupPosts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
group_id string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetPageDetail()

facebookGetPageDetail($identifier): mixed

Get page detail

Get a Facebook Page's profile (name, category, followers, about).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$identifier = 'identifier_example'; // string

try {
    $result = $apiInstance->facebookGetPageDetail($identifier);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetPageDetail: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
identifier string

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetPagePosts()

facebookGetPagePosts($identifier, $after): mixed

Get page posts

Get a Facebook Page's timeline posts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$identifier = 'identifier_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookGetPagePosts($identifier, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetPagePosts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
identifier string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetPostComments()

facebookGetPostComments($post_id, $url, $after, $sort): mixed

Get post comments

Get a Facebook post's comment thread, 10 per page. sort is relevance (Facebook's ranked order, the default) or newest. Follow end_cursor while has_next_page to walk the whole thread; total_count is how many the post has.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$post_id = 'post_id_example'; // string
$url = 'url_example'; // string | Full post permalink/reel URL — overrides post_id
$after = 'after_example'; // string
$sort = 'relevance'; // string | relevance | newest

try {
    $result = $apiInstance->facebookGetPostComments($post_id, $url, $after, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetPostComments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
post_id string
url string Full post permalink/reel URL — overrides post_id [optional]
after string [optional]
sort string relevance newest

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetPostDetail()

facebookGetPostDetail($post_id, $url): mixed

Get post detail

Get a Facebook post's detail: text, media, author, date and the reaction / comment / share counts. The comments themselves come from /posts/{post_id}/comments.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$post_id = 'post_id_example'; // string
$url = 'url_example'; // string | Full post permalink/reel URL — overrides post_id

try {
    $result = $apiInstance->facebookGetPostDetail($post_id, $url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetPostDetail: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
post_id string
url string Full post permalink/reel URL — overrides post_id [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetProfileDetail()

facebookGetProfileDetail($identifier): mixed

Get profile detail

Get a Facebook profile's details.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$identifier = 'identifier_example'; // string

try {
    $result = $apiInstance->facebookGetProfileDetail($identifier);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetProfileDetail: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
identifier string

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookGetProfilePosts()

facebookGetProfilePosts($identifier, $after): mixed

Get profile posts

Get a Facebook profile's timeline posts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$identifier = 'identifier_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookGetProfilePosts($identifier, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookGetProfilePosts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
identifier string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookListCategories()

facebookListCategories(): mixed

List categories

List Marketplace category slugs (free).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->facebookListCategories();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookListCategories: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookListLocations()

facebookListLocations(): mixed

List locations

List common Marketplace location slugs (free).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->facebookListLocations();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookListLocations: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchAdvertiserPages()

facebookSearchAdvertiserPages($query, $country): mixed

Search advertiser pages

Search advertiser Pages in the Ad Library — returns page ids, categories, likes/followers, verification and Instagram handles.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$query = 'query_example'; // string | Advertiser name or keyword
$country = 'US'; // string

try {
    $result = $apiInstance->facebookSearchAdvertiserPages($query, $country);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchAdvertiserPages: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Advertiser name or keyword
country string [optional] [default to 'US']

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchEvents()

facebookSearchEvents($q, $after): mixed

Search events

Search Facebook events.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchEvents($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchEvents: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchEverything()

facebookSearchEverything($q, $after): mixed

Search everything

Global Facebook search (top results across pages, people, groups, posts).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search query
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchEverything($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchEverything: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search query
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchGroups()

facebookSearchGroups($q, $after): mixed

Search groups

Search Facebook groups.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchGroups($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchGroups: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchMarketplace()

facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after): mixed

Search Marketplace

Search Facebook Marketplace listings by keyword and location. location must be a Facebook location slug (london, newcastleupontyne) or a numeric Facebook place id — the city_page_id on any listing is one. Human-readable names such as Durham, UK are rejected with a 400 rather than silently searching Facebook's San Francisco default.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$query = 'query_example'; // string | Search keywords
$location = 'nyc'; // string | Marketplace location slug or numeric place id
$min_price = 56; // int
$max_price = 56; // int
$days_since_listed = 56; // int
$sort_by = 'sort_by_example'; // string
$item_condition = 'item_condition_example'; // string
$delivery_method = 'delivery_method_example'; // string
$radius = 56; // int | Search radius around the location (km, or miles in the US)
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchMarketplace: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Search keywords
location string Marketplace location slug or numeric place id [optional] [default to 'nyc']
min_price int [optional]
max_price int [optional]
days_since_listed int [optional]
sort_by string [optional]
item_condition string [optional]
delivery_method string [optional]
radius int Search radius around the location (km, or miles in the US) [optional]
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchPages()

facebookSearchPages($q, $after): mixed

Search Pages

Search Facebook Pages.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchPages($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchPages: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchPeople()

facebookSearchPeople($q, $after): mixed

Search people

Search Facebook profiles.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchPeople($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchPeople: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchPlaces()

facebookSearchPlaces($q, $after): mixed

Search places

Search Facebook places.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchPlaces($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchPlaces: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchPosts()

facebookSearchPosts($q, $after): mixed

Search posts

Search public Facebook posts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchPosts($q, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchPosts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

facebookSearchTheAdLibrary()

facebookSearchTheAdLibrary($query, $country, $ad_type, $active_status, $after): mixed

Search the Ad Library

Search the Facebook Ad Library.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');


$apiInstance = new ScrapeBadger\Api\FacebookApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$query = 'query_example'; // string | Advertiser or keyword
$country = 'US'; // string
$ad_type = 'all'; // string
$active_status = 'active'; // string
$after = 'after_example'; // string

try {
    $result = $apiInstance->facebookSearchTheAdLibrary($query, $country, $ad_type, $active_status, $after);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FacebookApi->facebookSearchTheAdLibrary: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Advertiser or keyword
country string [optional] [default to 'US']
ad_type string [optional] [default to 'all']
active_status string [optional] [default to 'active']
after string [optional]

Return type

mixed

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]