GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vlymar1/vinted-api-kit: Lightweight asynchronous Python client library for accessing Vinted API and scraping item data

BranchesTags
Open more actions menu

Latest commit

 

History

82 Commits
82 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
tests
tests
 
 
vinted
vinted
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 

Repository files navigation

Vinted Api Kit logo

Lightweight asynchronous Python client library for accessing Vinted API and scraping item data.

Package Version Python Version codecov Downloads Code style: ruff Typed License

Features

  • Asynchronous - Built with asyncio for high performance
  • Auto-locale Detection - Automatically detects locale from URL
  • Item Search - Search catalog with filters, sorting and pagination
  • Seller Lookup - Seller profile and listed items by profile URL
  • Cookie Persistence - Keep sessions between runs in JSON, pickle or Mozilla format
  • Proxy Support - Simple string-based proxy configuration
  • Type Hints - Full typing support with Literal types for better IDE experience
  • Dataclass Models - Fast and efficient data models (15% performance boost)
  • Custom Exceptions - Detailed error hierarchy for precise error handling

☰ Table of Contents

  • Installation
  • Usage
  • Migration Guide
  • Development
  • Changelog
  • License

Installation

Requires Python 3.10+.

Install via pip:

pip install vinted-api-kit

Or using poetry:

poetry add vinted-api-kit

Usage

Basic Example

import asyncio
from vinted import VintedClient

async def main():
    async with VintedClient() as client:
        items = await client.search_items(
            url="https://www.vinted.com/catalog?search_text=nike",
            per_page=5
        )

        for item in items:
            print(f"• {item.title} - {item.price} {item.currency}")

asyncio.run(main())

Pass the URL from any supported Vinted domain, the locale is detected from it: .at, .be, .co.uk, .com, .cz, .de, .dk, .es, .fi, .fr, .gr, .hr, .hu, .it, .lt, .lu, .nl, .pl, .pt, .ro, .se, .sk.


Configuration

Parameters

Parameter Type Default Description
proxy str | None None Proxy string: "user:pass@host:port" or "host:port"
cookies_dir Path | None Path(".") Directory for cookie storage
persist_cookies bool False Enable cookie persistence between sessions
storage_format "json" | "pickle" | "mozilla" "json" Cookie storage format

Proxy Support

Use a proxy by passing a simple connection string:

async with VintedClient(
    proxy="user:[email protected]:8080"  # Format: [user:pass@]host:port
) as client:
    items = await client.search_items(url)

Cookie Persistence

Save cookies between sessions to avoid repeated authentication:

from pathlib import Path

async with VintedClient(
    persist_cookies=True,              # Enable persistence
    cookies_dir=Path("./cookies"),     # Storage directory
    storage_format="json"              # Format: pickle | json | mozilla
) as client:
    items = await client.search_items(url)

Storage formats:

  • "json" (default) - Human-readable, portable across platforms
  • "pickle" - Fastest, Python-native binary format
  • "mozilla" - Browser-compatible Netscape format

Search Options

Use type-safe sorting and pagination:

items = await client.search_items(
    url="https://www.vinted.de/catalog?brand_ids[]=53",
    per_page=20,                      # Items per page (1-96)
    page=1,                           # Page number
    order="price_low_to_high"         # Sort order (IDE auto-complete)
)

Available sort orders:

  • newest_first - Most recent items
  • relevance - Best match
  • price_low_to_high - Cheapest first
  • price_high_to_low - Most expensive first

Raw Data

Get raw JSON dictionaries instead of parsed models:

raw_items = await client.search_items(
    url="https://www.vinted.com/catalog?search_text=shoes",
    raw_data=True  # Returns list[dict] instead of list[CatalogItem]
)

Seller

Get a seller profile and the items they list, using the profile URL shared by the site or the app:

url = "https://www.vinted.de/member/123456789-username"

seller = await client.seller_info(url)
print(seller.login, seller.country_code, seller.feedback_count, seller.item_count)

items = await client.seller_items(
    url,
    per_page=96,                      # Items per page (Vinted caps it at 96)
    page=1,
    order="price_low_to_high"
)

If you only have the seller id, build the URL yourself: f"https://www.vinted.de/member/{seller_id}".

