> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# search

> 在 Subreddit 内搜索

在单个 subreddit 中搜索帖子。

## 示例

```bash theme={null}
curl "https://api.aisa.one/apis/v1/reddit/subreddit/search?subreddit=VALUE" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## 请求规范

* **方法与路径:** GET /apis/v1/reddit/subreddit/search
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/reddit/subreddit/search`
* **cursor:** query; 可选
* **query:** query; 可选
* **sort:** query; 可选
* **subreddit:** query; 必填
* **timeframe:** query; 可选

[完整 OpenAPI 定义](https://aisa.one/docs/openapi-public/zh/scrape-creators.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "get_reddit_subreddit_search",
  "method": "GET",
  "path": "/apis/v1/reddit/subreddit/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Cursor to get more results. Get 'cursor' from previous response.",
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Search query to find matching content",
      "in": "query",
      "name": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Sort order. For posts/media: relevance, hot, top, new, comments. For comments: relevance, top, new\n\nProvider reference (supplier schema): `{\"enum\":[\"relevance\",\"hot\",\"top\",\"new\",\"comments\"],\"type\":\"string\"}`.",
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL)",
      "in": "query",
      "name": "subreddit",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Timeframe to filter results\n\nProvider reference (supplier schema): `{\"enum\":[\"all\",\"year\",\"month\",\"week\",\"day\",\"hour\"],\"type\":\"string\"}`.",
      "in": "query",
      "name": "timeframe",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按实际计费结果数量收费。 默认请求预估费用：\$0.00188 USD。 最终费用以实际用量为准。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi-public/zh/scrape-creators.json GET /apis/v1/reddit/subreddit/search
