> 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/post-scraper.md).

# Post Scraper

You have to send a GET request to **`https://api.scrapingdog.com/profile/post`** along with the below given parameters. Each successful request will cost **`5`** credits.

### Parameters

| Parameters                                                      | 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>Post ID.<br><br>Type: <em><strong>String</strong></em></p>                                            |

### API Example

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

```bash
curl "https://api.scrapingdog.com/profile/post?api_key=APIKEY&id=6976499964512243712"
```

{% endtab %}

{% tab title="Python" %}

<pre class="language-python"><code class="lang-python">import requests

<strong>url = "https://api.scrapingdog.com/profile/post"
</strong>
params = {
    "api_key": "APIKEY",
    "id": "6976499964512243712"
}

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}")

</code></pre>

{% endtab %}

{% tab title="Node JS" %}

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

const url = 'https://api.scrapingdog.com/profile/post';
const params = {
    api_key: 'APIKEY',
    id: '6976499964512243712'
};

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/post';
$params = array(
    'api_key' => 'APIKEY',
    'id' => '6976499964512243712'
);

// 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/post')
params = {
  api_key: 'APIKEY',
  id: '6976499964512243712'
}

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/post/?api_key=APIKEY&id=6976499964512243712";
            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 %}


---

# 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:

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

The question should be specific, self-contained, and written in natural language.
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.