Notes:

  • Only items visible on the Vinted domain of the URL are returned, so the list may be empty on another market.
  • Vinted currently ignores newest_first for seller items and returns the relevance order.

Item Details

⚠️ Deprecated since 1.1.0. Vinted removed the item details API, so item_details() raises VintedDeprecatedError.

Models

Model Returned by Fields
CatalogItem search_items(), seller_items() id, title, brand_title, size_title, condition, price, total_item_price, currency, photo, url
Seller seller_info() id, login, profile_url, photo, country_code, city, item_count, followers_count, feedback_count, feedback_reputation, last_login, is_on_holiday, is_business

Every model keeps the original API response in raw_data.

Exception Handling

from vinted import (
    VintedClient,
    VintedError,           # Base exception
    VintedAPIError,        # API errors (4xx, 5xx)
    VintedAuthError,       # Authentication failures
    VintedNetworkError,    # Network/connection errors
    VintedConfigError,     # Invalid configuration
    VintedValidationError, # Input validation errors
    VintedRateLimitError,  # Rate limiting (429)
)

try:
    async with VintedClient(proxy="invalid://proxy") as client:
        items = await client.search_items(url)
except VintedConfigError as e:
    print(f"Configuration error: {e}")
except VintedValidationError as e:
    print(f"Invalid input: {e}")
except VintedRateLimitError as e:
    print(f"Rate limited: {e.status_code}")
except VintedAuthError as e:
    print(f"Auth failed: {e}")
except VintedNetworkError as e:
    print(f"Network error: {e.original_error}")
except VintedAPIError as e:
    print(f"API error: {e.status_code}")

Migration Guide

Upgrading from 0.x to 1.x:

  • Import: from vinted_api_kit import VintedApi → from vinted import VintedClient
  • locale parameter removed: the locale is detected from the URL
  • Proxy: proxies={"http": "http://user:pass@host:port"} → proxy="user:pass@host:port"
  • Default cookie storage format is json (pickle and mozilla are also available)

Development

Setup

git clone https://github.com/vlymar1/vinted-api-kit.git
cd vinted-api-kit

pip install hatch
hatch shell

Project Structure

vinted-api-kit/
├── vinted/             # Main package
│   ├── api/            # API endpoint handlers
│   ├── models/         # Data models (dataclasses)
│   ├── storage/        # Cookie storage strategies
│   ├── client.py       # Main client (VintedClient)
│   ├── session.py      # HTTP session management
│   ├── auth.py         # Authentication logic
│   ├── constants.py    # Constants and type definitions
│   ├── exceptions.py   # Custom exceptions
│   └── utils.py        # Utility functions
└── tests/              # Test suite

Testing

make test-coverage      # Run tests with coverage
make test-coverage-view # Run tests and open coverage report in browser

Code Quality

make lint-check         # Check code with ruff and mypy
make format             # Format code with ruff

Cleanup

make clean              # Remove cache files and build artifacts

Development Guidelines

  • Follow PEP 8 style guidelines
  • Use type hints for all functions
  • Write tests for new features
  • Update CHANGELOG.md for notable changes
  • Run make lint-check before committing
  • Contributions welcome! Open issues or pull requests

Changelog

See CHANGELOG.md for the list of notable changes per version.

How to create and maintain changelog?

  • Start a CHANGELOG.md file at the root of your repo.
  • Follow Keep a Changelog format for consistent structure.
  • For each release version, record:
    • Added — new features
    • Changed — updates/improvements
    • Fixed — bug fixes
    • Removed — deprecated or removed features
  • Update changelog before tagging a new release (e.g., v1.0.0).
  • Automate changelog generation optionally by tools such as:
    • github-changelog-generator
    • auto-changelog
    • Conventional commits combined with semantic-release

License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠ Disclaimer

This library is intended for personal and lawful use only. The author is not responsible for any misuse, including but not limited to:

  • Violations of applicable laws or regulations
  • Breaches of terms of service of third-party websites

By using this library, you agree that you are solely responsible for your actions.


Maintainers / Contacts

  • GitHub: https://github.com/vlymar1

Feel free to open issues or contact for support and collaborations.

About

Lightweight asynchronous Python client library for accessing Vinted API and scraping item data

Topics

api-wrapperasynciopythonvintedvinted-api

Resources

Readme
License
Activity

Stars

24 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.