openapi: 3.1.0
info:
  description: ''
  title: Scrape Creators
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    scrape-creators:
      description: ''
      title: Scrape Creators
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: fdf0a203e7ec628291b62272da7b8bbbe431c8f77f251ea2e65c19cd3c98fa37
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/instagram/basic-profile
    - /apis/v1/instagram/media/transcript
    - /apis/v1/instagram/post
    - /apis/v1/instagram/post/comments
    - /apis/v1/instagram/profile
    - /apis/v1/instagram/reels/search
    - /apis/v1/instagram/reels/trending
    - /apis/v1/instagram/search/hashtag
    - /apis/v1/instagram/search/profiles
    - /apis/v1/instagram/song/reels
    - /apis/v1/instagram/user/embed
    - /apis/v1/instagram/user/highlight/detail
    - /apis/v1/instagram/user/highlights
    - /apis/v1/instagram/user/posts
    - /apis/v1/instagram/user/reels
    - /apis/v1/pinterest/board
    - /apis/v1/pinterest/pin
    - /apis/v1/pinterest/search
    - /apis/v1/pinterest/user/boards
    - /apis/v1/reddit/post/comments
    - /apis/v1/reddit/search
    - /apis/v1/reddit/subreddit
    - /apis/v1/reddit/subreddit/details
    - /apis/v1/reddit/subreddit/search
  x-aisa-document:
    composer_version: '31'
    facts_hash: fdf0a203e7ec628291b62272da7b8bbbe431c8f77f251ea2e65c19cd3c98fa37
    generator_version: '3'
    identity_base_document_hash: sha256:21febe84645944ab208ea05f701b4ecaea05ab9ed69b91f52ad772689b28c9a1
    identity_compatibility_hash: sha256:6c09ef0bdf18266535eb126de4c7347ff1c7d0e62dd283fee668032d3d4408c5
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    public_projection:
      version: '4'
      source_document_hash: sha256:87aa34bccc72f58a27229703aa754633dcaa68f6f0853760a5802b05937f0382
    document_hash: sha256:d2edf3d8f6a0f31b23ac101de9592d2ace3b1712e538b01ec6a02e75a68b8490
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: scrape-creators
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/reddit/subreddit/search:
    get:
      tags:
        - default
      summary: search
      description: >-
        Searches inside one subreddit and returns matching posts with a cursor
        token to page. Posts carry title, author, selftext, score, ups,
        upvote_ratio, num_comments, created_utc, created_at_iso, url, permalink
        and is_video. Despite what sort suggests, every sort value returns posts
        and only posts: comments and media were confirmed absent from all five.
        Measured at about 5 KB and 2 seconds, faster than get_reddit_search,
        which searches all of Reddit and pages with after instead of cursor. For
        the replies under a result, pass its url to get_reddit_post_comments.
      operationId: get_reddit-subreddit-search
      parameters:
        - description: 用于获取更多结果的游标。从上一次响应中获取 'cursor'。
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: 用于查找匹配内容的搜索查询
          in: query
          name: query
          required: false
          schema:
            type: string
        - description: >-
            Sort order. For posts/media: relevance, hot, top, new, comments. For
            comments: relevance, top, new


            Provider reference (supplier schema):
            `{"enum":["relevance","hot","top","new","comments"],"type":"string"}`.
          in: query
          name: sort
          required: false
          schema:
            type: string
        - description: Subreddit 名称（例如 'Fitness'，而不是 'r/Fitness' 或完整 URL）
          in: query
          name: subreddit
          required: true
          schema:
            type: string
        - description: >-
            Timeframe to filter results


            Provider reference (supplier schema):
            `{"enum":["all","year","month","week","day","hour"],"type":"string"}`.
          in: query
          name: timeframe
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                comments:
                  - author: Philser23
                    author_avatar: null
                    author_nsfw: false
                    body: >-
                      On the 30th my girlfriend out of the blue decided her new
                      year's resolution would be to start going to the gym. I
                      was so excited since none of my partners ever shared the
                      fitness hobby with me.
                    body_html: >-
                      <p>On the 30th my girlfriend out of the blue decided her
                      new year's resolution would be to start going to the
                      gym...</p>
                    created_at: 2026-01-03T11:26:02.434000+0000
                    created_at_iso: '2026-01-03T11:26:02.434Z'
                    id: t1_nxf7p27
                    images: []
                    is_reply_to_comment: false
                    parent_comment_id: null
                    permalink: /r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/
                    position: 0
                    post:
                      created_at: 2026-01-03T08:15:49.709000+0000
                      created_at_iso: '2026-01-03T08:15:49.709Z'
                      id: t3_1q2p898
                      nsfw: false
                      num_comments: 80
                      permalink: /r/Fitness/comments/1q2p898/gym_story_saturday/
                      spoiler: false
                      title: Gym Story Saturday
                      url: >-
                        https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/
                      votes: 67
                    post_id: t3_1q2p898
                    subreddit:
                      icon: >-
                        https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png
                      id: t5_2qhx4
                      name: Fitness
                      nsfw: false
                      quarantined: false
                    url: >-
                      https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/
                    votes: 123
                cursor: >-
                  eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIzXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfNl9zY29wZV9zd2l0Y2hlclwiOlwiMFwiLFwic2VjdGlvbl8yX3BpcGVsaW5lXzdfcG9zdF9zZWFyY2hcIjpcIjdcIn0ifQ==
                media:
                  - aspect_ratio: 1.3333333333333333
                    gallery_count: null
                    id: t3_geo4x
                    image:
                      height: 360
                      resolutions:
                        - url: >-
                            https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?width=320&crop=smart&format=pjpg&auto=webp&s=144ac4171a1862e5d91d8dd90d44271e22a8273d
                          width: 320
                      src: >-
                        https://external-preview.redd.it/X6lz5yGIzqVA5LcI9w-FsQJJHhXoCugDhsXgWW3I404.jpg?format=pjpg&auto=webp&s=46814b0a707a532e39e6c20851ddc1fefb0a111f
                      width: 480
                    is_blurred: false
                    media_type: image
                    nsfw: false
                    permalink: >-
                      /r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/
                    position: 0
                    safe_search: UNAVAILABLE
                    spoiler: false
                    subreddit:
                      id: t5_2qhx4
                      name: Fitness
                      nsfw: false
                      quarantined: false
                    title: >-
                      Bodyweight training for really strong people. See on
                      you're own what I mean with strong. (Not me)
                    url: >-
                      https://www.reddit.com/r/Fitness/comments/geo4x/bodyweight_training_for_really_strong_people_see/
                    video: null
                posts:
                  - created_at: 2018-05-03T01:09:17.620000+0000
                    created_at_iso: '2018-05-03T01:09:17.620Z'
                    id: t3_8gmjrb
                    is_crosspost: false
                    nsfw: false
                    num_comments: 582
                    permalink: >-
                      /r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/
                    position: 0
                    post_id: t3_8gmjrb
                    relative_position: 0
                    spoiler: false
                    subreddit:
                      banner: null
                      description: >-
                        A place for the pursuit of physical fitness goals.


                        Please see the r/Fitness Wiki and FAQ at
                        https://thefitness.wiki for help with common questions.
                      icon: >-
                        https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png
                      id: t5_2qhx4
                      name: Fitness
                      nsfw: false
                      quarantined: false
                      weekly_contributions: 1827
                      weekly_visitors: 898726
                    thumbnail: null
                    thumbnail_blurred: false
                    title: Is doing 50-100 pushups a day doing anything?
                    url: >-
                      https://www.reddit.com/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/
                    votes: 1414
              schema:
                $ref: '#/components/schemas/ResponseE5228Fb11714_RedditPostsResponse'
          description: 成功响应
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseE5228Fb11714_RedditPostsResponse:
      additionalProperties: true
      properties:
        after:
          type:
            - string
            - 'null'
        credits_remaining:
          type: integer
        cursor:
          type:
            - string
            - 'null'
        posts:
          items:
            $ref: '#/components/schemas/ResponseE5228Fb11714_RedditPost'
          type: array
        success:
          type: boolean
      type: object
    ResponseE5228Fb11714_RedditPost:
      additionalProperties: true
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.