API reference · Collections

Get a collection's criteria and counts

GEThttps://trawle.com/v1/collections/{slug}
Authentication

Header x-api-key: Read-only API key from https://trawle.com/account#api-keys. 1,000 requests per daily window. Anonymous requests are also supported with a per-IP limit.

Path

  • slugstringrequired
    Limits
    pattern ^[a-z0-9][a-z0-9-]{0,79}$
200The collection.Collection
  • slugstringrequired
  • namestringrequired
  • descriptionstringrequired
  • kindstringrequired
    One of
    sourcedclassifiedderived
  • sourceUrlstring | nullrequired
  • openJobsintegerrequired
  • companiesintegerrequired
401Invalid, expired or revoked API key.Error
  • errorobjectrequired
    4 properties
    • codestringrequired

      Machine-readable: invalid_request, not_found, forbidden, rate_limited, internal.

      Example
      invalid_request
    • messagestringrequired
      Example
      places: expected an array of GeoNames ids
    • hintstringoptional

      What to do next, e.g. which lookup to call first.

      Example
      Resolve place names to ids with GET /v1/places?q=
    • issuesarray<object>optional

      Validation problems, one per invalid field.

      2 propertiesper item
      • pathstringrequired
      • messagestringrequired
404Not found.Error
  • errorobjectrequired
    4 properties
    • codestringrequired

      Machine-readable: invalid_request, not_found, forbidden, rate_limited, internal.

      Example
      invalid_request
    • messagestringrequired
      Example
      places: expected an array of GeoNames ids
    • hintstringoptional

      What to do next, e.g. which lookup to call first.

      Example
      Resolve place names to ids with GET /v1/places?q=
    • issuesarray<object>optional

      Validation problems, one per invalid field.

      2 propertiesper item
      • pathstringrequired
      • messagestringrequired
429Rate limit reached. Respect Retry-After and cache results.Error
  • errorobjectrequired
    4 properties
    • codestringrequired

      Machine-readable: invalid_request, not_found, forbidden, rate_limited, internal.

      Example
      invalid_request
    • messagestringrequired
      Example
      places: expected an array of GeoNames ids
    • hintstringoptional

      What to do next, e.g. which lookup to call first.

      Example
      Resolve place names to ids with GET /v1/places?q=
    • issuesarray<object>optional

      Validation problems, one per invalid field.

      2 propertiesper item
      • pathstringrequired
      • messagestringrequired