# How to get all topics from a specific category using offset/page param in the API query?

**URL:** https://meta.discourse.org/t/how-to-get-all-topics-from-a-specific-category-using-offset-page-param-in-the-api-query/348554
**Category:** Data & reporting
**Created:** [January 23, 2025, 7:46am UTC](https://meta.discourse.org/t/how-to-get-all-topics-from-a-specific-category-using-offset-page-param-in-the-api-query/348554 "2025-01-23T07:46:55Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 23, 2025, 4:37pm UTC](https://meta.discourse.org/t/how-to-get-all-topics-from-a-specific-category-using-offset-page-param-in-the-api-query/348554/5 "2025-01-23T16:37:42Z")

</div>

There’s a script example that loops page results here:

> [@Searching for image urls in topics](https://meta.discourse.org/t/searching-for-image-urls-in-topics/346912/9):
>
> You don’t need an API key to do searches. I’m not sure having an API key could help you resolve your issue more easily. Here’s an robot example Python script that loops my posts (1 post every 3 sec) on meta and returns those having the substring upload:// in the raw content: import requests import time def fetch\_posts(page): url = f"https://meta.discourse.org/search.json?q=%40cocoquark&page={page}" response = requests.get(url) return response.json() def fetch\_post\_content(pos…

But as Jay said, depending on your goal, using [data explorer](https://meta.discourse.org/t/32566?silent=true) might be a way better solution if you’re admin.

---

_[View the full topic](https://meta.discourse.org/t/how-to-get-all-topics-from-a-specific-category-using-offset-page-param-in-the-api-query/348554)._
