POST/api/v1/resolve-url-typeUtility

Resolve URL Type

Analyze a raw Reddit URL and determine its exact resource type (post, comment, user, subreddit) and extract its canonical identifiers.

Ready to try it?

Create a free account — 30 requests included, no credit card.

Get free API key →

Request Parameters

Send as a JSON body in your POST request.

ParameterTypeRequired
urlstringYes

Code Examples

curl

curl -X POST https://subscraper.dev/api/v1/resolve-url-type \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.reddit.com/r/reactjs/comments/1ab2c3d/why_i_moved_all_my_side_projects/k2xyz/"
  }'

TypeScript SDK

const resolution = await client.resolveUrlType({
  url: "https://www.reddit.com/r/reactjs/comments/1ab2c3d/why_i_moved_all_my_side_projects/k2xyz/"
});
Install the SDK →

Sample Response

{
  "type": "comment",
  "postId": "t3_1ab2c3d",
  "commentId": "t1_k2xyz",
  "subreddit": "reactjs",
  "canonicalUrl": "https://reddit.com/r/reactjs/comments/1ab2c3d/_/k2xyz"
}

Common Use Cases

  • Building smart input fields for Reddit scrapers
  • Validating user-submitted Reddit links before processing
  • Routing internal logic based on link type

Credits

Each call to /api/v1/resolve-url-type uses 1 credit. Free tier includes 30 credits. View pricing →

Related Tools & Guides

All developer tools →

Related Endpoints

Start using /resolve-url-type now

Free tier — 30 requests, no credit card required.