Skip to main content

Socials

PyPI CI Documentation

Social Account Detection and Extraction for Python

Features

  • Detect and extract URLs of social accounts: throw in URLs, get back URLs of social media profiles by type.
  • Supports Facebook, Twitter, LinkedIn, GitHub, Instagram, YouTube, and email addresses.

Installation

pip install socials

Or with uv:

uv add socials

Usage

Python API

import socials

hrefs = [
    "https://facebook.com/peterparker",
    "https://techcrunch.com",
    "https://github.com/lorey",
]

# Get all matches grouped by platform
socials.extract(hrefs).get_matches_per_platform()
# {'facebook': ['https://facebook.com/peterparker'], 'github': ['https://github.com/lorey'], ...}

# Get matches for a specific platform
socials.extract(hrefs).get_matches_for_platform("github")
# ['https://github.com/lorey']

CLI

# Check which platform a URL belongs to
socials check https://github.com/lorey
# github

# Extract social URLs from a file
socials extract urls.txt

# Extract from stdin
echo "https://github.com/lorey" | socials extract

Socials API

There's also Socials API that allows you to use the functionality via REST. You can use a free online version, try it in the browser, or deploy it yourself.

Development

# Clone and install
git clone https://github.com/lorey/socials
cd socials
uv sync --extra dev

# Run tests
uv run pytest

# Run linting
uv run ruff check .
uv run mypy socials

# Format code
uv run ruff format .

Metadata

Release files for socials 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socials 0.3.0
File Size Uploaded Provenance Actions
socials-0.3.0.tar.gz 74.9 kB With provenance Details for socials-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socials 0.3.0
File Interpreter ABI Platform Actions
socials-0.3.0-py3-none-any.whl Python 3 none any Details for socials-0.3.0-py3-none-any.whl

Total release size: 82.0 kB

Release files / socials-0.3.0.tar.gz

Download URL socials-0.3.0.tar.gz
Size 74.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f8cf692ddefe6a6d6ba3525d60c38357b8b2bb2d81a3a4080726bc3d76237d3f
BLAKE2b-256 checksum
How to use checksums
b5b316c6e6dcd2fdf3914a849844b13f8a79d1f20194b17b9d564710b53a5a22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.

Transparency log

Release files / socials-0.3.0-py3-none-any.whl

Download URL socials-0.3.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80e3a13fa60cb20a0f2b71ea4d461bdf51a9bd7f4d10cb41cdd435aa5e0fb1c6
BLAKE2b-256 checksum
How to use checksums
1527a83af69ae88fa840afa1c640f53680a71034d20bf971e6d01d55ccb014bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.

Transparency log

Security for socials 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for socials-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page