Find content ideas from Instagram Reels with Python
A skincare brand wants to understand what creators are making about routines and makeup. Rather than guess, start with a small sample of public Reels and build a shortlist that a human can review.
This tutorial uses the Instagram Profile, Reels & Keyword Search Scraper, an Actor I built. It is paid per result. Search results are a sample of what Instagram returns, not a complete ranking of beauty content.
1. Collect a small sample
In the Actor input, switch to JSON and enter the following. The keywords are search terms, not a list of profiles. Set Maximum cost per run in Run options before starting.
{
"targets": [],
"keywords": ["skincare routine", "makeup tutorial"],
"maxReelsPerKeyword": 10,
"includeRelatedSearches": false,
"includeDetails": true,
"commentsPerPost": 0
}
In my test on 11 November 2026, this input returned 20 Reels, ten per search term. All 20 rows included a view count. Export the dataset as JSON and save it as reels.json. Each reel row can include a caption, creator username, view count and post URL. Metrics may be missing when they are not available.
2. Turn the sample into a review sheet
Save this script as beauty_reels.py and run it with Python 3. It deduplicates posts returned by both searches and orders rows with available view counts first.
import csv
import json
with open('reels.json', encoding='utf-8') as source:
items = json.load(source)
rows = []
seen = set()
for item in items:
url = item.get('postUrl')
if not url or url in seen:
continue
seen.add(url)
views = item.get('videoViewCount')
if not isinstance(views, (int, float)) or isinstance(views, bool):
views = None
rows.append({
'creator': item.get('ownerUsername') or '',
'caption': item.get('caption') or '',
'views': views,
'post_url': url,
'search_term': item.get('inputValue') or '',
})
rows.sort(key=lambda row: row['views'] if row['views'] is not None else -1, reverse=True)
def safe(value):
value = str(value if value is not None else '')
if value.lstrip().startswith(('=', '+', '-', '@')) or value.startswith(('\t', '\r', '\n')):
return "'" + value
return value
fields = ['creator', 'caption', 'views', 'post_url', 'search_term']
with open('beauty_reels.csv', 'w', encoding='utf-8', newline='') as output:
writer = csv.DictWriter(output, fieldnames=fields)
writer.writeheader()
for row in rows:
writer.writerow({key: safe(value) for key, value in row.items()})
Open beauty_reels.csv in a spreadsheet. Watch the linked Reels and add a manual format column, for example routine, ingredient explainer, review or application tutorial. Those categories are observations by the reviewer, not fields inferred by the script.
3. Prepare a brief for a brand
Choose a few relevant examples and describe the format, the audience question it addresses and an idea the brand could test. For instance, a fictional brief might suggest an ingredient explainer if several reviewed Reels use that format. Link to the originals so the team can inspect context and creative execution.
Views are a snapshot and older Reels have had more time to accumulate them. A small search sample supports ideas for further research, not a conclusion about the whole market.
This article was generated by AI and edited around a practical workflow. The proposed content idea is fictional.
Top comments (0)