Find Social Media Profiles by Username with Python
说明与用途
使用 Python 的自动化脚本,调用 Apify Social Media Finder Actor 发现用户名在多个平台上的活跃社交媒体账号,处理异步请求、分页结果、过滤不存在的记录,并将验证后的数据存入 SQLite。
问题
Engineering teams need to map a single handle across dozens of third‑party networks for lead scoring, brand verification, or fraud prevention, but maintaining 400+ scrapers is operationally unsustainable.
结果
The pipeline reliably discovers active social media profiles for a list of usernames across selected platforms, handles timeouts by using asynchronous runs, and stores clean results in SQLite for downstream analytics.
工作流
- 1. Build JSON payload with "queries", optional "platforms", and "maxResults". 2. POST to /v2/acts/{actorId}/runs?maxTotalChargeUsd=2.0 to start an async run. 3. Capture runId and datasetId from the response. 4. Poll /v2/actor-runs/{runId} until status is "SUCCEEDED". 5. Stream dataset items via /v2/datasets/{datasetId}/items with pagination. 6. Filter items where status is "Not Found". 7. Insert remaining items into SQLite for downstream use.
证据
Writing and maintaining 400 distinct scrapers internally is an operational sinkhole.
The synchronous run endpoint returns HTTP 408 because execution exceeded the 300-second hard gateway timeout.
- 记录日期: 2026-09-15T14:01:39.236Z