# perldoc > WWW::SearchResult

---
type: CommandReference
command: WWW::SearchResult
mode: perldoc
section: 
source: perldoc
---

## Quick Reference
- `$result = new WWW::SearchResult();` — Create a new result object.
- `$url = $result->url();` — Get the primary URL.
- `$title = $result->title();` — Get the title.
- `$desc = $result->description();` — Get the description.
- `$score = $result->score();` — Get the numeric score.
- `$date = $result->change_date();` — Get the change date.
- `$raw = $result->raw();` — Get the raw HTML of the result entry.
- `$html = $result->as_HTML();` — Get HTML representation of the result.

## Name
class for results returned from [`WWW::Search`](http://localhost/phpMan.php/perldoc/WWW%3A%3ASearch/markdown)

## Synopsis
perl
require WWW::Search;
require WWW::SearchResult;
$search = new WWW::Search();
$search->native_query(WWW::Search::escape_query($query));
$result = $search->next_result();
## Methods
- `new()` — Constructor.
- `url()` — Returns the primary URL. Every result must have at least one URL.
- `add_url($url)` — Adds a URL to the list.
- `urls()` — Returns a reference to the list of all URLs.
- `add_related_url($url)` — Adds a related URL.
- `related_urls()` — Returns a reference to the list of related URLs.
- `add_related_title($title)` — Adds a related title.
- `related_titles()` — Returns a reference to the list of related titles.
- `title()` — Get or set the title (typically the HTML `<TITLE>` content).
- `description()` — Get or set a brief description of the result.
- `source()` — Get or set a backend-specific source (e.g., base URL or site name).
- `add_sources($source)` — Add a source to the list.
- `sources()` — Returns a reference to the list of sources.
- `score()` — Get or set a numeric score (backend-specific range; usually higher is better).
- `normalized_score()` — Backend-independent score (0–1000, not fully implemented).
- `change_date()` — Get or set the last modification time of the result.
- `index_date()` — Get or set when the search engine indexed the result.
- `size()` — Get or set the approximate size in bytes.
- `raw()` — Get or set the raw HTML for the result entry.
- `as_HTML()` — Convert the result to a human-readable HTML string.
- Other backend-specific attributes accessible via methods: `bid_amount`, `bid_count`, `bidder`, `category`, `company`, `end_date`, `image_url`, `item_number`, `location`, `question_count`, `seller`, `shipping`, `sold`, `start_date`, `thumb_url`, `watcher_count`.

## Examples
perl
# Perform a search and print the first result
$search = new WWW::Search();
$search->native_query(WWW::Search::escape_query("perl module"));
$result = $search->next_result();
if ($result) {
    print "URL: ", $result->url(), "\n";
    print "Title: ", $result->title(), "\n";
    print "Description: ", $result->description(), "\n";
}
## See Also
- [`WWW::Search`](http://localhost/phpMan.php/perldoc/WWW%3A%3ASearch/markdown)
- [`WWW::Search::escape_query`](http://localhost/phpMan.php/perldoc/WWW%3A%3ASearch%3A%3Aescapequery/markdown)