{
    "mode": "perldoc",
    "parameter": "WWW::SearchResult",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/WWW%3A%3ASearchResult/json",
    "generated": "2026-06-12T11:43:19Z",
    "synopsis": "require WWW::Search;\nrequire WWW::SearchResult;\n$search = new WWW::Search;\n$search->nativequery(WWW::Search::escapequery($query));\n# Get first result:\n$result = $search->nextresult();",
    "sections": {
        "NAME": {
            "content": "WWW::SearchResult - class for results returned from WWW::Search\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "require WWW::Search;\nrequire WWW::SearchResult;\n$search = new WWW::Search;\n$search->nativequery(WWW::Search::escapequery($query));\n# Get first result:\n$result = $search->nextresult();\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A framework for returning the results of \"WWW::Search\".\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "WWW::Search\n",
            "subsections": []
        },
        "REQUIRED RESULTS": {
            "content": "The particular fields returned in a result are backend- (search engine-) dependent. However, all\nsearch engines are required to return a url and title. (This list may grow in the future.)\n",
            "subsections": []
        },
        "METHODS AND FUNCTIONS": {
            "content": "new\nTo create a new WWW::SearchResult, call\n\n$result = new WWW::SearchResult();\n\nurl\nReturns the primary URL. Note that there may be a list of urls, see also methods \"urls\" and\n\"addurl\". Nothing special is guaranteed about the primary URL other than that it is the first\none returned by the back end.\n\nEvery result is required to have at least one URL.\n\naddurl\nAdd a URL to the list.\n\nurls\nReturn a reference to the list of urls. There is also a primary URL (\"url\").\n\naddrelatedurl\nAdd a URL to the relatedurl list.\n\nrelatedurls\nReturn a reference to the list of related urls.\n\naddrelatedtitle\nAdd a title to the list or related titles.\n\nrelatedtitles\nReturn a reference to the list of related titles.\n\ntitle, description, score, changedate, indexdate, size, raw\nSet or get attributes of the result.\n\nNone of these attributes is guaranteed to be provided by a given backend. If an attribute is not\nprovided its method will return \"undef\".\n\nTypical contents of these attributes:\n\ntitle   The title of the hit result (typically that provided by the 'TITLE' HTML tag).\n\ndescription\nA brief description of the result, as provided (or not) by the search engine. Often the\nfirst few sentences of the document.\n\nsource  Source is either the base url for this result (as listed on the search engine's results\npage) or another copy of the full url path of the result. It might also indicate the\nsource site name or address whence the result came, for example, 'CNN' or\n'http://www.cnn.com' if the search result page said \"found at CNN.com\".\n\nThis value is backend-specific; in fact very few backends set this value.\n\naddsources\nSame meaning as source above, for adding sources in case there are potentially multiple\nsources.\n\nsources Returns a reference to the list of sources.\n\nscore   A backend specific, numeric score of the search result. The exact range of scores is\nsearch-engine specific. Usually larger scores are better, but this is no longer\nrequired. See normalizedscore for a backend independent score.\n\nnormalizedscore\nThis is intended to be a backend-independent score of the search result. The range of\nthis score is between 0 and 1000. Higher values indicate better quality results.\n\nThis is not really implemented since no one has created an backend-independent ranking\nalgorithm.\n\nchangedate\nWhen the result was last changed. Typically this is the modification time of the\ndestination web page.\n\nindexdate\nWhen the search engine indexed the result.\n\nsize    The approximate size of the result, in bytes. This is only an approximation because\nsearch backends often report the size as \"18.4K\"; the best we can do with that number is\nreturn it as the value of 18.4 * 1024.\n\nraw     The raw HTML for the entire result. Raw should be exactly the raw HTML for one entry. It\nshould not include list or table setup commands (like ul or table tags), but it may\ninclude list item or table data commands (like li, tr, or td). Whether raw contains a\nlist entry, table row, br-separated lines, or plain text is search-engine dependent. In\nfact, many backends do not even return it at all.\n\nasHTML Convert the search result to a human-readable form, decorated with HTML for\npretty-printing.\n",
            "subsections": [
                {
                    "name": "Others",
                    "content": "More attributes of the result. Backend-specific. Refer to the documentation of each backend for\ndetails.\n\nbidamount\nbidcount\nbidder\ncategory\ncompany\nenddate\nimageurl\nitemnumber\nlocation\nquestioncount\nseller\nshipping\nsold\nstartdate\nthumburl\nwatchercount\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "WWW::SearchResult was written by John Heidemann. WWW::SearchResult is maintained by Martin\nThurn.\n",
            "subsections": []
        }
    },
    "summary": "WWW::SearchResult - class for results returned from WWW::Search",
    "flags": [],
    "examples": [],
    "see_also": []
}