Skip to main content

Unofficial Wrapper for Vinted API

Project description

Contributors Forks Stargazers Issues Pull Requests License

PyPi Python


Logo

Vinted Api Wrapper

Simple client for Vinted Developer API written in Python
« Explore the docs »

Report Bug · Request Feature

📋 Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

ℹ️ About The Project

The Vinted API Wrapper is a Python-based tool designed to interact with the Vinted marketplace. It provides a set of methods for fetching product data, user information, and catalog details directly from Vinted's API. The wrapper streamlines the process of making API requests, handling cookies, and parsing JSON responses into structured Python dataclass objects. It enables developers to search, filter, and retrieve data efficiently, making it easier to integrate Vinted's functionalities into their own applications.

(back to top ⬆️)

⚙️ Built With

Python requests dacite

(back to top ⬆️)

🟢 Getting Started & Installation

To use the Vinted API Wrapper you can clone the repository or use pip package (recommended)

  1. Install vinted-api-wrapper package
pip install vinted-api-wrapper
  1. Usage: Import the Vinted class into your Python script and start making API calls:
from vinted import Vinted
vinted = Vinted()
  • To specify the Vinted marketplace domain for API requests, pass the desired domain when initializing the Vinted object. By default, the domain is set to vinted.pl. However, you can choose from the following supported domains:
["pl", "fr", "at", "be", "cz", "de", "dk", "es", "fi", "gr", "hr", "hu", "it", "lt", "lu", "nl", "pt", "ro", "se", "sk", "co.uk", "com"]

# Usage example:
vinted = Vinted(domain="fr")
  • To use a proxy for API requests, you can configure it when initializing the Vinted object:
# Configure proxy settings
proxy_settings = {
    'username': 'your_proxy_username',
    'password': 'your_proxy_password',
    'host': 'proxy_host',
    'port': 'proxy_port'
}

# Create proxy URL
proxy_url = f"http://{proxy_settings['username']}:{proxy_settings['password']}@{proxy_settings['host']}:{proxy_settings['port']}"

# Initialize Vinted with proxy
vinted = Vinted(domain="fr", proxy=proxy_url)

(back to top ⬆️)

❓Usage

Using vinted-api-wrapper in Your Project

The Vinted class provides several useful methods to interact with Vinted's API. Below are some key methods and examples:

  • Search for Products: Search the Vinted marketplace by keywords and filters OR search url (more in docs).

    items = vinted.search(query="sneakers", catalog_ids=1, brand_ids=100)
    # SearchResponse(code=0, pagination=Pagination(...), dominant_brand=DominantBrand(...), items=[Item(id=1234567890, title='Nike shoes', price='35.0', is_visible=True, discount=None, brand_title='Nike', user=User(id=987654, login='foobar', ...more), url='https://www.vinted.pl/items/1234567890-nike-shoes', promoted=False, photo=ItemPhoto(...), favourite_count=0, service_fee='4.65', total_item_price='39.65', view_count=0, content_source='search',, search_tracking_params=SearchParams(...)), Item(...)], search_tracking_params=SearchTrackingParams(...)
    
  • Get User Information: Retrieve details about a specific user.

    user = vinted.user_info(12345)
    # UserResponse(code=0, pagination=None, user=DetailedUser(id=12345, anon_id='xyz123', login='foobar', real_name=None, email=None, birthday=None, item_count=70, given_item_count=20, taken_item_count=5, followers_count=4, following_count=15, following_brands_count=1, positive_feedback_count=8, neutral_feedback_count=0, negative_feedback_count=0, ...more))
    
  • Retrieve Item Details: Fetch detailed information about a specific item by its ID.

    user = vinted.item_info(12345)
    # ItemsResponse(code=0, pagination=None, item=DetailedItem(id=5146387299, title='New Rock 38 38,5 buty na platformie nowe goth punk', brand_id=432, size_id=58, status_id=6, user_id=124343433, ...more))
    

(back to top ⬆️)

🌱 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top ⬆️)

🏆 Top contributors:

contrib.rocks image

📜 License

Distributed under the MIT License. See LICENSE for more information.

(back to top ⬆️)

📥 Contact

Gmail LinkedIn

(back to top ⬆️)

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

vinted-api-wrapper-0.3.8.tar.gz (18.7 kB view details)

Uploaded Source

File details

Details for the file vinted-api-wrapper-0.3.8.tar.gz.

File metadata

  • Download URL: vinted-api-wrapper-0.3.8.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for vinted-api-wrapper-0.3.8.tar.gz
Algorithm Hash digest
SHA256 5e77a379ace4b50d76cab745d496cc175b186c25fc5d28d7e288ef4867ec9526
MD5 e875ccae8fadc1ae5eb8ea27e3abf63b
BLAKE2b-256 77d75e3261fbedfdca5cea7c3dc973a865778a093df1a2d4e8d49ec4c0f5316f

See more details on using hashes here.

Supported by

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