1. Go to this page and download the library: Download laravel-gtm/nerdydata-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laravel-gtm / nerdydata-sdk example snippets
use LaravelGtm\NerdyDataSdk\NerdyDataSdk;
$sdk = NerdyDataSdk::make(token: 'your-api-key');
use LaravelGtm\NerdyDataSdk\ValueObjects\SearchQuery;
use LaravelGtm\NerdyDataSdk\ValueObjects\SearchTerm;
$search = new SearchQuery(
all: [SearchTerm::report('d513e568-ad32-44b5-b0c8-1b7d3fbe88a6')],
any: [SearchTerm::code('cdn.shopify.com')],
none: [SearchTerm::code('cdn.bigcommerce.com')],
);
// Convenience forms put every supplied term in the `all` bucket.
$search = SearchQuery::code('cdn.shopify.com', 'shopify.js');
$search = SearchQuery::report('d513e568-ad32-44b5-b0c8-1b7d3fbe88a6');
// GET /search
$results = $sdk->searchCode($search, start: 25);
foreach ($results->sites as $site) {
$site->domain;
$site->company;
$site->linkedin;
}
$results->total;
$results->nextPage;
// GET /search/title
$titles = $sdk->searchTitles(SearchQuery::code('Shopify'));
// GET /search/description
$descriptions = $sdk->searchDescriptions(SearchQuery::code('commerce platform'));