> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Post by URL

> Retrieve a post by its public platform permalink (stored as post_url)

## Get Post by URL

Returns the same payload as [Get Post](/api-reference/posts/get), but looks up the record by the **exact** `post_url` saved on a published platform row (`platform_posts.post_url`), scoped to workspaces your token can access.

Use this when you have a share link (for example `https://x.com/user/status/123`) instead of the internal PostSyncer post id.

### Path encoding

The URL must be passed as **one path segment**. Percent-encode it (RFC 3986), so slashes and colons become `%2F`, `%3A`, etc.

### Request

<ParamField path="post_url" type="string" required>
  Percent-encoded public permalink matching the stored platform post URL
</ParamField>

<ParamField query="include_comments" type="boolean" default="false">
  Same as [Get Post](/api-reference/posts/get): include comments and CRM contact info when true
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://postsyncer.com/api/v1/posts/by-url/https%3A%2F%2Fx.com%2Fuser%2Fstatus%2F1234567890?include_comments=false" \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```
</RequestExample>

### Response

Same fields as [Get Post](/api-reference/posts/get).

### Error Codes

<ResponseField name="401" type="Unauthorized">
  Missing or invalid API token
</ResponseField>

<ResponseField name="403" type="Forbidden">
  Token does not have the `posts` ability
</ResponseField>

<ResponseField name="404" type="Not Found">
  No post with this URL in any accessible workspace
</ResponseField>
