Skip to content

Commit 51deedc

Browse files
author
vlad-outscraper
committed
add Examples
1 parent 839d7f0 commit 51deedc

File tree

5 files changed

+359
-0
lines changed

5 files changed

+359
-0
lines changed

examples/Emails And Contacts.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Emails And Contacts Scraper With Java
2+
3+
Allows finding email addresses, social links, and phones from domains via [Outscraper API](https://app.outscraper.com/api-docs#tag/Emails-and-Contacts).
4+
5+
## Installation
6+
7+
Java 11 or later
8+
9+
### Gradle
10+
11+
Edit your build.gradle file
12+
``` sh
13+
repositories {
14+
maven { url "https://jitpack.io" }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.outscraper:outscraper-java:v1.0.4'
19+
}
20+
```
21+
22+
### Maven
23+
24+
Add the JitPack repository to your build file
25+
``` sh
26+
<repositories>
27+
<repository>
28+
<id>jitpack.io</id>
29+
<url>https://jitpack.io</url>
30+
</repository>
31+
</repositories>
32+
```
33+
34+
Add the dependency
35+
``` sh
36+
<dependency>
37+
<groupId>com.github.outscraper</groupId>
38+
<artifactId>outscraper-java</artifactId>
39+
<version>v1.0.4</version>
40+
</dependency>
41+
```
42+
43+
### Others
44+
45+
You'll need to manually install the following JARs:
46+
- [The Outscraper JAR](https://jitpack.io/com/github/outscraper/outscraper-java/v1.0.4/outscraper-java-v1.0.4.jar)
47+
- [Json](https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar)
48+
- [Httpcomponents](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar)
49+
- [Guava](https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar)
50+
51+
## Initialization
52+
```java
53+
OutscraperClient client = new OutscraperClient("SECRET_API_KEY");
54+
```
55+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
56+
57+
## Usage
58+
59+
```java
60+
# Search contacts from website:
61+
JSONArray results = client.emailsAndContacts(new HashMap<String, Object>() {{
62+
put("query", "outscraper.com");
63+
}});
64+
System.out.println(results);
65+
```

examples/Google Maps Reviews.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Google Maps Reviews Scraper With Java
2+
3+
The library provides real-time access to the reviews from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Reviews).
4+
5+
## Installation
6+
7+
Java 11 or later
8+
9+
### Gradle
10+
11+
Edit your build.gradle file
12+
``` sh
13+
repositories {
14+
maven { url "https://jitpack.io" }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.outscraper:outscraper-java:v1.0.4'
19+
}
20+
```
21+
22+
### Maven
23+
24+
Add the JitPack repository to your build file
25+
``` sh
26+
<repositories>
27+
<repository>
28+
<id>jitpack.io</id>
29+
<url>https://jitpack.io</url>
30+
</repository>
31+
</repositories>
32+
```
33+
34+
Add the dependency
35+
``` sh
36+
<dependency>
37+
<groupId>com.github.outscraper</groupId>
38+
<artifactId>outscraper-java</artifactId>
39+
<version>v1.0.4</version>
40+
</dependency>
41+
```
42+
43+
### Others
44+
45+
You'll need to manually install the following JARs:
46+
- [The Outscraper JAR](https://jitpack.io/com/github/outscraper/outscraper-java/v1.0.4/outscraper-java-v1.0.4.jar)
47+
- [Json](https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar)
48+
- [Httpcomponents](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar)
49+
- [Guava](https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar)
50+
51+
## Initialization
52+
```java
53+
OutscraperClient client = new OutscraperClient("SECRET_API_KEY");
54+
```
55+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
56+
57+
## Usage
58+
59+
```java
60+
// Get reviews of the specific place by id
61+
JSONArray results = client.googleMapsReviewsV3(new HashMap<String, Object>() {{
62+
put("query", "ChIJrc9T9fpYwokRdvjYRHT8nI4");
63+
put("reviewsLimit", 20);
64+
put("language", "en");
65+
}});
66+
System.out.println(results);
67+
68+
// Get reviews for places found by search query
69+
JSONArray results = client.googleMapsReviewsV3(new HashMap<String, Object>() {{
70+
put("query", "Memphis Seoul brooklyn usa");
71+
put("reviewsLimit", 20);
72+
put("limit", 20);
73+
put("language", "en");
74+
}});
75+
System.out.println(results);
76+
77+
// Get only new reviews during last 24 hours
78+
Integer yesterdayTimestamp = 1657980986;
79+
JSONArray results = client.googleMapsReviewsV3(new HashMap<String, Object>() {{
80+
put("query", "ChIJrc9T9fpYwokRdvjYRHT8nI4");
81+
put("sort", "newest");
82+
put("cutoff", yesterdayTimestamp);
83+
put("reviewsLimit", 100);
84+
put("language", "en");
85+
}});
86+
System.out.println(results);
87+
```

examples/Google Maps.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Google Maps Scraper With Java
2+
3+
The library provides real-time access to the places from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Maps).
4+
5+
## Installation
6+
7+
Java 11 or later
8+
9+
### Gradle
10+
11+
Edit your build.gradle file
12+
``` sh
13+
repositories {
14+
maven { url "https://jitpack.io" }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.outscraper:outscraper-java:v1.0.4'
19+
}
20+
```
21+
22+
### Maven
23+
24+
Add the JitPack repository to your build file
25+
``` sh
26+
<repositories>
27+
<repository>
28+
<id>jitpack.io</id>
29+
<url>https://jitpack.io</url>
30+
</repository>
31+
</repositories>
32+
```
33+
34+
Add the dependency
35+
``` sh
36+
<dependency>
37+
<groupId>com.github.outscraper</groupId>
38+
<artifactId>outscraper-java</artifactId>
39+
<version>v1.0.4</version>
40+
</dependency>
41+
```
42+
43+
### Others
44+
45+
You'll need to manually install the following JARs:
46+
- [The Outscraper JAR](https://jitpack.io/com/github/outscraper/outscraper-java/v1.0.4/outscraper-java-v1.0.4.jar)
47+
- [Json](https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar)
48+
- [Httpcomponents](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar)
49+
- [Guava](https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar)
50+
51+
## Initialization
52+
```java
53+
OutscraperClient client = new OutscraperClient("SECRET_API_KEY");
54+
```
55+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
56+
57+
## Usage
58+
59+
```java
60+
// Search for businesses in specific locations:
61+
JSONArray results = client.googleMapsSearchV2(new HashMap<String, Object>() {{
62+
put("query", "restaurants brooklyn usa");
63+
put("limit", 20);
64+
put("language", "en");
65+
put("region", "us");
66+
}});
67+
System.out.println(results);
68+
69+
// Get data of the specific place by id
70+
JSONArray results = client.googleMapsSearchV2(new HashMap<String, Object>() {{
71+
put("query", "ChIJrc9T9fpYwokRdvjYRHT8nI4");
72+
put("language", "en");
73+
}});
74+
System.out.println(results);
75+
```

examples/Google SERP.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Google Search Results Scraper With Java
2+
3+
The library returns search results from Google based on a given search query via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Search).
4+
5+
## Installation
6+
7+
Java 11 or later
8+
9+
### Gradle
10+
11+
Edit your build.gradle file
12+
``` sh
13+
repositories {
14+
maven { url "https://jitpack.io" }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.outscraper:outscraper-java:v1.0.4'
19+
}
20+
```
21+
22+
### Maven
23+
24+
Add the JitPack repository to your build file
25+
``` sh
26+
<repositories>
27+
<repository>
28+
<id>jitpack.io</id>
29+
<url>https://jitpack.io</url>
30+
</repository>
31+
</repositories>
32+
```
33+
34+
Add the dependency
35+
``` sh
36+
<dependency>
37+
<groupId>com.github.outscraper</groupId>
38+
<artifactId>outscraper-java</artifactId>
39+
<version>v1.0.4</version>
40+
</dependency>
41+
```
42+
43+
### Others
44+
45+
You'll need to manually install the following JARs:
46+
- [The Outscraper JAR](https://jitpack.io/com/github/outscraper/outscraper-java/v1.0.4/outscraper-java-v1.0.4.jar)
47+
- [Json](https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar)
48+
- [Httpcomponents](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar)
49+
- [Guava](https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar)
50+
51+
## Initialization
52+
```java
53+
OutscraperClient client = new OutscraperClient("SECRET_API_KEY");
54+
```
55+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
56+
57+
## Usage
58+
59+
```java
60+
// Search for SERP results:
61+
JSONArray results = client.googleSearchV3(new HashMap<String, Object>() {{
62+
put("query", "buy iphone 13 TX");
63+
put("language", "en");
64+
put("region", "us");
65+
}});
66+
System.out.println(results);
67+
```

examples/Phones Validator.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Phone Numbers Enricher/Validator With Java
2+
3+
Returns phones carrier data (name/type), validates phones, ensures messages deliverability via [Outscraper API](https://app.outscraper.com/api-docs#tag/Phones/paths/~1phones-enricher/get).
4+
5+
## Installation
6+
7+
Java 11 or later
8+
9+
### Gradle
10+
11+
Edit your build.gradle file
12+
``` sh
13+
repositories {
14+
maven { url "https://jitpack.io" }
15+
}
16+
17+
dependencies {
18+
implementation 'com.github.outscraper:outscraper-java:v1.0.4'
19+
}
20+
```
21+
22+
### Maven
23+
24+
Add the JitPack repository to your build file
25+
``` sh
26+
<repositories>
27+
<repository>
28+
<id>jitpack.io</id>
29+
<url>https://jitpack.io</url>
30+
</repository>
31+
</repositories>
32+
```
33+
34+
Add the dependency
35+
``` sh
36+
<dependency>
37+
<groupId>com.github.outscraper</groupId>
38+
<artifactId>outscraper-java</artifactId>
39+
<version>v1.0.4</version>
40+
</dependency>
41+
```
42+
43+
### Others
44+
45+
You'll need to manually install the following JARs:
46+
- [The Outscraper JAR](https://jitpack.io/com/github/outscraper/outscraper-java/v1.0.4/outscraper-java-v1.0.4.jar)
47+
- [Json](https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar)
48+
- [Httpcomponents](https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar)
49+
- [Guava](https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar)
50+
51+
## Initialization
52+
```java
53+
OutscraperClient client = new OutscraperClient("SECRET_API_KEY");
54+
```
55+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
56+
57+
## Usage
58+
59+
```java
60+
// Get information about the phone number:
61+
JSONArray results = client.phonesEnricher(new HashMap<String, Object>() {{
62+
put("query", "12812368208");
63+
}});
64+
System.out.println(results);
65+
```

0 commit comments

Comments
 (0)