> For the complete documentation index, see [llms.txt](https://wilcode-net.gitbook.io/all-social-media-video-downloader-apify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wilcode-net.gitbook.io/all-social-media-video-downloader-apify/get-download-link.md).

# Get Download Link

Get direct download link from platform

### Overview <a href="#api-request" id="api-request"></a>

Below is an example of how to use the API to get the video download link of the platforms.

Proxy is required to get the list of download links.

### API Request <a href="#api-request" id="api-request"></a>

**Endpoint:** [https://api.apify.com/v2/acts/wilcode\~all-social-media-video-downloader/runs?token=\<YOUR\_API\_TOKEN>](https://api.apify.com/v2/acts/wilcode~all-social-media-video-downloader/runs?token=<YOUR_API_TOKEN>)

**Method:** POST

**Headers:**

```json
{
  "Content-Type": "application/json"
}
```

**Request Body:**

```json
{
  "url": "https://www.youtube.com/watch?v=HCjNJDNzw8Y",
  "proxySettings": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "CA"
  }
}
```

### cURL

```sh
curl -X POST "https://api.apify.com/v2/acts/wilcode~all-social-media-video-downloader/runs?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.youtube.com/watch?v=HCjNJDNzw8Y",
    "proxySettings": {
      "useApifyProxy": true,
      "apifyProxyGroups": ["RESIDENTIAL"],
      "apifyProxyCountry": "CA"
    }
  }'

```

### JSON Results <a href="#json-results" id="json-results"></a>

```json
{
    "title": "Video title",
    "uploader": "Channel Name",
    "channel": "Channel Name",
    "upload_date": "20240706",
    "duration": 100,
    "description": "",
    "like_count": 478,
    "comment_count": 19,
    "thumbnail": "image thumbnail url",
    "formats": [
      {
        "resolution": "720x1080",
        "url": "url download"
      },
      {
        "resolution": "1080x1920",
        "url": "url download"
      },
      {
        "resolution": "audio only",
        "url": "url download"
      },
    ]
}


```

{% hint style="info" %}
The list of download links and resolutions will be listed in the formats attribute.
{% endhint %}

### Other language examples

#### Fetch in JavaScript

```javascript
const fetch = require('node-fetch');

const endpoint = 'https://api.apify.com/v2/acts/wilcode~all-social-media-video-downloader/runs?token=<YOUR_API_TOKEN>';

const requestBody = {
  url: 'https://www.youtube.com/watch?v=HCjNJDNzw8Y',
  proxySettings: {
    useApifyProxy: true,
    apifyProxyGroups: ['RESIDENTIAL'],
    apifyProxyCountry: 'CA'
  }
};

fetch(endpoint, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(requestBody)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

```

#### Python

```python
import requests

endpoint = 'https://api.apify.com/v2/acts/wilcode~all-social-media-video-downloader/runs?token=<YOUR_API_TOKEN>'

headers = {
    'Content-Type': 'application/json'
}

body = {
    'url': 'https://www.youtube.com/watch?v=HCjNJDNzw8Y',
    'proxySettings': {
        'useApifyProxy': True,
        'apifyProxyGroups': ['RESIDENTIAL'],
        'apifyProxyCountry': 'CA'
    }
}

response = requests.post(endpoint, headers=headers, json=body)
print(response.json())

```

#### C\#

```csharp
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        string endpoint = "https://api.apify.com/v2/acts/wilcode~all-social-media-video-downloader/runs?token=<YOUR_API_TOKEN>";

        // Define request body
        var requestBody = new
        {
            url = "https://www.youtube.com/watch?v=HCjNJDNzw8Y",
            proxySettings = new
            {
                useApifyProxy = true,
                apifyProxyGroups = new[] { "RESIDENTIAL" },
                apifyProxyCountry = "CA"
            }
        };

        // Convert request body to JSON
        string jsonBody = System.Text.Json.JsonSerializer.Serialize(requestBody);

        using (HttpClient client = new HttpClient())
        {
            // Set headers
            client.DefaultRequestHeaders.Add("Content-Type", "application/json");

            // Send POST request
            HttpResponseMessage response = await client.PostAsync(
                endpoint,
                new StringContent(jsonBody, Encoding.UTF8, "application/json")
            );

            // Get response content
            string responseContent = await response.Content.ReadAsStringAsync();

            // Print response
            Console.WriteLine("Response:");
            Console.WriteLine(responseContent);
        }
    }
}

```
