Skip to content

Latest commit

 

History

History
520 lines (357 loc) · 15.4 KB

File metadata and controls

520 lines (357 loc) · 15.4 KB

ScrapeBadger\YahooApi

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

Method HTTP request Description
yahooImageSearch() GET /v1/yahoo/images Image search
yahooListSupportedMarkets() GET /v1/yahoo/markets List supported markets
yahooNewsSearch() GET /v1/yahoo/news News search
yahooSearchSuggestions() GET /v1/yahoo/autocomplete Search suggestions
yahooVideoSearch() GET /v1/yahoo/videos Video search
yahooWebSearch() GET /v1/yahoo/search Web search
yahooYahooScraperHealthCheck() GET /v1/yahoo/health Yahoo scraper health check
yahooYahooScraperHealthCheckHead() HEAD /v1/yahoo/health Yahoo scraper health check

yahooImageSearch()

yahooImageSearch($query, $market, $count): mixed

Image search

Yahoo Images — thumbnail, full-size and source URL per result.

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\YahooApi(
    // 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, e.g. 'golden retriever'
$market = 'us'; // string | Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets.
$count = 30; // int | Results to return

try {
    $result = $apiInstance->yahooImageSearch($query, $market, $count);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooImageSearch: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Search keywords, e.g. 'golden retriever'
market string Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets. [optional] [default to 'us']
count int Results to return [optional] [default to 30]

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]

yahooListSupportedMarkets()

yahooListSupportedMarkets(): mixed

List supported markets

Supported Yahoo market codes. Free — costs no credits.

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\YahooApi(
    // 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->yahooListSupportedMarkets();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooListSupportedMarkets: ', $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]

yahooNewsSearch()

yahooNewsSearch($query, $market): mixed

News search

Yahoo News — headline, source, published time and snippet per article.

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\YahooApi(
    // 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, e.g. 'interest rates'
$market = 'us'; // string | Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets.

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

Parameters

Name Type Description Notes
query string Search keywords, e.g. 'interest rates'
market string Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets. [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]

yahooSearchSuggestions()

yahooSearchSuggestions($query, $market): mixed

Search suggestions

Yahoo search-box query suggestions.

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\YahooApi(
    // 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 | Partial search term, e.g. 'coff'
$market = 'us'; // string | Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets.

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

Parameters

Name Type Description Notes
query string Partial search term, e.g. 'coff'
market string Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets. [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]

yahooVideoSearch()

yahooVideoSearch($query, $market, $count): mixed

Video search

Yahoo Videos — title, thumbnail, duration, publisher and source per result.

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\YahooApi(
    // 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, e.g. 'espresso tutorial'
$market = 'us'; // string | Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets.
$count = 30; // int | Results to return

try {
    $result = $apiInstance->yahooVideoSearch($query, $market, $count);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooVideoSearch: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Search keywords, e.g. 'espresso tutorial'
market string Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets. [optional] [default to 'us']
count int Results to return [optional] [default to 30]

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]

yahooWebSearch()

yahooWebSearch($query, $market, $offset, $safe_search): mixed

Web search

Yahoo web SERP — organic results, ads, related searches and total count.

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\YahooApi(
    // 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, e.g. 'coffee machine'
$market = 'us'; // string | Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets.
$offset = 0; // int | Zero-based result offset for pagination
$safe_search = 'safe_search_example'; // string | off | moderate | strict (default moderate)

try {
    $result = $apiInstance->yahooWebSearch($query, $market, $offset, $safe_search);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooWebSearch: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Search keywords, e.g. 'coffee machine'
market string Yahoo market code, e.g. 'us', 'uk', 'fr', 'de'. See /markets. [optional] [default to 'us']
offset int Zero-based result offset for pagination [optional] [default to 0]
safe_search string off moderate

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]

yahooYahooScraperHealthCheck()

yahooYahooScraperHealthCheck(): mixed

Yahoo scraper health check

Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).

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\YahooApi(
    // 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->yahooYahooScraperHealthCheck();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooYahooScraperHealthCheck: ', $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]

yahooYahooScraperHealthCheckHead()

yahooYahooScraperHealthCheckHead(): mixed

Yahoo scraper health check

Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).

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\YahooApi(
    // 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->yahooYahooScraperHealthCheckHead();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling YahooApi->yahooYahooScraperHealthCheckHead: ', $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]