Back to top

This is the REST API documentation for the Fetching bookmarking and search service. There is a separate DDP API also available.

Note: the Fetching API is currently in Beta. It’s interfaces are subject to change and its performance may be variable.

Authentication

All API requests must be authenticated to a specific, active user account. Both Fetching Cloud and Cloud Sync accounts can be accessed via the API. Fetching Native does not provide API access at this time.

Access Tokens

All requests require an authentication token passed either in the request header, as a query parameter in the URL, or as a posted parameter in the body. To get an API token for your account please visit the Fetching API Settings page.

Access Levels

API access can be either read-only or read-write.

Use read-only access when you need to make your API tokens public such as in a JavaScript widget running in a browser. These tokens will grant read access to your account data, do not allow any changes to be made, and restrict document queries to bookmarked pages only.

Use read-write access only when you can keep your token private such as on a secure server. These tokens allow modifications to your data and allow access to all your document data, including potentially sensitive browsing data in addition to your bookmarks.

Errors

The common HTTP Response Status Codes are used.

Documents 

The Document object represents any saved website including bookmarked websites.

Documents Collection 

A collection of Document objects matching the specified filters or search criteria, excluding the HTML body.

Get a collection of Documents
/documents
  • Parameters
  • limit
    integer (optional) 

    Limit the number of documents returned. Defaults to 10.

    token
    string (optional) 

    A valid authentication token.

    query
    string (optional) 

    A valid search query.

    scope
    string (optional) 

    The search scope, one of either bookmarked or all. Defaults to all.

  • Request
  • Headers
    X-Auth-Token: E031EIDrgUXMmJtxE4dfrHN_8kHx3w_Cot3tlspMJoa
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "_id": "RbEMb6a2hYJvjSxDj",
            "url": "https://news.ycombinator.com/",
            "title": "Hacker News",
            "description": "",
            "bookmarked": true,
            "createdAt": "2015-01-24T20:27:49.281Z",
            "updatedAt": "2015-05-31T19:51:23.200Z",
            "tags": [
              "development",
              "news"
            ]
        },
        {
            "_id": "iW4C3Ck9ccsdTa6xu",
            "url": "https://console.aws.amazon.com/opsworks/home?region=us-west-2",
            "title": "AWS OpsWorks",
            "description": "",
            "bookmarked": true,
            "createdAt": "2015-04-16T17:27:28.419Z",
            "updatedAt": "2015-05-31T16:23:54.078Z"
        }
    
    ]
    

Document 

A single document, including the full HTML body.

Get a single Document
/documents/{id}
  • Parameters
  • id
    string (required) 

    The ID of an existing document.

    token
    string (optional) 

    A valid authentication token.

  • Request
  • Headers
    X-Auth-Token: E031EIDrgUXMmJtxE4dfrHN_8kHx3w_Cot3tlspMJoa
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "_id": "iW4C3Ck9ccsdTa6xu",
        "userId": "rhcjHnDcDyCGFKFfL",
        "url": "https://console.aws.amazon.com/opsworks/home?region=us-west-2",
        "title": "AWS OpsWorks",
        "description": "",
        "bookmarked": true,
        "createdAt": "2015-04-16T17:27:28.419Z",
        "updatedAt": "2015-05-31T16:23:54.078Z",
        "tags": [
            "development"
        ],
        "body": "<html>body</html>"
    }
    

Generated by aglio on 11 Oct 2015