{
    "mode": "perldoc",
    "parameter": "WWW::SearchResult",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/WWW%3A%3ASearchResult/json",
    "generated": "2026-05-30T17:16: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-)\ndependent. However, all search engines are required to return a url and\ntitle. (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\nmethods \"urls\" and \"addurl\". Nothing special is guaranteed about the\nprimary URL other than that it is the first one returned by the back\nend.\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\n(\"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\nbackend. If an attribute is not provided its method will return \"undef\".\n\nTypical contents of these attributes:\n\ntitle   The title of the hit result (typically that provided by the\n'TITLE' HTML tag).\n\ndescription\nA brief description of the result, as provided (or not) by the\nsearch engine. Often the first few sentences of the document.\n\nsource  Source is either the base url for this result (as listed on the\nsearch engine's results page) or another copy of the full url\npath of the result. It might also indicate the source site name\nor address whence the result came, for example, 'CNN' or\n'http://www.cnn.com' if the search result page said \"found at\nCNN.com\".\n\nThis value is backend-specific; in fact very few backends set\nthis value.\n\naddsources\nSame meaning as source above, for adding sources in case there\nare potentially multiple sources.\n\nsources Returns a reference to the list of sources.\n\nscore   A backend specific, numeric score of the search result. The\nexact range of scores is search-engine specific. Usually larger\nscores are better, but this is no longer required. See\nnormalizedscore for a backend independent score.\n\nnormalizedscore\nThis is intended to be a backend-independent score of the search\nresult. The range of this score is between 0 and 1000. Higher\nvalues indicate better quality results.\n\nThis is not really implemented since no one has created an\nbackend-independent ranking algorithm.\n\nchangedate\nWhen the result was last changed. Typically this is the\nmodification time of the destination 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\napproximation because search backends often report the size as\n\"18.4K\"; the best we can do with that number is return it as the\nvalue of 18.4 * 1024.\n\nraw     The raw HTML for the entire result. Raw should be exactly the\nraw HTML for one entry. It should not include list or table\nsetup commands (like ul or table tags), but it may include list\nitem or table data commands (like li, tr, or td). Whether raw\ncontains a list entry, table row, br-separated lines, or plain\ntext is search-engine dependent. In fact, many backends do not\neven return it at all.\n\nasHTML Convert the search result to a human-readable form, decorated\nwith HTML for pretty-printing.\n",
            "subsections": [
                {
                    "name": "Others",
                    "content": "More attributes of the result. Backend-specific. Refer to the\ndocumentation of each backend for details.\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\nmaintained by Martin Thurn.\n",
            "subsections": []
        }
    },
    "summary": "WWW::SearchResult - class for results returned from WWW::Search",
    "flags": [],
    "examples": [],
    "see_also": []
}