Leetcode Graphql Apify Actor
Pricing
Pay per usage
Go to Apify Store

Example
Leetcode Graphql Apify Actor
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Kapil
Maintained by Community
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
LeetCode GraphQL Data Extractor (Apify Actor)
This Apify actor extracts data from LeetCode by running targeted GraphQL queries directly against the https://leetcode.com/graphql/ endpoint.
What it does
- Includes a catalog of over 70+ LeetCode GraphQL operations (from user profiles to question details).
- Allows you to select exactly which query you want to run from a dropdown.
- Accepts specific input parameters (like
usernameortitleSlug) to customize the query. - Extracts the exact data requested and saves the raw JSON payload to the Apify dataset.
How to use
- Select an Operation: Choose the query you want to execute (e.g.,
userPublicProfile,questionTitle,submissionList). - Provide Variables: Provide the corresponding inputs for that query.
- Example 1: If querying
userPublicProfile, enter a valid LeetCodeusername. - Example 2: If querying
questionTitle, enter thetitleSlug(e.g.,two-sum).
- Example 1: If querying
- Run the Actor: The actor will fetch the data and push it into the dataset.
Local Development
- Install dependencies:
npm install
- Configure your inputs in
storage/key_value_stores/default/INPUT.json. - Run the actor:
npm start
Example INPUT.json
To extract the profile of a specific user:
{"operationName": "userPublicProfile","username": "kapil-2305"}
To extract a question's details:
{"operationName": "questionTitle","titleSlug": "two-sum"}
Output
The result is pushed to the default dataset and includes:
- The
operationNameandvariablesused. - The
dataproperty containing the raw JSON response from LeetCode. - Execution status and timings.