Wikidata:Property proposal/Search formatter URL

From Wikidata
Jump to navigation Jump to search

Search formatter URL[edit]

Originally proposed at Wikidata:Property proposal/Generic

DescriptionWeb page search URL; URI template from which "$1" can be automatically replaced with the sting to be searched for
Data typeString
Domainwebsites & web services; Wikidata external ID properties
Allowed valuesSearch URLs, with "$1" replacing the search string
Example
See alsoformatter URL (P1630), formatter URI for RDF resource (P1921), third-party formatter URL (P3303)
Motivation

We should be able to programmatically indicate how to use a website's search facility; not least for external IDs. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:04, 15 June 2017 (UTC)[reply]

Discussion
@Pigsonthewing: I will admit I don't have a ready example of this, but a lot of search pages for catalogues require a specific class of result to be returned (whether authors, books, publishers, or the like) that is typically specified within the URL. Should a separate URL be needed under this proposal for each type of search result? Mahir256 (talk) 18:51, 21 June 2017 (UTC)[reply]
The first important question: does this apply to class of entity / property or to website? Your example is entity/property, but shouldn't we also think about websites? Websites tie up to entities: eg to find things about Ontotext (Q7095072), I'll want to use the search box on http://www.ontotext.com.
The http://www.opensearch.org/ spec exposes the "search box" of any site using an "OpenSearch description document". There's a lot of detail in that document (encoding, language, adult rating, result type (HTML, Atom, RSS), etc). Don't we want to capture that info, or at least the location of the document?
OpenSearch has many extensions: Referrer Relevance Parameter Suggestions Geo Time Advertisement Commerce Mobile Spelling SRU (maybe some of them are relevant?)
VOID (the eminent LOD dataset description ontology) also ties to that: https://www.w3.org/TR/void/#opensearch
You assume the results will be HTML but as OpenSearch shows, Atom and RSS are also often used. Does this mean we also need "Search formatter URL for Atom" and "Search formatter URL for RSS"? We need a more generic approach!

--Vladimir Alexiev (talk) 10:09, 3 October 2017 (UTC)[reply]

My examples are for both. You can refer to RSS or Atom with qualifiers. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:14, 3 October 2017 (UTC)[reply]