{"id":13405418,"url":"https://github.com/postaddictme/instagram-php-scraper","last_synced_at":"2025-04-25T14:49:53.993Z","repository":{"id":37444366,"uuid":"56836583","full_name":"postaddictme/instagram-php-scraper","owner":"postaddictme","description":"Get account information, photos, videos, stories and comments.","archived":false,"fork":false,"pushed_at":"2023-10-08T12:22:23.000Z","size":653,"stargazers_count":3153,"open_issues_count":61,"forks_count":798,"subscribers_count":161,"default_branch":"master","last_synced_at":"2025-04-24T08:56:23.152Z","etag":null,"topics":["instagram","instagram-api","instagram-client","instagram-php-scraper","instagram-scraper","instagram-sdk"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/raiym/instagram-php-scraper","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postaddictme.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-22T07:44:18.000Z","updated_at":"2025-04-23T20:41:52.000Z","dependencies_parsed_at":"2022-07-13T16:44:28.622Z","dependency_job_id":"92389cd9-af0d-4833-be2b-ffd90b5387f3","html_url":"https://github.com/postaddictme/instagram-php-scraper","commit_stats":{"total_commits":432,"total_committers":136,"mean_commits":3.176470588235294,"dds":0.6712962962962963,"last_synced_commit":"43da4f92f2b0d2fc8837d077a029836446b01dcc"},"previous_names":[],"tags_count":114,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postaddictme%2Finstagram-php-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postaddictme%2Finstagram-php-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postaddictme%2Finstagram-php-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postaddictme%2Finstagram-php-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postaddictme","download_url":"https://codeload.github.com/postaddictme/instagram-php-scraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250838800,"owners_count":21495819,"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":["instagram","instagram-api","instagram-client","instagram-php-scraper","instagram-scraper","instagram-sdk"],"created_at":"2024-07-30T19:02:01.575Z","updated_at":"2025-04-25T14:49:53.975Z","avatar_url":"https://github.com/postaddictme.png","language":"PHP","funding_links":[],"categories":["PHP","Scrape and download data from Instagram"],"sub_categories":[],"readme":"# Instagram PHP Scraper\nThis library is based on the Instagram web version. We develop it because nowadays it is hard to get an approved Instagram application. The purpose is to support every feature that the web desktop and mobile version support. \n\n## Dependencies\n- PHP \u003e= 7.2\n- [PSR-16](http://www.php-fig.org/psr/psr-16/)\n- [PSR-18](http://www.php-fig.org/psr/psr-18/)\n\n\n## Code Example\n```php\nuse Phpfastcache\\Helper\\Psr16Adapter;\n\n$instagram = \\InstagramScraper\\Instagram::withCredentials(new \\GuzzleHttp\\Client(), 'username', 'password', new Psr16Adapter('Files'));\n$instagram-\u003elogin();\n$account = $instagram-\u003egetAccountById(3);\necho $account-\u003egetUsername();\n```\n\nSome methods do not require authentication: \n```php\n$instagram = new \\InstagramScraper\\Instagram(new \\GuzzleHttp\\Client());\n$nonPrivateAccountMedias = $instagram-\u003egetMedias('kevin');\necho $nonPrivateAccountMedias[0]-\u003egetLink();\n```\n\nIf you use authentication it is recommended to cache the user session. In this case you don't need to run the `$instagram-\u003elogin()` method every time your program runs:\n\n```php\nuse Phpfastcache\\Helper\\Psr16Adapter;\n\n$instagram = \\InstagramScraper\\Instagram::withCredentials(new \\GuzzleHttp\\Client(), 'username', 'password', new Psr16Adapter('Files'));\n$instagram-\u003elogin(); // will use cached session if you want to force login $instagram-\u003elogin(true)\n$instagram-\u003esaveSession();  //DO NOT forget this in order to save the session, otherwise have no sense\n$account = $instagram-\u003egetAccountById(3);\necho $account-\u003egetUsername();\n```\n\nUsing proxy for requests:\n\n```php\n// https://docs.guzzlephp.org/en/stable/request-options.html#proxy\n$instagram = new \\InstagramScraper\\Instagram(new \\GuzzleHttp\\Client(['proxy' =\u003e 'tcp://localhost:8125']));\n// Request with proxy\n$account = $instagram-\u003egetAccount('kevin');\n\\InstagramScraper\\Instagram::setHttpClient(new \\GuzzleHttp\\Client());\n// Request without proxy\n$account = $instagram-\u003egetAccount('kevin');\n```\n\n## Installation\n\n### Using composer\n\n```sh\ncomposer.phar require raiym/instagram-php-scraper phpfastcache/phpfastcache\n```\nor \n```sh\ncomposer require raiym/instagram-php-scraper phpfastcache/phpfastcache\n```\n\n### If you don't have composer\nYou can download it [here](https://getcomposer.org/download/).\n\n## Examples\nSee examples [here](https://github.com/postaddictme/instagram-php-scraper/tree/master/examples).\n\n## Other\nJava library: https://github.com/postaddictme/instagram-java-scraper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostaddictme%2Finstagram-php-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostaddictme%2Finstagram-php-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostaddictme%2Finstagram-php-scraper/lists"}