Reddit avatar

Reddit

Try for free

3 days trial then $5.00/month - No credit card required now

Go to Store
Reddit

Reddit

canadesk/reddit
Try for free

3 days trial then $5.00/month - No credit card required now

Collect subreddit posts, search for keyword or users, and more from reddit.com! It's fast and costs little.

You can access the Reddit programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "1.4",
5    "x-build-id": "pm5scIn44XPNodZKN"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/canadesk~reddit/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-canadesk-reddit",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/canadesk~reddit/runs": {
50      "post": {
51        "operationId": "runs-sync-canadesk-reddit",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/canadesk~reddit/run-sync": {
93      "post": {
94        "operationId": "run-sync-canadesk-reddit",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "process"
135        ],
136        "properties": {
137          "process": {
138            "title": "Process",
139            "enum": [
140              "sk",
141              "gs",
142              "gp",
143              "gu"
144            ],
145            "type": "string",
146            "description": "Process to run.",
147            "default": "gs"
148          },
149          "keyword": {
150            "title": "Keyword",
151            "type": "string",
152            "description": "Only applies to Search for Keywords and Get Subreddit Posts."
153          },
154          "category": {
155            "title": "Category",
156            "enum": [
157              "new",
158              "hot",
159              "top"
160            ],
161            "type": "string",
162            "description": "Only applies to Get Subreddit Posts.",
163            "default": "new"
164          },
165          "postlink": {
166            "title": "Post URL",
167            "type": "string",
168            "description": "Only applies to Get Post Details. Format: https://www.reddit.com/r/{TOPIC}/comments/{ID}/{TITLE}/"
169          },
170          "userid": {
171            "title": "User ID",
172            "type": "string",
173            "description": "Only applies to Get User Posts."
174          },
175          "mode": {
176            "title": "Fetch mode",
177            "enum": [
178              "1",
179              "2"
180            ],
181            "type": "string",
182            "description": "Defines the JSON result format.",
183            "default": "1"
184          },
185          "limit": {
186            "title": "Search limit",
187            "minimum": 1,
188            "maximum": 500,
189            "type": "integer",
190            "description": "Maximum number of results.",
191            "default": 3
192          },
193          "delay": {
194            "title": "Settings - Delay",
195            "minimum": 1,
196            "maximum": 30,
197            "type": "integer",
198            "description": "Waiting time between requests.",
199            "default": 3
200          },
201          "proxy": {
202            "title": "Proxy configuration",
203            "type": "object",
204            "description": "Select proxies to be used by your crawler."
205          }
206        }
207      },
208      "runsResponseSchema": {
209        "type": "object",
210        "properties": {
211          "data": {
212            "type": "object",
213            "properties": {
214              "id": {
215                "type": "string"
216              },
217              "actId": {
218                "type": "string"
219              },
220              "userId": {
221                "type": "string"
222              },
223              "startedAt": {
224                "type": "string",
225                "format": "date-time",
226                "example": "2025-01-08T00:00:00.000Z"
227              },
228              "finishedAt": {
229                "type": "string",
230                "format": "date-time",
231                "example": "2025-01-08T00:00:00.000Z"
232              },
233              "status": {
234                "type": "string",
235                "example": "READY"
236              },
237              "meta": {
238                "type": "object",
239                "properties": {
240                  "origin": {
241                    "type": "string",
242                    "example": "API"
243                  },
244                  "userAgent": {
245                    "type": "string"
246                  }
247                }
248              },
249              "stats": {
250                "type": "object",
251                "properties": {
252                  "inputBodyLen": {
253                    "type": "integer",
254                    "example": 2000
255                  },
256                  "rebootCount": {
257                    "type": "integer",
258                    "example": 0
259                  },
260                  "restartCount": {
261                    "type": "integer",
262                    "example": 0
263                  },
264                  "resurrectCount": {
265                    "type": "integer",
266                    "example": 0
267                  },
268                  "computeUnits": {
269                    "type": "integer",
270                    "example": 0
271                  }
272                }
273              },
274              "options": {
275                "type": "object",
276                "properties": {
277                  "build": {
278                    "type": "string",
279                    "example": "latest"
280                  },
281                  "timeoutSecs": {
282                    "type": "integer",
283                    "example": 300
284                  },
285                  "memoryMbytes": {
286                    "type": "integer",
287                    "example": 1024
288                  },
289                  "diskMbytes": {
290                    "type": "integer",
291                    "example": 2048
292                  }
293                }
294              },
295              "buildId": {
296                "type": "string"
297              },
298              "defaultKeyValueStoreId": {
299                "type": "string"
300              },
301              "defaultDatasetId": {
302                "type": "string"
303              },
304              "defaultRequestQueueId": {
305                "type": "string"
306              },
307              "buildNumber": {
308                "type": "string",
309                "example": "1.0.0"
310              },
311              "containerUrl": {
312                "type": "string"
313              },
314              "usage": {
315                "type": "object",
316                "properties": {
317                  "ACTOR_COMPUTE_UNITS": {
318                    "type": "integer",
319                    "example": 0
320                  },
321                  "DATASET_READS": {
322                    "type": "integer",
323                    "example": 0
324                  },
325                  "DATASET_WRITES": {
326                    "type": "integer",
327                    "example": 0
328                  },
329                  "KEY_VALUE_STORE_READS": {
330                    "type": "integer",
331                    "example": 0
332                  },
333                  "KEY_VALUE_STORE_WRITES": {
334                    "type": "integer",
335                    "example": 1
336                  },
337                  "KEY_VALUE_STORE_LISTS": {
338                    "type": "integer",
339                    "example": 0
340                  },
341                  "REQUEST_QUEUE_READS": {
342                    "type": "integer",
343                    "example": 0
344                  },
345                  "REQUEST_QUEUE_WRITES": {
346                    "type": "integer",
347                    "example": 0
348                  },
349                  "DATA_TRANSFER_INTERNAL_GBYTES": {
350                    "type": "integer",
351                    "example": 0
352                  },
353                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
354                    "type": "integer",
355                    "example": 0
356                  },
357                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
358                    "type": "integer",
359                    "example": 0
360                  },
361                  "PROXY_SERPS": {
362                    "type": "integer",
363                    "example": 0
364                  }
365                }
366              },
367              "usageTotalUsd": {
368                "type": "number",
369                "example": 0.00005
370              },
371              "usageUsd": {
372                "type": "object",
373                "properties": {
374                  "ACTOR_COMPUTE_UNITS": {
375                    "type": "integer",
376                    "example": 0
377                  },
378                  "DATASET_READS": {
379                    "type": "integer",
380                    "example": 0
381                  },
382                  "DATASET_WRITES": {
383                    "type": "integer",
384                    "example": 0
385                  },
386                  "KEY_VALUE_STORE_READS": {
387                    "type": "integer",
388                    "example": 0
389                  },
390                  "KEY_VALUE_STORE_WRITES": {
391                    "type": "number",
392                    "example": 0.00005
393                  },
394                  "KEY_VALUE_STORE_LISTS": {
395                    "type": "integer",
396                    "example": 0
397                  },
398                  "REQUEST_QUEUE_READS": {
399                    "type": "integer",
400                    "example": 0
401                  },
402                  "REQUEST_QUEUE_WRITES": {
403                    "type": "integer",
404                    "example": 0
405                  },
406                  "DATA_TRANSFER_INTERNAL_GBYTES": {
407                    "type": "integer",
408                    "example": 0
409                  },
410                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
411                    "type": "integer",
412                    "example": 0
413                  },
414                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
415                    "type": "integer",
416                    "example": 0
417                  },
418                  "PROXY_SERPS": {
419                    "type": "integer",
420                    "example": 0
421                  }
422                }
423              }
424            }
425          }
426        }
427      }
428    }
429  }
430}

Reddit OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Reddit from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Community

Actor Metrics

  • 7 monthly users

  • 3 stars

  • 94% runs succeeded

  • Created in Oct 2024

  • Modified 2 months ago