# LinkedIn Post

Get details from a LinkedIn post or article.

- **Documentation:** [https://scrappa.co/docs/linkedin-api/linkedin_post](https://scrappa.co/docs/linkedin-api/linkedin_post)
- **API group:** LinkedIn API
- **Endpoint:** `GET https://scrappa.co/api/linkedin/post`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | LinkedIn post URL |
| `use_cache` | boolean | No | Whether to use cached results (default: false) |
| `maximum_cache_age` | integer | No | Maximum age of cached results in seconds |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/linkedin/post?url=https%3A%2F%2Fwww.linkedin.com%2Fposts%2Fjohn-doe_technology-innovation-activity-1234567890"
```

## Example response

```json
{
    "success": true,
    "data": {
        "post": {
            "media": [
                {
                    "url": "https://media.licdn.com/image1.jpg",
                    "type": "image"
                }
            ],
            "author": {
                "name": "John Doe",
                "headline": "Software Engineer at TechCorp",
                "profileUrl": "https://www.linkedin.com/in/john-doe"
            },
            "content": "Excited to share our latest product update...",
            "postUrl": "https://www.linkedin.com/posts/john-doe_technology-innovation-activity-1234567890",
            "hashtags": [
                "#technology",
                "#innovation"
            ],
            "engagement": {
                "likes": 342,
                "comments": 28,
                "reposts": 15,
                "total": 385
            },
            "publishedAt": "2024-01-15T10:30:00+00:00",
            "comments": [
                {
                    "author": "Jane Smith",
                    "text": "Great post! Thanks for sharing.",
                    "date": "2024-01-15T11:00:00+00:00"
                }
            ]
        },
        "cached": false,
        "cached_at": null
    },
    "message": "LinkedIn post data retrieved successfully"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The url parameter is missing or is not a valid LinkedIn post URL. |
| 404 | Post Not Found Or Private | The post was not found, private, or not publicly accessible. |
| 503 | LinkedIn Temporarily Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
