API

Search

Overview

  1. Perform a search

Searches all collections, items, and comments (unless type is provided).

Endpoint

GET https://api.dropmark.com/v1/search

Input

Name Type Desc
q String Search term (required if tags not provided)
tags Array Filter results to those with these tags (required if q not provided)
owned Boolean Filter results to those owned by current user
owner_id Integer Filter results to those owned by this user
ll String Filter by latitude/longitude (lat,long)
radius Number Maximum distance (in meters) from ll
page Integer Current page
per_page Integer Number of results to return
type String Filter results to this type: collection, comment, image, video, audio, link, text, other, stack

Example

{
  "q": "eggs"
}

Response

Status: 200 OK
X-Total-Count: 53
[
  {
    "id": 200,
    "name": "Example item",
    "collection_id": 100,
    "collection_name": "Example collection",
    "parent_id": null,
    "parent_name": null,
    "description": "This is a recipe with eggs.",
    "link": null,
    "preview": null,
    "thumbnail": null,
    "size": 0,
    "type": "text",
    "mime": "text/plain",
    "latitude": null,
    "longitude": null,
    "created_at": "2015-06-05T12:45:15Z",
    "updated_at": "2015-09-14T17:56:32Z",
    "user_id": 1,
    "user_name": "Jane Doe",
    "username": "demo",
    "user_email": "jane@example.com",
    "relevance": "11.171298027038574",
    "is_url": false,
    "thumbnails": {},
    "collection_url": "http://demo.dropmark.com/100",
    "url": "http://demo.dropmark.com/100/200",
    "short_url": "http://dpmk.com/i/yvKK4m6nkD"
  }
]