From 41100c460220f2986f193f19c266cab8c8699fe4 Mon Sep 17 00:00:00 2001 From: Kseniia Maiesh Date: Wed, 23 Jul 2025 09:09:41 +0300 Subject: [PATCH 1/2] added new examples, yellowpages --- examples/Company Insights.md | 32 ++++++++++++++++++++++++ examples/Company Website Finder.md | 32 ++++++++++++++++++++++++ examples/Email Addresses Finder.md | 32 ++++++++++++++++++++++++ examples/Google Maps Photos Scraper.md | 33 +++++++++++++++++++++++++ examples/SimilarWeb Scraper.md | 32 ++++++++++++++++++++++++ examples/Tripadvisor Reviews Scraper.md | 33 +++++++++++++++++++++++++ examples/Trustpilot Reviews Scraper.md | 32 ++++++++++++++++++++++++ examples/Trustpilot Scraper.md | 32 ++++++++++++++++++++++++ examples/Trustpilot Search Scraper.md | 33 +++++++++++++++++++++++++ examples/Yellow Pages Search Scraper.md | 32 ++++++++++++++++++++++++ examples/Youtube Comments Scraper.md | 32 ++++++++++++++++++++++++ lib/outscraper.rb | 31 +++++++++++++++++++++++ lib/outscraper/version.rb | 2 +- 13 files changed, 387 insertions(+), 1 deletion(-) create mode 100644 examples/Company Insights.md create mode 100644 examples/Company Website Finder.md create mode 100644 examples/Email Addresses Finder.md create mode 100644 examples/Google Maps Photos Scraper.md create mode 100644 examples/SimilarWeb Scraper.md create mode 100644 examples/Tripadvisor Reviews Scraper.md create mode 100644 examples/Trustpilot Reviews Scraper.md create mode 100644 examples/Trustpilot Scraper.md create mode 100644 examples/Trustpilot Search Scraper.md create mode 100644 examples/Yellow Pages Search Scraper.md create mode 100644 examples/Youtube Comments Scraper.md diff --git a/examples/Company Insights.md b/examples/Company Insights.md new file mode 100644 index 0000000..6f2835f --- /dev/null +++ b/examples/Company Insights.md @@ -0,0 +1,32 @@ +# Company Insights With Python + +Finds company details such as revenue, size, founding year, public status, etc. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Other-Services/paths/~1company-insights/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about the companies: +results = client.company_insights('outscraper.com') +``` diff --git a/examples/Company Website Finder.md b/examples/Company Website Finder.md new file mode 100644 index 0000000..06b5aca --- /dev/null +++ b/examples/Company Website Finder.md @@ -0,0 +1,32 @@ +# Company Website Finder With Python + +Finds company websites based on business names.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Domain-Related/paths/~1company-website-finder/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about business: +results = client.company_website_finder('Apple Inc') +``` diff --git a/examples/Email Addresses Finder.md b/examples/Email Addresses Finder.md new file mode 100644 index 0000000..3eb5a63 --- /dev/null +++ b/examples/Email Addresses Finder.md @@ -0,0 +1,32 @@ +# Email Addresses Finder With Python + +Allows to validate email addresses. Checks if emails are deliverable. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Email-Related/paths/~1email-validator/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Validate email addresses: +results = client.validate_emails('support@outscraper.com') +``` diff --git a/examples/Google Maps Photos Scraper.md b/examples/Google Maps Photos Scraper.md new file mode 100644 index 0000000..3572d2b --- /dev/null +++ b/examples/Google Maps Photos Scraper.md @@ -0,0 +1,33 @@ +# Google Maps Photos Scraper With Python + +Returns Google Maps photos from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using IDs or names (e.g., NoMad Restaurant, NY, USA, 0x886916e8bc273979:0x5141fcb11460b226, ChIJu7bMNFV-54gR-lrHScvPRX4). +In case no photos were found by your search criteria, your search request will consume the usage of one photo.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Google/paths/~1maps~1photos-v3/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about the places photos: +results = client.google_maps_photos('The NoMad Restaurant, NY, USA') +``` diff --git a/examples/SimilarWeb Scraper.md b/examples/SimilarWeb Scraper.md new file mode 100644 index 0000000..64c7306 --- /dev/null +++ b/examples/SimilarWeb Scraper.md @@ -0,0 +1,32 @@ +# SimilarWeb Scraper With Python + +Returns website analytics data including traffic, rankings, audience insights, and competitive intelligence from SimilarWeb [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Domain-Related/paths/~1similarweb/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get data from Similarweb businesses: +results = client.similarweb('apple.com') +``` diff --git a/examples/Tripadvisor Reviews Scraper.md b/examples/Tripadvisor Reviews Scraper.md new file mode 100644 index 0000000..ab3e3f1 --- /dev/null +++ b/examples/Tripadvisor Reviews Scraper.md @@ -0,0 +1,33 @@ +# Tripadvisor Reviews Scraper With Python + +Returns reviews from Tripadvisor businesses. +In case no reviews were found by your search criteria, your search request will consume the usage of one review. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1tripadvisor-reviews/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about business: +results = client.tripadvisor_reviews('https://www.tripadvisor.com Restaurant_Review-g187147-d12947099-Reviews-Mayfair_Garden-Paris_Ile_de_France.html') +``` diff --git a/examples/Trustpilot Reviews Scraper.md b/examples/Trustpilot Reviews Scraper.md new file mode 100644 index 0000000..8f23f65 --- /dev/null +++ b/examples/Trustpilot Reviews Scraper.md @@ -0,0 +1,32 @@ +# Trustpilot Reviews Scraper With Python + +Returns reviews from Trustpilot businesses. In case no reviews were found by your search criteria, your search request will consume the usage of one review.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1trustpilot~1reviews/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about the reviews from Trustpilot: +results = client.trustpilot_reviews('https://www.trustpilot.com/review/outscraper.com') +``` diff --git a/examples/Trustpilot Scraper.md b/examples/Trustpilot Scraper.md new file mode 100644 index 0000000..e1e99df --- /dev/null +++ b/examples/Trustpilot Scraper.md @@ -0,0 +1,32 @@ +# Trustpilot Scraper With Python + +Returns data from Trustpilot businesses. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Businesses-and-POI/paths/~1trustpilot/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Search data from Trustpilot businesses: +results = client.trustpilot('outscraper.com') +``` diff --git a/examples/Trustpilot Search Scraper.md b/examples/Trustpilot Search Scraper.md new file mode 100644 index 0000000..7bac975 --- /dev/null +++ b/examples/Trustpilot Search Scraper.md @@ -0,0 +1,33 @@ +# Trustpilot Search Scraper With Python + +Returns search results from Trustpilot. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Trustpilot/paths/~1trustpilot~1search/get). + + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about the search results from Trustpilot: +results = client.trustpilot_search('real estate') +``` diff --git a/examples/Yellow Pages Search Scraper.md b/examples/Yellow Pages Search Scraper.md new file mode 100644 index 0000000..12f0ac9 --- /dev/null +++ b/examples/Yellow Pages Search Scraper.md @@ -0,0 +1,32 @@ +# Emails And Contacts Scraper With Ruby + +Allows finding email addresses, social links, and phones from domains via [Outscraper API](https://app.outscraper.com/api-docs#tag/Emails-and-Contacts). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Search results from Yellow Pages: +results = client.yellowpages_search('restaurants') +``` diff --git a/examples/Youtube Comments Scraper.md b/examples/Youtube Comments Scraper.md new file mode 100644 index 0000000..ed0115e --- /dev/null +++ b/examples/Youtube Comments Scraper.md @@ -0,0 +1,32 @@ +# Youtube Comments Scraper With Python + +Returns comments from YouTube videos.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1youtube-comments/get). + +## Installation + +Install the gem and add to the application's Gemfile by executing: +```bash +bundle add outscraper +``` + +If bundler is not being used to manage dependencies, install the gem by executing: +```bash +gem install outscraper +``` + +[Link to the Ruby package page](https://rubygems.org/gems/outscraper) + +## Initialization +```ruby +require 'Outscraper' + +client = Outscraper::Client.new('SECRET_API_KEY') +``` +[Link to the profile page to create the API key](https://app.outscraper.com/profile) + +## Usage + +```ruby +# Get information about the comments from YouTube videos: +results = client.youtube_comments('https://www.youtube.com/watch?v=ph5pHgklaZ0') +``` diff --git a/lib/outscraper.rb b/lib/outscraper.rb index 9f22102..8cdc16a 100644 --- a/lib/outscraper.rb +++ b/lib/outscraper.rb @@ -321,5 +321,36 @@ def trustpilot_search(query, limit: 100, skip: 0, enrichment: [], fields: '', as async: async_request }).parsed_response['data'] end + + def similarweb(query, fields: '', async_request: false) + response = self.class.get('/similarweb', query: { + query: query.is_a?(Array) ? query : [query], + fields: fields, + async: async_request + }).parsed_response['data'] + end + + def company_website_finder(query, fields: '', async_request: false) + response = self.class.get('/company-website-finder', query: { + query: query.is_a?(Array) ? query : [query], + fields: fields, + async: async_request + }).parsed_response['data'] + end + + def yellowpages_search(query, location: 'New York, NY', limit: 100, region: nil, enrichment: [], fields: '', async_request: false, ui: nil, webhook: nil) + enrichment_array = enrichment.is_a?(Array) ? enrichment : [enrichment] + response = self.class.get('/yellowpages-search', query: { + query: query.is_a?(Array) ? query : [query], + location: location, + limit: limit, + region: region, + enrichment: enrichment_array, + fields: fields, + async: async_request, + ui: ui, + webhook: webhook + }).parsed_response['data'] + end end end diff --git a/lib/outscraper/version.rb b/lib/outscraper/version.rb index fe218d9..7222609 100644 --- a/lib/outscraper/version.rb +++ b/lib/outscraper/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Outscraper - VERSION = "0.3.0" + VERSION = "0.3.2" end From 86074deadcb49fb9cdbc70e48d8aa28ac7e9b413 Mon Sep 17 00:00:00 2001 From: Kseniia Maiesh Date: Wed, 23 Jul 2025 09:11:54 +0300 Subject: [PATCH 2/2] fixes --- examples/Company Insights.md | 2 +- examples/Company Website Finder.md | 2 +- examples/Email Addresses Finder.md | 2 +- examples/Google Maps Photos Scraper.md | 2 +- examples/SimilarWeb Scraper.md | 2 +- examples/Tripadvisor Reviews Scraper.md | 2 +- examples/Trustpilot Reviews Scraper.md | 2 +- examples/Trustpilot Scraper.md | 2 +- examples/Trustpilot Search Scraper.md | 2 +- examples/Youtube Comments Scraper.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/Company Insights.md b/examples/Company Insights.md index 6f2835f..237d0bd 100644 --- a/examples/Company Insights.md +++ b/examples/Company Insights.md @@ -1,4 +1,4 @@ -# Company Insights With Python +# Company Insights With Ruby Finds company details such as revenue, size, founding year, public status, etc. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Other-Services/paths/~1company-insights/get). diff --git a/examples/Company Website Finder.md b/examples/Company Website Finder.md index 06b5aca..3d85802 100644 --- a/examples/Company Website Finder.md +++ b/examples/Company Website Finder.md @@ -1,4 +1,4 @@ -# Company Website Finder With Python +# Company Website Finder With Ruby Finds company websites based on business names.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Domain-Related/paths/~1company-website-finder/get). diff --git a/examples/Email Addresses Finder.md b/examples/Email Addresses Finder.md index 3eb5a63..22b0252 100644 --- a/examples/Email Addresses Finder.md +++ b/examples/Email Addresses Finder.md @@ -1,4 +1,4 @@ -# Email Addresses Finder With Python +# Email Addresses Finder With Ruby Allows to validate email addresses. Checks if emails are deliverable. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Email-Related/paths/~1email-validator/get). diff --git a/examples/Google Maps Photos Scraper.md b/examples/Google Maps Photos Scraper.md index 3572d2b..06ae705 100644 --- a/examples/Google Maps Photos Scraper.md +++ b/examples/Google Maps Photos Scraper.md @@ -1,4 +1,4 @@ -# Google Maps Photos Scraper With Python +# Google Maps Photos Scraper With Ruby Returns Google Maps photos from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using IDs or names (e.g., NoMad Restaurant, NY, USA, 0x886916e8bc273979:0x5141fcb11460b226, ChIJu7bMNFV-54gR-lrHScvPRX4). In case no photos were found by your search criteria, your search request will consume the usage of one photo.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Google/paths/~1maps~1photos-v3/get). diff --git a/examples/SimilarWeb Scraper.md b/examples/SimilarWeb Scraper.md index 64c7306..93b9a5b 100644 --- a/examples/SimilarWeb Scraper.md +++ b/examples/SimilarWeb Scraper.md @@ -1,4 +1,4 @@ -# SimilarWeb Scraper With Python +# SimilarWeb Scraper With Ruby Returns website analytics data including traffic, rankings, audience insights, and competitive intelligence from SimilarWeb [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Domain-Related/paths/~1similarweb/get). diff --git a/examples/Tripadvisor Reviews Scraper.md b/examples/Tripadvisor Reviews Scraper.md index ab3e3f1..c8c9186 100644 --- a/examples/Tripadvisor Reviews Scraper.md +++ b/examples/Tripadvisor Reviews Scraper.md @@ -1,4 +1,4 @@ -# Tripadvisor Reviews Scraper With Python +# Tripadvisor Reviews Scraper With Ruby Returns reviews from Tripadvisor businesses. In case no reviews were found by your search criteria, your search request will consume the usage of one review. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1tripadvisor-reviews/get). diff --git a/examples/Trustpilot Reviews Scraper.md b/examples/Trustpilot Reviews Scraper.md index 8f23f65..75f5dc0 100644 --- a/examples/Trustpilot Reviews Scraper.md +++ b/examples/Trustpilot Reviews Scraper.md @@ -1,4 +1,4 @@ -# Trustpilot Reviews Scraper With Python +# Trustpilot Reviews Scraper With Ruby Returns reviews from Trustpilot businesses. In case no reviews were found by your search criteria, your search request will consume the usage of one review.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1trustpilot~1reviews/get). diff --git a/examples/Trustpilot Scraper.md b/examples/Trustpilot Scraper.md index e1e99df..ac99b16 100644 --- a/examples/Trustpilot Scraper.md +++ b/examples/Trustpilot Scraper.md @@ -1,4 +1,4 @@ -# Trustpilot Scraper With Python +# Trustpilot Scraper With Ruby Returns data from Trustpilot businesses. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Businesses-and-POI/paths/~1trustpilot/get). diff --git a/examples/Trustpilot Search Scraper.md b/examples/Trustpilot Search Scraper.md index 7bac975..dad0060 100644 --- a/examples/Trustpilot Search Scraper.md +++ b/examples/Trustpilot Search Scraper.md @@ -1,4 +1,4 @@ -# Trustpilot Search Scraper With Python +# Trustpilot Search Scraper With Ruby Returns search results from Trustpilot. [Outscraper API](https://app.outscraper.cloud/api-docs#tag/Trustpilot/paths/~1trustpilot~1search/get). diff --git a/examples/Youtube Comments Scraper.md b/examples/Youtube Comments Scraper.md index ed0115e..898cb5c 100644 --- a/examples/Youtube Comments Scraper.md +++ b/examples/Youtube Comments Scraper.md @@ -1,4 +1,4 @@ -# Youtube Comments Scraper With Python +# Youtube Comments Scraper With Ruby Returns comments from YouTube videos.[Outscraper API](https://app.outscraper.cloud/api-docs#tag/Reviews-and-Comments/paths/~1youtube-comments/get).