Search.byquery: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
w>Jguillo No edit summary  | 
				w>Jguillo No edit summary  | 
				||
| Line 46: | Line 46: | ||
= Sample =  | = Sample =  | ||
REQUEST:  | REQUEST (searching for ''"Creative Commons" music'':  | ||
  <nowiki>https://search.safecreative.org/v2/</nowiki>  |   <nowiki>https://search.safecreative.org/v2/</nowiki>  | ||
  ?'''component'''=search.byquery  |   ?'''component'''=search.byquery  | ||
  &'''query'''=music  |   &'''query'''=%22Creative+Commons%22+music  | ||
RESPONSE:  | RESPONSE:  | ||
| Line 57: | Line 57: | ||
<?xml version="1.0" encoding="UTF-8"?>  | <?xml version="1.0" encoding="UTF-8"?>  | ||
<listpage>  | <listpage>  | ||
   <recordtotal>  |    <recordtotal>36781</recordtotal>  | ||
   <pagetotal>  |    <pagetotal>1472</pagetotal>  | ||
   <list>  |    <list>  | ||
     <work>  |      <work>  | ||
| Line 96: | Line 96: | ||
     [...]  |      [...]  | ||
     <work>  |      <work>  | ||
       <code>  |        <code>0910034623680</code>  | ||
       <title>  |        <title>Patterns in the Sky</title>  | ||
       <authors>  |        <authors>  | ||
         <author>  |          <author>  | ||
           <code>  |            <code>0909300055959</code>  | ||
           <name>  |            <name>Bruce H. McCosar</name>  | ||
           <human-url>http://www.safecreative.org/user/  |            <human-url>http://www.safecreative.org/user/0909300055959</human-url>  | ||
         </author>  |          </author>  | ||
       </authors>  |        </authors>  | ||
       <rights-holders>  |        <rights-holders>  | ||
         <rights-holder>  |          <rights-holder>  | ||
           <code>  |            <code>0909300055959</code>  | ||
           <name>  |            <name>Bruce H. McCosar</name>  | ||
           <human-url>http://www.safecreative.org/user/  |            <human-url>http://www.safecreative.org/user/0909300055959</human-url>  | ||
         </rights-holder>  |          </rights-holder>  | ||
       </rights-holders>  |        </rights-holders>  | ||
       <thumbnail>https://thumbnails-safecreative-org.s3.amazonaws.com/1/00000124/  |        <thumbnail>https://thumbnails-safecreative-org.s3.amazonaws.com/1/00000124/1c03/4234/3560/bf36461b6c31/012020Bruce20H20McCosar2020Patterns20in20the20Sky_thumb.png</thumbnail>  | ||
       <license>  |        <license>  | ||
         <code>http://creativecommons.org/licenses/by-sa/  |          <code>http://creativecommons.org/licenses/by-sa/3.0/</code>  | ||
         <name>Attribution  |          <name>Creative Commons Attribution Share Alike 3.0</name>  | ||
         <shortname>CC by-sa   |          <shortname>CC by-sa</shortname>  | ||
         <human-url>http://creativecommons.org/licenses/by-sa/  |          <human-url>http://creativecommons.org/licenses/by-sa/3.0/legalcode</human-url>  | ||
         <features>  |          <features>  | ||
           <timelimited>NOT_APPLICABLE</timelimited>  |            <timelimited>NOT_APPLICABLE</timelimited>  | ||
| Line 126: | Line 126: | ||
         </features>  |          </features>  | ||
       </license>  |        </license>  | ||
       <human-url>http://www.safecreative.org/work/  |        <human-url>http://www.safecreative.org/work/0910034623680</human-url>  | ||
       <machine-url>http://www.safecreative.org/v2/?component=work.get&code=  |        <machine-url>http://www.safecreative.org/v2/?component=work.get&code=0910034623680</machine-url>  | ||
     </work>  |      </work>  | ||
   </list>  |    </list>  | ||
Revision as of 08:10, 6 May 2010
Search for works using a query as in the search web page at http://search.safecreative.org
In the search query you can include several terms, space-separated. To search for an exact phrase, enclose it with double quotes (").
Results are paginated
Info
- Component name: search.byquery
 - Signature: No signature required
 - Timestamp: Ztime is not required
 - API trust level: Public
 - API server: 
http://api-search.safecreative.org 
Parameters
- query*: Search query
 - page: Page number
 - locale: Locale for work type, license names,...
 
* Required parameter
Returns
Paginated list of work elements
- work
- code: Safe Creative work code
 - title: Work title
 - authors: List of authors
- author
- code: Author's Safe Creative user code
 - name: Author's full name
 - human-url: URL to the author's Safe Creative public profile
 
 
 - author
 - rights-holders: List of rights holders
- rights-holder
- code: Rights holder's Safe Creative user code
 - name: Rights holder's full name
 - human-url: URL to the rights holder's Safe Creative public profile
 
 
 - rights-holder
 - thumbnail: URL to the work thumbnail (if any)
 - license: Work license
- code: License code
 - name: License name
 - shortname: License short name
 - human-url: URL to license text
 - features: License features (see user.licenses
 
 - human-url: URL to this work web page in Safe Creative
 - machine-url: URL to this work API info response (see work.get)
 
 
Sample
REQUEST (searching for "Creative Commons" music:
https://search.safecreative.org/v2/ ?component=search.byquery &query=%22Creative+Commons%22+music
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<listpage>
  <recordtotal>36781</recordtotal>
  <pagetotal>1472</pagetotal>
  <list>
    <work>
      <code>0910074648315</code>
      <title>névroses (disco mix)</title>
      <authors>
        <author>
          <code>0910070058439</code>
          <name>Pierre Miss Daisy Black</name>
          <human-url>http://www.safecreative.org/user/0910070058439</human-url>
        </author>
      </authors>
      <rights-holders>
        <rights-holder>
          <code>0910070058439</code>
          <name>Pierre Miss Daisy Black</name>
          <human-url>http://www.safecreative.org/user/0910070058439</human-url>
        </rights-holder>
      </rights-holders>
      <thumbnail>https://thumbnails-safecreative-org.s3.amazonaws.com/1/00000124/2e41/4ec3/a029/8b662f279d78/112020Miss20Daisy20Black2020nevroses2028disco20mix29_thumb.png</thumbnail>
      <license>
        <code>http://creativecommons.org/licenses/by-nc-sa/3.0/</code>
        <name>Creative Commons Attribution Non-Comercial Share Alike 3.0</name>
        <shortname>CC by-nc-sa</shortname>
        <human-url>http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode</human-url>
        <features>
          <timelimited>NOT_APPLICABLE</timelimited>
          <recognition>YES</recognition>
          <distribution>YES</distribution>
          <derivations>INHERITANCE</derivations>
          <commercial>NO</commercial>
        </features>
      </license>
      <human-url>http://www.safecreative.org/work/0910074648315</human-url>
      <machine-url>http://www.safecreative.org/v2/?component=work.get&code=0910074648315</machine-url>
    </work>
    [...]
    <work>
      <code>0910034623680</code>
      <title>Patterns in the Sky</title>
      <authors>
        <author>
          <code>0909300055959</code>
          <name>Bruce H. McCosar</name>
          <human-url>http://www.safecreative.org/user/0909300055959</human-url>
        </author>
      </authors>
      <rights-holders>
        <rights-holder>
          <code>0909300055959</code>
          <name>Bruce H. McCosar</name>
          <human-url>http://www.safecreative.org/user/0909300055959</human-url>
        </rights-holder>
      </rights-holders>
      <thumbnail>https://thumbnails-safecreative-org.s3.amazonaws.com/1/00000124/1c03/4234/3560/bf36461b6c31/012020Bruce20H20McCosar2020Patterns20in20the20Sky_thumb.png</thumbnail>
      <license>
        <code>http://creativecommons.org/licenses/by-sa/3.0/</code>
        <name>Creative Commons Attribution Share Alike 3.0</name>
        <shortname>CC by-sa</shortname>
        <human-url>http://creativecommons.org/licenses/by-sa/3.0/legalcode</human-url>
        <features>
          <timelimited>NOT_APPLICABLE</timelimited>
          <recognition>YES</recognition>
          <distribution>YES</distribution>
          <derivations>INHERITANCE</derivations>
          <commercial>YES</commercial>
        </features>
      </license>
      <human-url>http://www.safecreative.org/work/0910034623680</human-url>
      <machine-url>http://www.safecreative.org/v2/?component=work.get&code=0910034623680</machine-url>
    </work>
  </list>
</listpage>