{"id":22104016,"url":"https://github.com/webbamboo/seoresearch-serp-sdk","last_synced_at":"2025-03-24T02:28:47.770Z","repository":{"id":62547378,"uuid":"253446041","full_name":"WebBamboo/seoresearch-serp-sdk","owner":"WebBamboo","description":"Google SERP results in PHP via Seoresearch API","archived":false,"fork":false,"pushed_at":"2020-04-10T06:53:31.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T08:35:27.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://seoresearch.net","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebBamboo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-06T09:02:38.000Z","updated_at":"2020-04-10T06:53:33.000Z","dependencies_parsed_at":"2022-11-02T22:16:02.035Z","dependency_job_id":null,"html_url":"https://github.com/WebBamboo/seoresearch-serp-sdk","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebBamboo%2Fseoresearch-serp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebBamboo%2Fseoresearch-serp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebBamboo%2Fseoresearch-serp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebBamboo%2Fseoresearch-serp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebBamboo","download_url":"https://codeload.github.com/WebBamboo/seoresearch-serp-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245197875,"owners_count":20576276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T06:19:46.890Z","updated_at":"2025-03-24T02:28:47.750Z","avatar_url":"https://github.com/WebBamboo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google SERP Results in PHP\nSEOResearch SERP API enables you to scrape Google search results straight from your code. It requires a [free registration](https://seoresearch.net/google-search-api/) at Seoresearch.net\n# Quick start\nFor composer ([Packagist](https://packagist.org/packages/webbamboo/seoresearch-serp-sdk)).\n```bash\ncomposer require webbamboo/seoresearch-serp-sdk\n```\nLoad the dependency in your script:\n```php\n\u003c?php\nrequire __DIR__ . '/vendor/autoload.php';\n```\n\nGet your api key and secret from https://app.seoresearch.net/user/profile \n# Usage\nYou can check out the examples folder for usage examples. The workflow is the following\n\n- [You create a SERP request](https://seoresearch.net/documents/serp-request/) - This adds your SERP query to our system and one of our bots will process it in up to 10 minutes, depending on the current load. You can provide an \"Endpoint\" parameter where our server can POST the results once they are dono, or you can manually query the serper\n- [Get SERP results](https://seoresearch.net/documents/serp-results/) - You query our API with the ID you've received in the previous method\n\n## Instantiate the api object with your api key and secret\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\n\nuse Seoresearch\\Sdk;\nuse Seoresearch\\Serp;\n\n$apiKey = 'YOUR_API_KEY';\n$apiSecret = 'YOUR_API_SECRET';\n\n$sdk = new Sdk($apiKey, $apiSecret);\n```\n\n## Get SERP history\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\n\nuse Seoresearch\\Sdk;\nuse Seoresearch\\Serp;\n\n$apiKey = 'YOUR_API_KEY';\n$apiSecret = 'YOUR_API_SECRET';\n\n$sdk = new Sdk($apiKey, $apiSecret);\n\nvar_dump($sdk-\u003egetHistory());\n```\n## Create SERP request\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\nuse Seoresearch\\Sdk;\nuse Seoresearch\\Serp;\n\n$apiKey = 'YOUR_API_KEY';\n$apiSecret = 'YOUR_API_SECRET';\n\n$sdk = new Sdk($apiKey, $apiSecret);\n\n$serp = new Serp();\n$serp-\u003ekeyword = 'serp api google';\n$serp-\u003eendpoint = 'http://your-webhook-url.com/webhook.php';\n\n$serp-\u003esendToApi($sdk);\nvar_dump($serp);\n```\n## Get SERP results\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\n\nuse Seoresearch\\Sdk;\nuse Seoresearch\\Serp;\n\n$apiKey = 'YOUR_API_KEY';\n$apiSecret = 'YOUR_API_SECRET';\n\n$sdk = new Sdk($apiKey, $apiSecret);\n\n$serp = new Serp();\n$serp-\u003efromId($sdk, 'YOUR_SERP_ID');\n\nvar_dump($serp);\n```\n## Webhook\n```php\n\u003c?php\nrequire_once('vendor/autoload.php');\n\nuse Seoresearch\\Sdk;\nuse Seoresearch\\Serp;\n\n$apiKey = 'YOUR_API_KEY';\n$apiSecret = 'YOUR_API_SECRET';\n\n$sdk = new Sdk($apiKey, $apiSecret);\n\nvar_dump($sdk-\u003ewebhook($_POST, true));\n```\n## Anatomy of a SERP object\nIn order to populate a Serp object you can set the following properties: location, endpoint, mobile, keyword. You can see more about how that works in the [Create SERP request](#Create_SERP_request_49) section.\nMethods:\n- fromId(Sdk $sdk, $id) - Queries the API and hydrates the Serp object with the data. Takes an SDK object and Serp ID as a parameter.\n- fromData($apiData) - Hydrates a Serp object from API response string\n- sendToApi(Sdk $sdk) - Creates the actual Serp object in the API and updates the Serp object with the ID of the created resource\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbamboo%2Fseoresearch-serp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbamboo%2Fseoresearch-serp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbamboo%2Fseoresearch-serp-sdk/lists"}