Skip to main content

Unofficial Python client for The Verge — feed, articles, newsletters, authors.

Project description

theverge-api

Unofficial Python client for The Verge. Pull full-text articles, section feeds, newsletters, and author profiles into your own projects.


Disclaimer

This project is not affiliated with, authorized by, sponsored by, or endorsed by The Verge, Vox Media, or any of their affiliates. "The Verge" is a trademark of Vox Media, LLC. This is an independent open source project with no relationship to The Verge or its parent company.

Subscription requirement

You must have an active paid subscription to The Verge to use this library.

This library accesses content from The Verge's subscriber RSS feeds, which are provided as a benefit to paying subscribers. Using this library without a subscription violates The Verge's terms of service and undermines the journalism you're reading.

Subscribe here: theverge.com/subscribe

By using this library you confirm that you are a current paying subscriber to The Verge.


Install

pip install httpx
git clone https://github.com/adamnfineco/theverge-api
cd theverge-api
pip install -e .

Quick start

from theverge import VergeClient

client = VergeClient()

# Latest articles — full body HTML, no truncation
articles = client.feed()
print(articles[0].title)
print(articles[0].body_html[:500])

# Section feeds
tech  = client.feed("tech")
games = client.feed("games")
ai    = client.feed("ai")

# Rich metadata (hero images, dek, post type) — one extra request
enriched = client.feed("tech", enrich=True)
print(enriched[0].hero_image.url)
print(enriched[0].dek)

Methods

feed(section="", enrich=False) → list[Article]

Up to 30 recent articles from a section.

client.feed()                           # all content
client.feed("tech")
client.feed("reviews")
client.feed("science")
client.feed("entertainment")
client.feed("transportation")
client.feed("games")
client.feed("ai")
client.feed("policy")
client.feed("gadgets")
client.feed("tech", enrich=True)        # adds hero images + dek

feed_iter(section="", enrich=False) → Iterator[Article]

Lazy pagination through all articles in a section.

for article in client.feed_iter("games"):
    print(article.title, article.published_at)

article(path_or_url) → Article

Single article with full body and rich metadata.

post = client.article("/tech/941146/thermacell-liv-2-dot-0-smart-mosquito")
post = client.article("https://www.theverge.com/tech/941146/...")
print(post.title)
print(post.dek)
print(post.body_html)
print(post.hero_image.url)

quick_posts() → list[Article]

Short-form news items.

posts = client.quick_posts()

newsletter(name) → list[Article]

Full-text newsletter feeds.

client.newsletter("installer")
client.newsletter("notepad")
client.newsletter("regulator")
client.newsletter("the-stepback")
client.newsletter("optimizer")

reviews(enrich=False) → list[Article]

reviews = client.reviews(enrich=True)

author(slug) → AuthorProfile

Author profile with recent posts.

profile = client.author("nilay-patel")
print(profile.name)           # "Nilay Patel"
print(profile.title)          # "Editor-in-Chief"
print(profile.bio)
for post in profile.recent_posts:
    print(post.title)

search(query) → list[Article]

Keyword search across the latest feed.

results = client.search("nvidia rtx spark")

popular() → list[dict]

Most popular articles from the homepage.

trending = client.popular()
for item in trending:
    print(item["title"], item["url"])

sections() → list[Category]

All site sections and categories.

sections = client.sections()

Article fields

article.title           # str
article.permalink       # str
article.path            # str
article.author          # str — display name
article.authors         # list[Author]
article.published_at    # datetime
article.updated_at      # datetime | None
article.summary         # str
article.dek             # str | None
article.body_html       # str — full HTML
article.keywords        # list[str]
article.categories      # list[Category]
article.resource_type   # "post" | "quickPost" | "stream" | None
article.hero_image      # Image | None
article.image           # Image | None — hero or first from body
article.is_live         # bool
article.wp_id           # int
article.is_quick_post   # bool
article.is_stream       # bool
article.to_dict()       # JSON-serializable dict

Author fields

profile.name
profile.title
profile.bio
profile.profile_image_url
profile.feed_link
profile.social_links    # list[dict]
profile.recent_posts    # list[Article]

Rate limiting

Default: 0.5s between requests.

client = VergeClient(rate_limit_delay=1.0)

Context manager

with VergeClient() as client:
    articles = client.feed("tech")

How it works

This library combines two data sources:

  1. Subscriber RSS feeds — The Verge publishes full-text RSS feeds as a subscriber benefit. These provide complete article body HTML, author, timestamps, and keywords with no truncation.
  2. __NEXT_DATA__ SSR payloads — The Verge's Next.js frontend embeds rich structured data in every page, including hero images, subtitles (dek), post type, and pagination. Available via enrich=True or .article().

No headless browser, no session spoofing. Just RSS and public SSR data.


License

MIT. See LICENSE.


This project is not affiliated with, authorized by, sponsored by, or endorsed by The Verge or Vox Media, LLC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

theverge_api-0.2.0.tar.gz (190.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

theverge_api-0.2.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file theverge_api-0.2.0.tar.gz.

File metadata

  • Download URL: theverge_api-0.2.0.tar.gz
  • Upload date:
  • Size: 190.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for theverge_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3e53ca1b360336581c7d746eaa33029b4c76ffb20155e15bf4d2bb08da216582
MD5 62ecd04daf057800a61e9120ebaa097e
BLAKE2b-256 6b0b197e4345d0579986ee43c38baa213fd334ef23d2e0544908cfccae47fe40

See more details on using hashes here.

File details

Details for the file theverge_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: theverge_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for theverge_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5cf29e640c3c254097ec1c75acbbab7d7c999a97b1f892fa2313b84a67ccc66
MD5 192dc3057efe402baa29d327158a8123
BLAKE2b-256 39e009a932f0dabde9ce9614d0dea6eab577002c7aa87ae2332ad47f68e75073

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page