# LeetCode topic tags API

Get LeetCode Topic Tags data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, raw, and retrieve structured data including topic display name, topic filter slug, topic source URL, and source problem-list URL to build topic controls, and create source navigation.

Documentation: https://openany.si/leetcode/leetcode-topic-tags-api/73dfcab2-eb63-4c64-9348-6eb8c7863d61/
API ID: 73dfcab2-eb63-4c64-9348-6eb8c7863d61
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/leetcode/v1/tags
Page update time: 2026-12-03T02:44:09.759Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:44:06.772Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## LeetCode Topic Tags API

The no-input response returns tags\[\]. Each slug is a topic identifier, while problems\_url points to the associated source problem list.

## What You Can Build

- **Build topic controls**: Use name as label and slug as value.
- **Create source navigation**: Retain problems\_url.

## Returned Data

| Field | Meaning |
| --- | --- |
| `tags[].name` | Topic display name |
| `tags[].slug` | Topic filter slug |
| `tags[].url` | Topic source URL |
| `tags[].problems_url` | Source problem-list URL |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "LeetCode topic tags API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "problems_url": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/leetcode/v1/tags?output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "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/"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Are any inputs required?
No.

### Should I pass name or slug to a topic filter?
Use the slug expected by the target endpoint.

### Does this return all problems in each topic?
No. It returns tag definitions and links.

### How do I search by several tags?
Problem Search accepts comma-separated tags that must all match.

### Is pagination exposed?
No page, cursor or offset parameter is exposed here.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or use output=json.

## Available implementations
- apish: https://openany.si/leetcode/leetcode-topic-tags-api/73dfcab2-eb63-4c64-9348-6eb8c7863d61/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
