API Reddit

Reddit Комментарии к публикации API

Комментарии верхнего уровня к публикации Reddit по URL: автор, текст, рейтинг и метка времени. Листайте через поле cursor.

0,58 USD/1 тыс. запросов, оплата за запрос, без подписки.

r/MechanicalKeyboards
reddit.com/r/MechanicalKeyboards/comments/1abc234/
redditLog InSign Up

r/MechanicalKeyboards·

CommentsShare
Best

switchdoctor· Jun 12, 2024

Look at the Keychron V-series, great value out of the box.

Reply

Что вернул APIcomments[0]
{
"id": "t1_klm123",
"author": "switchdoctor",
"body": "Look at the Keychron V-series, great value out of the box.",
"url": "https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/comment/klm123/",
"createdUtc": 1718201500,
"parentId": string,
"score": integer
}
Доступность
99,97%
30d · Вызовов: 109 924
Запросы
110 463
30 дн. · по неделям, последние недель: 12
Ответ
1,0s
медиана · 30d

Цены и поставщики

Цена API Reddit Комментарии к публикации: один API, поставщиков 4, и любой может заменить другого

Первым обслуживает самый дешёвый поставщик. Если он не отвечает, его заменяет следующий в том же вызове.

Вы платите
5,80 USD
0,58 USD/1 тыс. запросов, только за то, чем пользуетесь. Без ежемесячного тарифа.
Ваши первые запросы (172) бесплатны за счёт стартового баланса 0,10 USD.

Попробовать

Получите Reddit Комментарии к публикации одним запросом

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `media`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
Открыть в
Пример ответа
Бесплатные запуски возвращают только первые результаты: 3. Пополните ключ, чтобы получить полный ответ.

В этом примере показано полей: 8 из 18. Все поля

{
  "found": true,
  "data": {
    "comments": [
      {
        "id": "t1_klm123",
        "author": "switchdoctor",
        "body": "Look at the Keychron V-series, great value out of the box.",
        "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/comment/klm123/",
        "createdUtc": 1718201500
      }
    ]
  }
}

Полный справочник по параметрам и ответу: каждое поле, тип и пример для этого эндпоинта.

Справочник

Один запрос, один формат ответа.

Каждое поле, которое вы отправляете, и каждое поле, которое получаете, с реальным примером.

Проверено 2026-11-21 · доступность и задержка измерены за 30d

Тело запроса

