Tinq\Scraper

Official Tinq.ai PHP SDK.

All URIs are relative to https://tinq.ai/api/v2, except if the operation defines another base path.

MethodHTTP requestDescription
extractArticlePOST /scraper/extract-articleExtract article
googleSearchPOST /scraper/googleGoogle Search
scrapePOST /scraper/scrapeScrape

extractArticle()

extractArticle($accept, $body)

Extract article

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Scraper(
    // 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
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->extractArticle($accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Scraper->extractArticle: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

googleSearch()

googleSearch($accept, $body)

Google Search

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Scraper(
    // 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
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->googleSearch($accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Scraper->googleSearch: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

scrape()

scrape($accept, $body)

Scrape

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Scraper(
    // 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
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->scrape($accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Scraper->scrape: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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