jovix / dataforseo-clientv3
PHP Client for DataForSeo
Installs: 41 904
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 5
Forks: 13
Open Issues: 21
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: >=7.0
- symfony/var-dumper: >=5.0
- dev-master
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- 1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-fix-google-page-intersection
- dev-master_older
- dev-fix-google-page-intersection-intersection_result
- dev-fix-google-related-keywords
- dev-fix-datalabs-historical-serps
- dev-fix-yelp-reviews-model
- dev-feat-add-yelp-search-endpoints
- dev-feat-add-technologies-technology-stats
- dev-feat-add-backlinks-referring-countries
- dev-fix-backlinks-page-intersection-new-structure
- dev-feat-new-endpoint-content-generation
- dev-feat-add-new-fields-to-content-generation-generate-text
- dev-feat-add-domains_by_html_terms
- dev-feat-add-content-generation-api
- dev-feat-dataset-se-type-serp
- dev-fix-referring-networks
- dev-fix-domain-intersection
- dev-feat-datalabs-app-data
- dev-feat-backlinks-domain-pages-summary
- dev-fix-googleRankedKeywordsLive-add-historical_serp_mode
- dev-fix-googlePageIntersection
- dev-fix-google-domain-competitors
- dev-fix-similarweb-live
- dev-fix-backlinks-variadic
- dev-feat-new-serp-se-type
- dev-fix-keywords-data-api-models-mapper
- dev-fix-datalabs_mapper
- dev-fix-search-after-token-backlink
- dev-feat-app-data
- dev-feat-amazon-reviews
- dev-fix-trustpilot-tripadvisor
- dev-feat-trustpilot-tripadvisor
- dev-feat-add-new-entities-to-datalabs
- dev-feat-add-bulk-backlinks-models
- dev-feat-test-older-version
- dev-feat-test-merge
- dev-feat-add-new-entity-to-serp-live
- dev-update_models
- dev-backlinks_models
- dev-fix_for_init_default_methods
- dev-feat-new-serp-model-and-entity
- dev-feat-new-onpage-model-and-entity
- dev-postback_handler
- dev-feat-new-datamaper-generator
- dev-update_models_end_entities
- dev-fix_for_serp_competitors_kewords_positions
- dev-kostyl_for_traffic_analytics_get_estimated
This package is auto-updated.
Last update: 2024-11-14 11:40:44 UTC
README
This is a PHP client library for the DataForSEO API. The library describes models for working with API endpoints. As new endpoints are added, the library will be updated.
Requirements
PHP 7.3 and later
Installation
composer require jovix/dataforseo-clientv3
Usage
In the simple version, your application should look like this:
public
config.php
index.php
vendor
composer.json
composer.lock
The config.php
file contains:
<?php return $config = [ 'DATAFORSEO_LOGIN' => 'login', 'DATAFORSEO_PASSWORD' => 'password', 'timeoutForEachRequests' => 120, 'apiVersion' => '/v3/', 'url' => 'https://api.dataforseo.com', // You can set extra paths for Entities // For all entity we use namespace: DFSClientV3\Entity\Custom // Last index will have the priority 'extraEntitiesPaths' => [ 'your full path to extra entity', 'your full path to extra entity' ], ];
The index.php
file contains:
<?php include_once '../vendor/autoload.php'; $client = new DFSClientV3\DFSClient(); $client->setConfig('config.php'); // You will receive detailed information about your API usage $model = new \DFSClientV3\Models\CommonApi\User(); // You can get an object whose essence is described in the appropriating entity // (attention, may contain outdated data) $res = $model->get(); print_r($res); // You can get the JSON answer $res = $model->getAsJson(); print_r($res); // You will receive SERP data specific to the indicated keyword, search engine, and location parameters $model = new \DFSClientV3\Models\SerpApi\SettingSerpLiveAdvanced(); $model->setSe("google"); $model->setSeType("organic"); $model->setKeyword("seo"); $model->setLocationCode(2840); $model->setLanguageCode("en"); $res = $model->getAsJson(); print_r($res);