> For the complete documentation index, see [llms.txt](https://docs.scrapingdog.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scrapingdog.com/profile-scraper-api/company-profile-scraper.md).

# Company Profile Scraper

This API can be used for scraping any public company profile. You just have to pass the company 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 company profile. This can be found inside the URL of any company 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 company profile, you have to pass <strong><code>type=company</code></strong></p><p></p><p>Type: <em><strong>String</strong></em><br></p> |

### API Example

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

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/profile/"

params = {
    "api_key": api_key,
    "type": "company",
    "id": "amazon"
}

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

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

```

{% endtab %}

{% tab title="Nodejs" %}

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

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const type = 'company';
const id = 'amazon';

const apiUrl = 'https://api.scrapingdog.com/profile/';

axios
  .get(apiUrl, {
    params: {
      api_key,
      type,
      id,
    }
  })
  .then(response => {
    if (response.status === 200) {
      const data = response.data;
      console.log(data);
    } else {
      console.log(`HTTP request failed with status code ${response.status}`);
    }
  })
  .catch(error => {
    console.error(`An error occurred: ${error}`);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$type = 'company';
$id = 'amazon';

$url = "https://api.scrapingdog.com/profile/?api_key=$api_key&type=$type&id=$id";

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch);
}

curl_close($ch);

if ($response) {
    echo $response;
}
?>

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'httparty'

api_key = '5eaa61a6e562fc52fe763tr516e4653'
type = 'company'
id = 'amazon'

url = "https://api.scrapingdog.com/profile/?api_key=#{api_key}&type=#{type}&id=#{id}"

response = HTTParty.get(url)

if response.code == 200
  puts response.body
else
  puts "Request failed with status code: #{response.code}"
end

```

{% endtab %}

{% tab title="Java" %}

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

public class LinkedInApiRequest {
    public static void main(String[] args) {
        try {
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String type = "company";
            String id = "amazon";
            
            String url = "https://api.scrapingdog.com/profile/?api_key=" + apiKey + "&type=" + type + "&id=" + id;
            
            URL apiUrl = new URL(url);
            HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
            connection.setRequestMethod("GET");
            
            int responseCode = connection.getResponseCode();
            
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();
                
                while ((inputLine = in.readLine()) != null) {
                    response.append(inputLine);
                }
                in.close();
                
                System.out.println(response.toString());
            } else {
                System.out.println("Request failed with status code: " + responseCode);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scrapingdog.com/profile-scraper-api/company-profile-scraper.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