JSON, отправляется на этот эндпоинт.

  • urlstring

    https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/

    Full Reddit post URL on reddit.com. A gallery link (https://www.reddit.com/gallery/<id>) is read as the post it belongs to, and a relative permalink (/r/<subreddit>/comments/<id>/...) as the same path on https://www.reddit.com.

  • cursorstring

    Курсор из предыдущего ответа для следующих комментариев.

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `media`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.

Вы отправляете. Небольшое тело JSON. Показанные значения это примеры, замените их своими.

Ответ

JSON, по одному примеру значения на поле.

each commentdata.comments[]

Populated whenever the provider has data for the entity.

  • authorstring

    switchdoctor

    Commenter username, without the u/ prefix. Populated whenever the provider has data for the entity.

  • bodystring

    Look at the Keychron V-series, great value out of the box.

    Comment text, as Markdown. Populated whenever the provider has data for the entity.

  • createdUtcnumber

    1718201500

    UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.

  • idstring

    t1_klm123

    Reddit comment ID (base-36, without the t1_ prefix). Populated whenever the provider has data for the entity.

  • parentIdstring

    ID of the comment this one replies to (base-36, without the t1_ prefix). Empty for a top-level comment that replies to the post itself.

  • scoreinteger

    Net score (upvotes minus downvotes) on the comment at fetch time.

  • urlstring

    https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/comment/klm123/

    Permalink to the comment on reddit.com. Populated whenever the provider has data for the entity.

each mediadata.media[]

Photo, video, and GIF attachments on the post. Empty when the post has none; null when the serving source does not report attachments.

  • heightinteger
  • typestringможет потребовать

    One of photo, video, or gif.

  • urlstring

    Image URL. For a video or GIF this is the poster/thumbnail frame.

  • videoUrlstring

    Playable video file URL. Present only for video and gif items.

  • widthinteger
datadata
  • nextCursorstring

    Opaque cursor for the next page of comments, or null when this lane has no more. Pass it back as cursor to continue.

top level
  • foundboolean

    true

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

Вы получаете. Именованные типизированные поля в одном формате, какой бы источник ни ответил.

Продаёте этот API? Полная схема, которую должен возвращать ваш эндпоинт.

Вопросы и ответы

Об API Reddit Комментарии к публикации

AnyAPI Reddit Комментарии к публикации API возвращает данные Reddit в виде нормализованного JSON одним вызовом POST к /v1/run/reddit.post_comments. Комментарии верхнего уровня к публикации Reddit по URL: автор, текст, рейтинг и метка времени. Листайте через поле cursor. AnyAPI направляет каждый запрос по источникам (их 4) и автоматически переключается, если один из них отказывает. Это стоит от 0,58 USD за 1000 запросов, в долларах США, без подписки и без ежемесячного минимума. За последние 30 дней 100,0% вызовов Reddit Комментарии к публикации через AnyAPI завершились успешно, медианное время ответа 1,0 с, измерено вызовов: 109 924.

Это стоит от 0,58 USD за 1000 запросов, в долларах США, без подписки и без ежемесячного минимума. Вы пополняете один кошелёк в долларах США, и каждый вызов списывает с него. По некоторым неудавшимся запросам, оплаченным из кошелька, возникают расходы на обработку; мы передаём их по себестоимости, без наценки, а сумма списания указана в ответе с ошибкой.

Комментарии верхнего уровня к публикации Reddit по URL: автор, текст, рейтинг и метка времени. Листайте через поле cursor. Ответ это нормализованный JSON с тем же конвертом, что возвращает каждый эндпоинт AnyAPI, поэтому разбор второго эндпоинта это смена URL и ничего больше.

За последние 30 дней 100,0% вызовов Reddit Комментарии к публикации через AnyAPI завершились успешно, медианное время ответа 1,0 с, измерено вызовов: 109 924. Это собственные измерения AnyAPI по трафику через шлюз, пересчитываемые непрерывно, а не опубликованный целевой уровень обслуживания.

Да. Новый аккаунт AnyAPI стартует с бесплатным балансом 0,10 USD, карта не нужна. Этого хватает на 172 вызовов Reddit Комментарии к публикации по 0,00058 USD за каждый.

AnyAPI в том же запросе обращается к следующему из источников (их 4), начиная с самого дешёвого, поэтому отказ одного источника не ломает ваш вызов.

Отправьте запрос POST на https://api.getanyapi.com/v1/run/reddit.post_comments с вашим ключом AnyAPI в заголовке "Authorization: Bearer" и входными данными в теле JSON. Один и тот же ключ и один и тот же кошелёк работают на каждом эндпоинте AnyAPI.

Нет. Вы пополняете один предоплаченный баланс AnyAPI в долларах США, и каждый запрос списывает с него. Ежемесячного тарифа и минимума нет, а один и тот же баланс оплачивает каждый эндпоинт AnyAPI.

Да. Установите @getanyapi/sdk из npm для TypeScript или getanyapi из pip для Python. Оба вызывают любой эндпоинт AnyAPI с одним и тем же ключом, а ещё подойдёт любой HTTP-клиент.

Да. Агент может подключиться к MCP-серверу AnyAPI по адресу https://api.getanyapi.com/mcp или создать собственный бесплатный пробный ключ одним POST без аутентификации на https://api.getanyapi.com/agent/signup и вызывать этот эндпоинт по HTTP.