2ememain API2ememain.be ↗
Search and retrieve second-hand listings, seller profiles, and categories from 2ememain.be. 5 endpoints covering listings, seller data, and instrument categories.
What is the 2ememain API?
The 2ememain.be API provides 5 endpoints to search, retrieve, and browse second-hand listings on Belgium's 2ememain.be marketplace. search_listings accepts keyword queries, location filters (postcode and distance in km), condition, and category parameters, returning paginated arrays of listings with pricing, seller info, and location. Complementary endpoints cover listing detail, seller profiles, seller-specific listings, and category IDs.
curl -X GET 'https://api.parse.bot/scraper/38c7505b-327a-42b7-87b6-742ad0ed61ea/search_listings?limit=5&query=guitar&offset=0&sort_by=SORT_INDEX&category=acoustic&sort_order=DECREASING' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace 2ememain-be-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: 2ememain.be SDK — search Belgian second-hand listings, drill into details and sellers."""
from parse_apis.twoememain_be_api import DeuxiemeMain, SortField, SortDirection, Condition, Category_, ResourceNotFound
client = DeuxiemeMain()
# Browse available categories
for cat in client.categories.list(limit=5):
print(cat.name, cat.id)
# Search for electric guitars sorted by newest first
for listing in client.listings.search(query="guitar", sort_by=SortField.SORT_INDEX, sort_order=SortDirection.DECREASING, category=Category_.ELECTRIC, limit=3):
print(listing.title, listing.price_info.price_cents, listing.location.city_name)
# Drill into a single listing's full detail
listing = client.listings.search(query="fender", condition=Condition.USED, limit=1).first()
if listing:
detail = client.listings.get(item_id=listing.item_id)
print(detail.title, detail.category_id, detail.seller_information.seller_name)
# Fetch a seller profile and browse their listings
if listing:
seller = client.sellers.get(seller_id=str(listing.seller_information.seller_id))
for review in seller.reviews:
print(review.rating, review.number_of_reviews, review.review_system)
for item in seller.listings(limit=3):
print(item.title, item.price_info.price_type)
# Typed error handling
try:
client.sellers.get(seller_id="0000000")
except ResourceNotFound as exc:
print(f"Seller not found: {exc}")
print("exercised: categories.list / listings.search / listings.get / sellers.get / seller.listings")
Search for listings on 2ememain.be with keywords, categories, and filters. Returns paginated results. Pagination advances via offset (items, not pages). Each listing carries seller info, price, location, and category. The category tree is rooted at instruments (728); sub-categories narrow the search.
| Param | Type | Description |
|---|---|---|
| limit | integer | Max results per page |
| query | string | Search keyword |
| offset | integer | Pagination offset (number of items to skip) |
| sort_by | string | Sort field |
| category | string | Category name (acoustic, electric, bass, amps, all_instruments) or numeric category ID. Use get_categories to retrieve available category IDs. |
| distance | integer | Distance in km from postcode (0 means no distance filter) |
| postcode | string | Belgian postal code for location-based search |
| condition | string | Item condition filter |
| price_max | integer | Maximum price in euros |
| price_min | integer | Minimum price in euros |
| sort_order | string | Sort order |
{
"type": "object",
"fields": {
"listings": "array of listing objects with itemId, title, description, priceInfo, location, sellerInformation, categoryId, attributes, pictures",
"totalResultCount": "integer total number of matching listings"
},
"sample": {
"data": {
"listings": [
{
"title": "Fender, Marshall, Mesa, Blackstar, Line 6, Vox, Roland,...",
"itemId": "m2409165912",
"location": {
"cityName": "Asse",
"countryName": "Belgique",
"countryAbbreviation": "BE"
},
"priceInfo": {
"priceType": "SEE_DESCRIPTION",
"priceCents": 0
},
"attributes": [
{
"key": "delivery",
"value": "Enlèvement"
}
],
"categoryId": 745,
"description": "Voici une sélection...",
"sellerInformation": {
"sellerId": 28710907,
"sellerName": "Thoma Okaze Asse"
}
}
],
"totalResultCount": 6214
},
"status": "success"
}
}About the 2ememain API
Searching and Filtering Listings
search_listings is the main entry point. Pass a query string alongside optional filters: category (either a named alias like acoustic or a numeric category ID), condition, postcode, and distance in kilometers. Results paginate via offset (item count, not page number) and return a totalResultCount integer alongside an array of listing objects. Each listing carries itemId, title, description, priceInfo (with priceCents and priceType), location (city and country), sellerInformation (seller ID and name), categoryId, attributes, and pictures.
Listing Detail and Seller Data
get_listing_detail accepts an item_id from search results and returns enriched listing data including a product object with schema.org Product structured data when available. get_seller_profile takes a numeric seller_id (from sellerInformation.sellerId) and returns verification flags (smbVerified, bankAccount, phoneNumber), accepted paymentMethod, and a reviews array with numberOfReviews, rating, and reviewSystem. get_seller_listings returns all active listings for a given seller, paginated by offset, with the same listing shape as search results.
Category Navigation
get_categories returns a fixed mapping of category aliases to numeric IDs: all_instruments (728), electric (745), acoustic (746), bass (747), and amps (748). These IDs can be passed directly to the category parameter in search_listings. The current category tree is rooted at instruments; browsing other top-level marketplace categories is not covered by this API.
The 2ememain API is a managed, monitored endpoint for 2ememain.be — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 2ememain.be changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official 2ememain.be API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Aggregate second-hand guitar listings from 2ememain.be filtered by condition and postal region for a price-comparison tool.
- Monitor a specific seller's active inventory using
get_seller_listingswith periodic offset-paginated polling. - Enrich a listing with schema.org Product structured data via
get_listing_detailfor structured product feeds. - Verify seller trustworthiness before a transaction by checking
smbVerified,bankAccount, and review scores fromget_seller_profile. - Build a location-aware classifieds search using
postcodeanddistanceparameters to surface nearby listings. - Map category IDs to human-readable names using
get_categoriesbefore constructing filtered search queries.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does 2ememain.be have an official developer API?+
What does `get_seller_profile` return beyond basic identity?+
get_seller_profile returns boolean flags for bankAccount (linked), phoneNumber (available), and smbVerified (small/medium business verification), plus a paymentMethod object and a reviews array containing numberOfReviews, rating, and the reviewSystem used. It does not return the seller's email address or full contact details.How does pagination work across endpoints?+
search_listings and get_seller_listings paginate by offset, which represents the number of items to skip — not a page number. To fetch the next page, increment offset by your limit value. The totalResultCount field tells you how many total results exist so you can determine when to stop.Are categories beyond musical instruments available?+
get_categories exposes five instrument-related categories (all instruments, electric guitars, acoustic guitars, bass guitars, and amplifiers). Listings in other 2ememain.be verticals such as electronics, furniture, or vehicles are not covered by dedicated category endpoints. You can fork this API on Parse and revise it to add category IDs for other verticals.Can I retrieve sold or expired listings?+
get_seller_listings shows a seller's currently active inventory, and search_listings reflects live marketplace results. Historical or closed listings are not exposed. You can fork this API on Parse and revise it to add an endpoint targeting archived listing data if that becomes accessible.