Instagram posts discovery: docstring says post_type="Reel", the API wants "Reels"; "Reel" returns an error row and no reels · Issue #59 · brightdata/sdk-python · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Instagram posts discovery: docstring says post_type="Reel", the API wants "Reels"; "Reel" returns an error row and no reels #59
The docstring of search.instagram.posts says post_type: Filter by type - "Post" or "Reel" (brightdata/scrapers/instagram/search.py). The API accepts "Reels", plural. "Reel" is passed through unchanged and the job returns one error row, Unable to discover older posts, with no data, even when reels exist in the window.
Steps to reproduce
pip install brightdata-sdk==2.5.2
export BRIGHTDATA_API_TOKEN=YOUR_API_KEY
python - <<'PY'from brightdata import SyncBrightDataClientURL = "https://www.instagram.com/nasa/"with SyncBrightDataClient(auto_create_zones=False) as client: for post_type in ("Reel", "reel", "Reels", "Post"): r = client.search.instagram.posts( URL, num_of_posts=3, start_date="08-01-2026", end_date="09-07-2026", post_type=post_type ) rows = r.data if isinstance(r.data, list) else [r.data] print(f'post_type="{post_type}": success={r.success} rows={len(rows)}') for row in rows: print(" ", row.get("content_type"), row.get("date_posted"), row.get("url"), "| error:", row.get("error"))PY
On 2026-09-07 the "Reel" call returned zero rows and no error row at all, so the failure mode also varies.
Expected
Either of these, ideally both:
The docstring and examples say "Post" or "Reels", the values the API actually accepts.
The SDK validates post_type and raises a ValidationError naming the accepted values, instead of forwarding a value that produces an error row whose message ("Unable to discover older posts") points nowhere near the cause.
Where
brightdata/scrapers/instagram/search.py: the docstring at the post_type parameter, and the two lines that copy post_type into the payload item without checking it.
Activity