Felo API PlatformFelo API Platform

데이터 API / Reddit / Subreddit

Search Within Subreddit

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. For the replies under a result, pass its url to get_reddit_post_comments.

파라미터

쿼리

  • subredditstring필수

    Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL)

  • querystring선택

    Search query to find matching content

  • sortstring선택

    허용 값: relevance · hot · top · new · comments

    Sort order. For posts/media: relevance, hot, top, new, comments. For comments: relevance, top, new

  • timeframestring선택

    허용 값: all · year · month · week · day · hour

    Timeframe to filter results

  • cursorstring선택

    Cursor to get more results. Get 'cursor' from previous response.

요청 예시

curl -G "https://openapi.felo.ai/v1/beta/reddit/subreddit/search" \
  --data-urlencode "subreddit=<string>" \
  -H "Authorization: Bearer $FELO_API_KEY"

응답

응답 예시

{
  "posts": [
    {
      "id": "t3_8gmjrb",
      "post_id": "t3_8gmjrb",
      "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/",
      "permalink": "/r/Fitness/comments/8gmjrb/is_doing_50100_pushups_a_day_doing_anything/",
      "nsfw": false,
      "spoiler": false,
      "is_crosspost": false,
      "subreddit": {
        "id": "t5_2qhx4",
        "name": "Fitness",
        "nsfw": false,
        "quarantined": false,
        "icon": "https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png",
        "banner": null,
        "description": "A place for the pursuit of physical fitness goals.\n\nPlease see the r/Fitness Wiki and FAQ at https://thefitness.wiki for help with common questions.",
        "weekly_visitors": 898726,
        "weekly_contributions": 1827
      },
      "votes": 1414,
      "num_comments": 582,
      "created_at": "2018-05-03T01:09:17.620000+0000",
      "created_at_iso": "2018-05-03T01:09:17.620Z",
      "thumbnail": null,
      "thumbnail_blurred": false,
      "position": 0,
      "relative_position": 0
    }
  ],
  "comments": [
    {
      "id": "t1_nxf7p27",
      "post_id": "t3_1q2p898",
      "parent_comment_id": null,
      "is_reply_to_comment": false,
      "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>",
      "images": [],
      "votes": 123,
      "url": "https://www.reddit.com/r/Fitness/comments/1q2p898/gym_story_saturday/nxf7p27/",

일부만 표시했습니다. 전체 예시는 API 레퍼런스에 있습니다.

응답 필드

  • successboolean선택
  • credits_remaininginteger선택
  • postsobject[]선택
  • after선택
  • cursor선택