knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
options(width = 110)
This package allows you to search ebay for live items using keywords, a category or both. It is a wrapper for the ebay Finding API, specifically the "findItemsAdvanced" call. You can use it after you sign up at https://go.developer.ebay.com/ and get a valid token (a.k.a AppID).
Install:
devtools::install_github("gsimchoni/ebayr")
Load:
library(ebayr)
Set ebay token:
setEbayToken("YOUR_EBAY_TOKEN")
Search by keywords:
search_ebay("elvis costume")
library(tibble) res <- readRDS("C:/SDAD_materials/readmeResults.RData") res$keywords
Search by category (a.k.a Browse):
search_ebay(categoryName = "Video Game Consoles")
res$category
Search by both keywords and category:
search_ebay("Yahtzee", categoryName = c("Nonfiction", "Board & Traditional Games"))
res$both
Search the UK site for new large size Fruit of the Loom women's T-shirts from top rated sellers at a max price of 10 pounds:
res <- search_ebay("women's t-shirts", site = "UK", condition = "New", listingType = "FixedPrice", topRatedSellerOnly = TRUE, priceRange = c(0, 10), aspectFilter = list( Brand = "Fruit of the Loom", Size = "L" ) ) res[, c("title", "price", "currency")]
res$uk[, c("title", "price", "currency")]
Search the German site for black women's handbags, ask for the 200 most expensive results:
res <- search_ebay("Damentaschen", site = "DE", sortOrder = "PricePlusShippingHighest", nResults = 200, aspectFilter = list( Farbe = "Schwarz" ) ) res[, c("title", "price", "currency")]
res$de[, c("title", "price", "currency")]
The possibilities are endless, though ebay APIs have even more.
You should probably read ebay's API Reference and API license and make sure you adhere to the rules.
Also note that the rate limit of the API wrapped here is 5,000 requests a day, each request can bring up to 100 results (ebay items).
For more possibilities see the search_ebay
function documentation, and read this blog post.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.