{
    "mode": "perldoc",
    "parameter": "WWW::Search::Ebay",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/WWW%3A%3ASearch%3A%3AEbay/json",
    "generated": "2026-05-30T17:17:49Z",
    "synopsis": "use WWW::Search;\nmy $oSearch = new WWW::Search('Ebay');\nmy $sQuery = WWW::Search::escapequery(\"C-10 carded Yakface\");\n$oSearch->nativequery($sQuery);\nwhile (my $oResult = $oSearch->nextresult())\n{ print $oResult->url, \"\\n\"; }",
    "sections": {
        "NAME": {
            "content": "WWW::Search::Ebay - backend for searching www.ebay.com\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use WWW::Search;\nmy $oSearch = new WWW::Search('Ebay');\nmy $sQuery = WWW::Search::escapequery(\"C-10 carded Yakface\");\n$oSearch->nativequery($sQuery);\nwhile (my $oResult = $oSearch->nextresult())\n{ print $oResult->url, \"\\n\"; }\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is a Ebay specialization of WWW::Search. It handles making\nand interpreting Ebay searches http://www.ebay.com.\n\nThis class exports no public interface; all interaction should be done\nthrough WWW::Search objects.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "The search is done against CURRENT running AUCTIONS only. (NOT completed\nauctions, NOT eBay Stores items, NOT Buy-It-Now only items.) (If you\nwant to search completed auctions, use the WWW::Search::Ebay::Completed\nmodule.) (If you want to search eBay Stores, use the\nWWW::Search::Ebay::Stores module.)\n\nThe query is applied to TITLES only.\n\nThis module can return only the first 200 results matching your query.\n\nIn the resulting WWW::Search::Result objects, the description() field\nconsists of a human-readable combination (joined with semicolon-space)\nof the Item Number; number of bids; and high bid amount (or starting bid\namount).\n\nIn the resulting WWW::Search::Result objects, the enddate() field\ncontains a human-readable DTG of when the auction is scheduled to end\n(in the form \"YYYY-MM-DD HH:MM TZ\"). If environment variable TZ is set,\nthe time will be converted to that timezone; otherwise the time will be\nleft in ebay.com's default timezone (US/Pacific).\n\nIn the resulting WWW::Search::Result objects, the bidcount() field\ncontains the number of bids as an integer.\n\nIn the resulting WWW::Search::Result objects, the bidamount() field is\na string containing the high bid or starting bid as a human-readable\nmonetary value in seller-native units, e.g. \"$14.95\" or \"GBP 6.00\".\n\nIn the resulting WWW::Search::Result objects, the sold() field will be\nnon-zero if the item has already sold. (Only if you're using\nWWW::Search::Ebay::Completed)\n\nAfter a successful search, your search object will contain an element\nnamed 'categories' which will be a reference to an array of hashes\ncontaining names and IDs of categories and nested subcategories, and the\ncount of items matching your query in each category and subcategory.\n(Special thanks to Nick Lokkju for this code!) For example:\n\n$oSearch->{categories} = [\n{\n'ID' => '1',\n'Count' => 19,\n'Name' => 'Collectibles',\n'Subcategory' => [\n{\n'ID' => '13877',\n'Count' => 11,\n'Name' => 'Historical Memorabilia'\n},\n{\n'ID' => '11450',\n'Count' => 1,\n'Name' => 'Clothing, Shoes & Accessories'\n},\n]\n},\n{\n'ID' => '281',\n'Count' => 1,\n'Name' => 'Jewelry & Watches',\n}\n];\n\nIf your query string happens to be an eBay item number, (i.e. if\nebay.com redirects the query to an auction page), you will get back one\nWWW::Search::Result without bid or price information.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Limit search by price range\nContributed by Brian Wilson:\n\n$oSearch->nativequery($sQuery, {\nmPrRngCbx=>'1', udlo=>$minPrice, udhi=>$maxPrice,\n} );\n",
            "subsections": []
        },
        "PUBLIC METHODS OF NOTE": {
            "content": "useragentdelay\nIntroduce a few-seconds delay to avoid overwhelming the server.\n\nneedtodelay\nControls whether we do the delay or not.\n\npreprocessresultspage\nGrabs the eBay Official Time so that when we parse the DTG from the\nHTML, we can convert / return exactly what eBay means for each one.\n\nresultasHTML\nGiven a WWW::SearchResult object representing an auction, formats it\nhuman-readably with HTML.\n\nAn optional second argument is the date format, a string as\nspecified for Date::Manip::UnixDate. Default is '%Y-%m-%d %H:%M:%S'\n\nmy $sHTML = $oSearch->resultasHTML($oSearchResult, '%H:%M %b %E');\n",
            "subsections": []
        },
        "METHODS TO BE OVERRIDDEN IN SUBCLASSING": {
            "content": "You only need to read about these if you are subclassing this module\n(i.e. making a backend for another flavor of eBay search).\n\ngetresultcountelements\nGiven an HTML::TreeBuilder object, return a list of HTML::Element\nobjects therein which could possibly contain the approximate result\ncount verbiage.\n\ngetitemtitletds\nGiven an HTML::TreeBuilder object, return a list of HTML::Element\nobjects therein representing <TD> elements which could possibly\ncontain the HTML for result title and hotlink.\n\nparsecategorylist\nParses the Category list from the left side of the results page. So\nfar, this method can handle every type of eBay search currently\nimplemented. If you find that it doesn't suit your needs, please\ncontact the author because it's probably just a tiny tweak that's\nneeded.\n\nprocessdateabbrevs\nGiven a date string, converts common abbreviations to their full\nwords (so that the string can be unambiguously parsed by\nDate::Manip). For example, in the default English, 'd' becomes\n'days'.\n\nnexttext\nThe text of the \"Next\" button, localized for a specific type of eBay\nbackend.\n\nwhitespacepattern\nReturn a qr// pattern to match whitespace your webpage's language.\n\ncurrencypattern\nReturn a qr// pattern to match mentions of money in your webpage's\nlanguage. Include the digits in the pattern.\n\ntitlepattern\nReturn a qr// pattern to match the webpage title in your webpage's\nlanguage. Add grouping parenthesis so that $1 becomes the auction\ntitle, $2 becomes the eBay item number, and $3 becomes the end date.\n\nresultcountpattern\nReturn a qr// pattern to match the result count in your webpage's\nlanguage. Include parentheses so that $1 becomes the number (with\ncommas is OK).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "To make new back-ends, see WWW::Search.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Please tell the author if you find any!\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Martin 'Kingpin' Thurn, \"mthurn at cpan.org\",\n<http://tinyurl.com/nn67z>.\n\nSome fixes along the way contributed by Troy Davis.\n",
            "subsections": []
        },
        "LEGALESE": {
            "content": "THIS SOFTWARE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR IMPLIED\nWARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyright (C) 1998-2009 Martin 'Kingpin' Thurn\n\nThis software is released under the same license as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "WWW::Search::Ebay - backend for searching www.ebay.com",
    "flags": [],
    "examples": [],
    "see_also": []
}