FetchFox comments exporter — 22 October 2026 Guide: https://fetchfox.net/guides/comments-pagination-python API: https://fetchfox.net/docs/instagram-comments-api https://fetchfox.net/docs/facebook-comments-api Requirements: Python 3.10+; no third-party packages. Review the script first. Set FETCHFOX_API_KEY in your local environment using your normal secret handling. Never commit the key, include it in a URL, or share a terminal recording containing it. Run with a permitted public post URL and a new output filename: python3 fetchfox-comments-export.py --platform instagram --url "https://www.instagram.com/p/REPLACE_SHORTCODE/" --limit 20 --pages 1 --output comments.csv python3 fetchfox-comments-export.py --platform facebook --url "https://www.facebook.com/watch?v=REPLACE_VIDEO_ID" --limit 20 --pages 3 --output facebook.csv Replace placeholders. The script deliberately rejects them without a request. One page is the default; at most five pages per run, with 1–100 comments requested per page. Twenty requested comments cost one credit per successful request, including a verified empty result and cached successes. Failed processing uses no credits. For larger pages, the balance pre-check requires one credit per 20 requested, while successful processing costs one per 50 returned, minimum one. Outputs: - CSV: source URL, ID, text, available author fields, likes, replies, timestamp. - .report.json: retrieval times, charges when reported, status and stop reason. Numeric IDs and formula-like text receive a protective apostrophe in CSV. Missing counts stay blank; source zero remains zero. No keys or cursors are saved. Pagination is sequential, deduplicated by string ID and bounded. There are no automatic retries or schedules. Repeated cursors and pages with no new IDs stop the run. A later failure keeps earlier valid rows, writes a report and exits 1. The script refuses existing CSV/report paths. A new run starts at the first page and can spend credits again; inspect the report before restarting. Fixture tests cover HTTP behavior, pagination, malformed results, deduplication, spreadsheet protection and partial failures. Public source availability can vary. An exhausted source does not prove every comment or reply has been collected. For a browser-only workflow: https://fetchfox.net/guides/export-instagram-comments-csv https://fetchfox.net/guides/export-facebook-comments-csv