LeetCode topic tags API

Use the LeetCode topic tags API to retrieve topic tags, record identities and titles and source-page links as structured JSON from LeetCode. The operation can be requested without a mandatory query selector. Use these results to choose programming exercises by difficulty or topic and connect study plans with problem references. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.

Selected price
$0.002 / billing creditPublished pricing
Sellers / implementations
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...

Run sends a real API request. Charges follow the published API contract.

Request parameters
Optional parameters (5)
0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
1 skips the 24-hour cache and fetches live.
JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.

Sample response

{
  "cached": false,
  "count": 75,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:29:41.692Z",
  "tags": [
    {
      "name": "Array",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=array",
      "slug": "array",
      "url": "https://leetcode.com/tag/array/"
    },
    {
      "name": "Hash Table",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=hash-table",
      "slug": "hash-table",
      "url": "https://leetcode.com/tag/hash-table/"
    },
    {
      "name": "Linked List",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=linked-list",
      "slug": "linked-list",
      "url": "https://leetcode.com/tag/linked-list/"
    },
    {
      "name": "Math",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=math",
      "slug": "math",
      "url": "https://leetcode.com/tag/math/"
    },
    {
      "name": "Two Pointers",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=two-pointers",
      "slug": "two-pointers",
      "url": "https://leetcode.com/tag/two-pointers/"
    },
    {
      "name": "String",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=string",
      "slug": "string",
      "url": "https://leetcode.com/tag/string/"
    },
    {
      "name": "Binary Search",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=binary-search",
      "slug": "binary-search",
      "url": "https://leetcode.com/tag/binary-search/"
    },
    {
      "name": "Divide and Conquer",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=divide-and-conquer",
      "slug": "divide-and-conquer",
      "url": "https://leetcode.com/tag/divide-and-conquer/"
    },
    {
      "name": "Dynamic Programming",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=dynamic-programming",
      "slug": "dynamic-programming",
      "url": "https://leetcode.com/tag/dynamic-programming/"
    },
    {
      "name": "Backtracking",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=backtracking",
      "slug": "backtracking",
      "url": "https://leetcode.com/tag/backtracking/"
    },
    {
      "name": "Stack",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=stack",
      "slug": "stack",
      "url": "https://leetcode.com/tag/stack/"
    },
    {
      "name": "Heap",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=heap",
      "slug": "heap",
      "url": "https://leetcode.com/tag/heap/"
    },
    {
      "name": "Greedy",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=greedy",
      "slug": "greedy",
      "url": "https://leetcode.com/tag/greedy/"
    },
    {
      "name": "Bit Manipulation",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=bit-manipulation",
      "slug": "bit-manipulation",
      "url": "https://leetcode.com/tag/bit-manipulation/"
    },
    {
      "name": "Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=tree",
      "slug": "tree",
      "url": "https://leetcode.com/tag/tree/"
    },
    {
      "name": "Depth-First Search",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=depth-first-search",
      "slug": "depth-first-search",
      "url": "https://leetcode.com/tag/depth-first-search/"
    },
    {
      "name": "Breadth-First Search",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=breadth-first-search",
      "slug": "breadth-first-search",
      "url": "https://leetcode.com/tag/breadth-first-search/"
    },
    {
      "name": "Union-Find",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=union-find",
      "slug": "union-find",
      "url": "https://leetcode.com/tag/union-find/"
    },
    {
      "name": "Graph Theory",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=graph",
      "slug": "graph",
      "url": "https://leetcode.com/tag/graph/"
    },
    {
      "name": "Design",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=design",
      "slug": "design",
      "url": "https://leetcode.com/tag/design/"
    },
    {
      "name": "Topological Sort",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=topological-sort",
      "slug": "topological-sort",
      "url": "https://leetcode.com/tag/topological-sort/"
    },
    {
      "name": "Trie",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=trie",
      "slug": "trie",
      "url": "https://leetcode.com/tag/trie/"
    },
    {
      "name": "Binary Indexed Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=binary-indexed-tree",
      "slug": "binary-indexed-tree",
      "url": "https://leetcode.com/tag/binary-indexed-tree/"
    },
    {
      "name": "Segment Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=segment-tree",
      "slug": "segment-tree",
      "url": "https://leetcode.com/tag/segment-tree/"
    },
    {
      "name": "Binary Search Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=binary-search-tree",
      "slug": "binary-search-tree",
      "url": "https://leetcode.com/tag/binary-search-tree/"
    },
    {
      "name": "Recursion",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=recursion",
      "slug": "recursion",
      "url": "https://leetcode.com/tag/recursion/"
    },
    {
      "name": "Brainteaser",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=brainteaser",
      "slug": "brainteaser",
      "url": "https://leetcode.com/tag/brainteaser/"
    },
    {
      "name": "Memoization",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=memoization",
      "slug": "memoization",
      "url": "https://leetcode.com/tag/memoization/"
    },
    {
      "name": "Queue",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=queue",
      "slug": "queue",
      "url": "https://leetcode.com/tag/queue/"
    },
    {
      "name": "Minimax",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=minimax-algorithm",
      "slug": "minimax-algorithm",
      "url": "https://leetcode.com/tag/minimax-algorithm/"
    },
    {
      "name": "Reservoir Sampling",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=reservoir-sampling",
      "slug": "reservoir-sampling",
      "url": "https://leetcode.com/tag/reservoir-sampling/"
    },
    {
      "name": "Ordered Map",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=ordered-map",
      "slug": "ordered-map",
      "url": "https://leetcode.com/tag/ordered-map/"
    },
    {
      "name": "Geometry",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=geometry",
      "slug": "geometry",
      "url": "https://leetcode.com/tag/geometry/"
    },
    {
      "name": "Rejection Sampling",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=rejection-sampling",
      "slug": "rejection-sampling",
      "url": "https://leetcode.com/tag/rejection-sampling/"
    },
    {
      "name": "Sliding Window",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=sliding-window",
      "slug": "sliding-window",
      "url": "https://leetcode.com/tag/sliding-window/"
    },
    {
      "name": "Sweep Line",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=sweep-line",
      "slug": "sweep-line",
      "url": "https://leetcode.com/tag/sweep-line/"
    },
    {
      "name": "Rolling Hash",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=rolling-hash",
      "slug": "rolling-hash",
      "url": "https://leetcode.com/tag/rolling-hash/"
    },
    {
      "name": "Suffix Array",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=suffix-array",
      "slug": "suffix-array",
      "url": "https://leetcode.com/tag/suffix-array/"
    },
    {
      "name": "Meet in the Middle",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=meet-in-the-middle",
      "slug": "meet-in-the-middle",
      "url": "https://leetcode.com/tag/meet-in-the-middle/"
    },
    {
      "name": "Database",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=database",
      "slug": "database",
      "url": "https://leetcode.com/tag/database/"
    },
    {
      "name": "Shell",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=shell",
      "slug": "shell",
      "url": "https://leetcode.com/tag/shell/"
    },
    {
      "name": "Concurrency",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=concurrency",
      "slug": "concurrency",
      "url": "https://leetcode.com/tag/concurrency/"
    },
    {
      "name": "Sorting",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=sorting",
      "slug": "sorting",
      "url": "https://leetcode.com/tag/sorting/"
    },
    {
      "name": "Heap (Priority Queue)",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=heap-priority-queue",
      "slug": "heap-priority-queue",
      "url": "https://leetcode.com/tag/heap-priority-queue/"
    },
    {
      "name": "Merge Sort",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=merge-sort",
      "slug": "merge-sort",
      "url": "https://leetcode.com/tag/merge-sort/"
    },
    {
      "name": "String Matching",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=string-matching",
      "slug": "string-matching",
      "url": "https://leetcode.com/tag/string-matching/"
    },
    {
      "name": "Matrix",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=matrix",
      "slug": "matrix",
      "url": "https://leetcode.com/tag/matrix/"
    },
    {
      "name": "Monotonic Stack",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=monotonic-stack",
      "slug": "monotonic-stack",
      "url": "https://leetcode.com/tag/monotonic-stack/"
    },
    {
      "name": "Simulation",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=simulation",
      "slug": "simulation",
      "url": "https://leetcode.com/tag/simulation/"
    },
    {
      "name": "Combinatorics",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=combinatorics",
      "slug": "combinatorics",
      "url": "https://leetcode.com/tag/combinatorics/"
    },
    {
      "name": "Binary Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=binary-tree",
      "slug": "binary-tree",
      "url": "https://leetcode.com/tag/binary-tree/"
    },
    {
      "name": "Doubly-Linked List",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=doubly-linked-list",
      "slug": "doubly-linked-list",
      "url": "https://leetcode.com/tag/doubly-linked-list/"
    },
    {
      "name": "Interactive",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=interactive",
      "slug": "interactive",
      "url": "https://leetcode.com/tag/interactive/"
    },
    {
      "name": "Bucket Sort",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=bucket-sort",
      "slug": "bucket-sort",
      "url": "https://leetcode.com/tag/bucket-sort/"
    },
    {
      "name": "Radix Sort",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=radix-sort",
      "slug": "radix-sort",
      "url": "https://leetcode.com/tag/radix-sort/"
    },
    {
      "name": "Counting",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=counting",
      "slug": "counting",
      "url": "https://leetcode.com/tag/counting/"
    },
    {
      "name": "Data Stream",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=data-stream",
      "slug": "data-stream",
      "url": "https://leetcode.com/tag/data-stream/"
    },
    {
      "name": "Iterator",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=iterator",
      "slug": "iterator",
      "url": "https://leetcode.com/tag/iterator/"
    },
    {
      "name": "Hash Function",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=hash-function",
      "slug": "hash-function",
      "url": "https://leetcode.com/tag/hash-function/"
    },
    {
      "name": "Enumeration",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=enumeration",
      "slug": "enumeration",
      "url": "https://leetcode.com/tag/enumeration/"
    },
    {
      "name": "Number Theory",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=number-theory",
      "slug": "number-theory",
      "url": "https://leetcode.com/tag/number-theory/"
    },
    {
      "name": "Prefix Sum",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=prefix-sum",
      "slug": "prefix-sum",
      "url": "https://leetcode.com/tag/prefix-sum/"
    },
    {
      "name": "Quickselect",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=quickselect",
      "slug": "quickselect",
      "url": "https://leetcode.com/tag/quickselect/"
    },
    {
      "name": "Ordered Set",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=ordered-set",
      "slug": "ordered-set",
      "url": "https://leetcode.com/tag/ordered-set/"
    },
    {
      "name": "Monotonic Queue",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=monotonic-queue",
      "slug": "monotonic-queue",
      "url": "https://leetcode.com/tag/monotonic-queue/"
    },
    {
      "name": "Counting Sort",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=counting-sort",
      "slug": "counting-sort",
      "url": "https://leetcode.com/tag/counting-sort/"
    },
    {
      "name": "Game Theory",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=game-theory",
      "slug": "game-theory",
      "url": "https://leetcode.com/tag/game-theory/"
    },
    {
      "name": "Eulerian Circuit",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=eulerian-circuit",
      "slug": "eulerian-circuit",
      "url": "https://leetcode.com/tag/eulerian-circuit/"
    },
    {
      "name": "Randomized",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=randomized",
      "slug": "randomized",
      "url": "https://leetcode.com/tag/randomized/"
    },
    {
      "name": "Shortest Path",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=shortest-path",
      "slug": "shortest-path",
      "url": "https://leetcode.com/tag/shortest-path/"
    },
    {
      "name": "Bitmask",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=bitmask",
      "slug": "bitmask",
      "url": "https://leetcode.com/tag/bitmask/"
    },
    {
      "name": "Probability and Statistics",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=probability-and-statistics",
      "slug": "probability-and-statistics",
      "url": "https://leetcode.com/tag/probability-and-statistics/"
    },
    {
      "name": "Minimum Spanning Tree",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=minimum-spanning-tree",
      "slug": "minimum-spanning-tree",
      "url": "https://leetcode.com/tag/minimum-spanning-tree/"
    },
    {
      "name": "Biconnected Component",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=biconnected-component",
      "slug": "biconnected-component",
      "url": "https://leetcode.com/tag/biconnected-component/"
    },
    {
      "name": "Strongly Connected Component",
      "problems_url": "https://leetcode.com/problemset/?topicSlugs=strongly-connected-component",
      "slug": "strongly-connected-component",
      "url": "https://leetcode.com/tag/strongly-connected-component/"
    }
  ]
}

Response result

Response structure

Inferred from examples
  • cachedboolean
  • countinteger
  • credits_usedinteger
  • fetched_atstring
  • tagsobject[]
    • namestring
    • problems_urlstring
    • slugstring
    • urlstring

Loading related APIs…

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use LeetCode topic tags API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.