
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
url-to-json-markdown
Advanced tools
A TypeScript library that fetches URLs and converts them to structured JSON and Markdown format.
A TypeScript library that fetches URLs and converts them to structured JSON and Markdown format.
Built by 16x Writer and 16x Eval team.
npm install url-to-json-markdown
import { urlToJsonMarkdown } from 'url-to-json-markdown';
// Reddit post (using fallback without credentials)
const post = await urlToJsonMarkdown(
'https://www.reddit.com/r/example/comments/12345/title/'
);
console.log(post.title); // "Post Title"
console.log(post.content); // "# Post Title\n\nPost content...\n\nby _username_ (↑ 123) 12/25/2024"
console.log(post.type); // "reddit"
// Reddit post with credentials (more reliable)
const postWithCreds = await urlToJsonMarkdown(
'https://www.reddit.com/r/example/comments/12345/title/',
{
clientId: 'your_client_id',
clientSecret: 'your_client_secret',
}
);
// Reddit post with comments included
const postWithComments = await urlToJsonMarkdown(
'https://www.reddit.com/r/example/comments/12345/title/',
{
clientId: 'your_client_id',
clientSecret: 'your_client_secret',
includeComments: true,
}
);
// Will include "## Comments" section with tree-structured comments
// Reddit comment
const comment = await urlToJsonMarkdown(
'https://www.reddit.com/r/example/comments/12345/comment/abc123/'
);
console.log(comment.title); // "First line of comment..."
console.log(comment.content); // "# Comment by username\n\nComment text...\n\nby _username_ (↑ 45)"
console.log(comment.type); // "reddit"
// Reddit comment with child comments/replies
const commentWithReplies = await urlToJsonMarkdown(
'https://www.reddit.com/r/example/comments/12345/comment/abc123/',
{ includeComments: true }
);
// Will include "## Replies" section with tree-structured child comments
// Generic web page
const webpage = await urlToJsonMarkdown('https://example.com/article');
console.log(webpage.title); // "Article Title"
console.log(webpage.content); // "# Article Title\n\nMain content as markdown..."
console.log(webpage.type); // "generic"
urlToJsonMarkdown(url: string, options?: RedditOptions): Promise<UrlToJsonResult>Parameters:
url - The URL to fetch and convertoptions - Optional Reddit configurationReddit Options:
interface RedditOptions {
clientId?: string;
clientSecret?: string;
includeComments?: boolean;
}
clientId & clientSecret - Reddit API credentials for more reliable accessincludeComments - Include comments in a tree structure (Reddit posts) or child comments/replies (Reddit comments)Return Type:
interface UrlToJsonResult {
title: string;
content: string;
type: 'reddit' | 'generic';
}
For Reddit URLs, the library supports two modes:
Fallback mode (no credentials): Uses browser user agent to access Reddit's public JSON API. May be subject to rate limiting.
Authenticated mode (with credentials): Uses Reddit OAuth API for more reliable access. Requires Reddit app credentials.
To get Reddit credentials:
FAQs
A TypeScript library that fetches URLs and converts them to structured JSON and Markdown format.
The npm package url-to-json-markdown receives a total of 5 weekly downloads. As such, url-to-json-markdown popularity was classified as not popular.
We found that url-to-json-markdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.