Listings
On this page, we’ll dive into the different listing endpoints you can use to manage listings programmatically.
The listing model
The ListingsModel
is a database model that represents a listing, with properties such as id
, name
and price
.
Properties
- Name
id
- Type
- integer
- Description
Unique identifier for the listing.
- Name
name
- Type
- string
- Description
Name of the listing.
- Name
price
- Type
- string
- Description
Price of the listing.
- Name
url
- Type
- string
- Description
URL of the listing. Link to the original listing on eBay.
- Name
thumbnail
- Type
- string
- Description
Thumbnail of the listing. This is a URL to a low resolution image of the listing.
- Name
source
- Type
- string
- Description
Source Image of the listing. This is a URL to a high resolution image of the listing.
- Name
date
- Type
- date
- Description
Date that the listing was added to the database.
- Name
new
- Type
- boolean
- Description
Whether the listing is new or not.
- Name
seller
- Type
- string
- Description
The seller that posted the listing
- Name
seller_items_sold
- Type
- integer
- Description
Number of items sold by the seller.
- Name
seller_rating
- Type
- string
- Description
Rating of the seller.
- Name
origin_country
- Type
- string
- Description
Origin country of the listing.
- Name
postage_fee
- Type
- string
- Description
Postage fee of the listing.
List all listings
This endpoint allows you to retrieve a of all the current user's scraped listings.
Request
curl -G https://watchdog-api.zeroruka.moe/v1/listings/ \
-H "Authorization: Bearer {token}" \
Response
{
{
"126562395658": {
"listing": {
"title": "WWII MALAYA JAPANESE OCCUPATION 100 DOLLARS NOTE UNCIRCULATED",
"price": "S$ 11.49",
"url": "https://www.ebay.com.sg/itm/125743423679",
"date_added": "2023-03-25",
"new": null,
"origin_country": "United States",
"postage_fee": "S$ 6.66",
"images": {
"thumbnail_l225px": "https://i.ebayimg.com/thumbs/images/g/fpsAAOSwOXVj1qNe/s-l225.jpg",
"source_l800px": "https://i.ebayimg.com/thumbs/images/g/fpsAAOSwOXVj1qNe/s-l800.jpg"
}
},
"seller": {
"name": "zero29zero",
"items_sold": "1,878",
"rating": "99.8%"
}
},
"176457253793": {
// ...
}
}
List a single listing
This endpoint allows you to retrieve a single listing by its unique identifier.
Attributes
- Name
listing_id
- Type
- integer
- Description
Unique identifier for the listing.
Request
curl -G https://watchdog-api.zeroruka.moe/v1/listings?listing_id={id} \
-H "Authorization: Bearer {token}" \
Response
{
"126562395658": {
"listing": {
"title": "WWII MALAYA JAPANESE OCCUPATION 100 DOLLARS NOTE UNCIRCULATED",
"price": "S$ 11.49",
"url": "https://www.ebay.com.sg/itm/125743423679",
"date_added": "2023-03-25",
"new": null,
"origin_country": "United States",
"postage_fee": "S$ 6.66",
"images": {
"thumbnail_l225px": "https://i.ebayimg.com/thumbs/images/g/fpsAAOSwOXVj1qNe/s-l225.jpg",
"source_l800px": "https://i.ebayimg.com/thumbs/images/g/fpsAAOSwOXVj1qNe/s-l800.jpg"
}
},
"seller": {
"name": "zero29zero",
"items_sold": "1,878",
"rating": "99.8%"
}
}
}
Delete all listings
This endpoint allows you to delete all the current user's scraped listings.
Request
curl -X DELETE https://watchdog-api.zeroruka.moe/v1/listings/ \
-H "Authorization: Bearer {token}" \
Response
{
"message": "Successfully deleted all listings"
}