Newer Version Available

This content describes an older version of this product. View Latest

Search for a String

Use the Search resource to execute a SOSL search.

The following example executes a SOSL search for {test}. The search string in this example must be URL-encoded.

Example usage
1curl https://na1.salesforce.com/services/data/v20.0/search/?q=FIND+%7Btest%7D -H "Authorization: Bearer token"
Example request body
none required
Example response body
1[ 
2    {
3        "attributes" : 
4         {
5            "type" : "Account",  
6            "url" : "/services/data/v20.0/sobjects/Account/001D000000IqhSLIAZ"
7        },
8        "Id" : "001D000000IqhSLIAZ"
9    }, 
10    {
11        "attributes" :
12        {  
13            "type" : "Account",  
14            "url" : "/services/data/v20.0/sobjects/Account/001D000000IomazIAB"
15        },
16        "Id" : "001D000000IomazIAB"
17    }
18]