# Person Profile Scraper

This API can be used for scraping any public person's profile. You just have to pass the profile ID to our API.&#x20;

You have to send a GET request to **`https://api.scrapingdog.com/profile`** along with the below given parameters.

### Parameters

| Parameter                                                       | Description                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>api\_key<br><br><mark style="color:red;">required</mark></p> | <p>Your personal API key. Available on your dashboard<br><br>Type: <em><strong>String</strong></em></p>                                                                                                                                                                                                                                |
| <p>id<br><br><mark style="color:red;">required</mark></p>       | <p>This is the ID of any person profile. This can be found inside the URL of any person profile.<br><br>Type: <em><strong>String</strong></em></p>                                                                                                                                                                                     |
| <p>type<br><br><mark style="color:red;">required</mark></p>     | <p>This is a string that helps us to identify whether you want to scrape a person profile or a company profile.<br></p><p>For a person profile, you have to pass <strong><code>type=profile</code></strong></p><p></p><p>Type: <em><strong>String</strong></em><br></p>                                                                |
| premium                                                         | <p>This is a boolean parameter that can enable premium proxies to bypass LinkedIn's fun captcha.<br><br>By default it is <strong><code>false</code></strong>.<br><br>Type: <em><strong>String</strong></em></p>                                                                                                                        |
| webhook                                                         | <p>This parameter is used to schedule the scraping of a profile after 2-3 minutes. This can only be used when <code>type=profile</code>. This method is preferred when retrieving profile data as it increases the success rate of obtaining the profile.<br><br>It is <code>false</code> by default.<br><br>Type: <em>String</em></p> |

### API Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl "https://api.scrapingdog.com/profile/?api_key=5eaa61a6e562fc52fe763tr516e4653&type=profile&id=rbranson"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.scrapingdog.com/profile/"

params = {
    "api_key": "5eaa61a6e562fc52fe763tr516e4653",
    "type": "profile",
    "id": "rbranson"
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")

```

{% endtab %}

{% tab title="Nodejs" %}

```javascript
const axios = require('axios');

const url = 'https://api.scrapingdog.com/profile/';
const params = {
    api_key: '5eaa61a6e562fc52fe763tr516e4653',
    type: 'profile',
    id: 'rbranson'
};

axios.get(url, { params: params })
    .then(response => {
        if (response.status === 200) {
            const data = response.data;
            console.log(data);
        } else {
            console.log(`Request failed with status code: ${response.status}`);
        }
    })
    .catch(error => {
        console.error('An error occurred:', error);
    });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

// URL and parameters
$url = 'https://api.scrapingdog.com/profile/';
$params = array(
    'api_key' => '5eaa61a6e562fc52fe763tr516e4653',
    'type' => 'profile',
    'id' => 'rbranson'
);

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check for errors
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response
    echo $response;
}

// Close the cURL session
curl_close($ch);
?>

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'

url = URI.parse('https://api.scrapingdog.com/profile/')
params = {
  api_key: '5eaa61a6e562fc52fe763tr516e4653',
  type: 'profile',
  id: 'rbranson'
}

url.query = URI.encode_www_form(params)

response = Net::HTTP.get_response(url)

if response.is_a?(Net::HTTPSuccess)
  puts response.body
else
  puts "HTTP request failed: #{response.code} #{response.message}"
end

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        try {
            String apiUrl = "https://api.scrapingdog.com/profile/?api_key=5eaa61a6e562fc52fe763tr516e4653&type=profile&id=rbranson";
            URL url = new URL(apiUrl);

            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("GET");

            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed: " + responseCode);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}
{% endtabs %}
