Leetcode Community Solutions Scraper avatar

Leetcode Community Solutions Scraper

Pricing

from $2.99 / 1,000 results

Go to Apify Store
Leetcode Community Solutions Scraper

Leetcode Community Solutions Scraper

This Actor collects community solution write-ups and code explanations from LeetCode problem solution tabs based on problem URLs, title slugs, programming languages, or topic tags. It extracts post titles, author details, upvote and view counts, tags, full explanatory text

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

real-estate-api

real-estate-api

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Features

Limited permissions

Share

LeetCode Community Solutions Scraper — Collect Public Solution Metadata and Engagement Metrics

LeetCode Community Solutions Scraper cover

Collect publicly available community solution metadata for LeetCode problems. Enter a problem slug to retrieve solution titles, view counts, favorite counts, and comment counts. Export the collected records for analysis, tracking, or research.

Features

  • Collect public community solutions for a specified LeetCode problem
  • Extract solution IDs and titles
  • Capture view, favorite, and comment counts
  • Associate each solution with its problem slug
  • Set a maximum number of solutions to collect
  • Export structured results for further analysis

What Data Does This Actor Extract?

FieldDescription
idUnique solution ID
solutionTitleCommunity solution title
viewCountNumber of views
favoriteCountNumber of favorites
commentCountNumber of comments
questionSlugLeetCode problem slug provided as input
scrapedAtISO timestamp indicating when the record was collected

Use Cases

  • Interview preparation: Identify popular community solutions for interview practice.
  • Engagement tracking: Monitor views, favorites, and comments for selected problems.
  • Solution catalogs: Build organized collections of community solutions.
  • Educational research: Explore which solutions attract the most community engagement.
  • Automated monitoring: Refresh solution metadata for selected problem slugs on a recurring schedule.

Input Parameters

ParameterTypeRequiredDefaultDescription
questionSlugStringNotwo-sumLeetCode problem slug
maxItemsIntegerNo3Maximum number of solutions to collect. Maximum: 1000
requestTimeoutSecsIntegerNo30Request timeout in seconds

Example Input

{
"questionSlug": "two-sum",
"maxItems": 3,
"requestTimeoutSecs": 30
}

Example Output

Each dataset record contains the following fields:

{
"id": "solution-id",
"solutionTitle": "Example Community Solution",
"viewCount": 1250,
"favoriteCount": 85,
"commentCount": 12,
"questionSlug": "two-sum",
"scrapedAt": "2026-11-22T10:00:00.000Z"
}

Frequently Asked Questions

Do I need a LeetCode account?

No. The Actor collects publicly available community solution metadata.

How many solutions can one run collect?

The Actor collects up to the configured maxItems value, with a maximum of 1000 solutions per run.

Can I collect solutions for different problems?

Yes. Change questionSlug to the slug of the LeetCode problem you want to collect solutions for.

Disclaimer

This is an independent tool and is not affiliated with, endorsed by, or officially associated with LeetCode. It collects publicly available information. Users are responsible for ensuring their use of collected data complies with applicable laws and the source website's terms.

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article Is web scraping legal?.