trash nothing
  1. groups
trash nothing
  • messages
    • List conversations
      GET
    • Mark all conversations as read
      PUT
    • Search conversations
      GET
    • Delete conversation
      DELETE
    • Archive conversation
      PUT
    • Block conversation
      PUT
    • Mark conversation as read
      PUT
    • List conversation messages
      GET
    • Reply to conversation
      POST
    • Report conversation
      POST
    • Unarchive conversation
      PUT
    • Unblock conversation
      PUT
  • misc
    • Send feedback
      POST
  • groups
    • Search groups
      GET
    • Retrieve multiple groups
      GET
    • Join groups
      POST
    • Retrieve a group
      GET
    • Submit group answers
      POST
    • Contact group moderators
      POST
    • Leave a group
      POST
  • photos
    • Create a photo
      POST
    • Retrieve multiple photos
      GET
    • Delete a photo
      DELETE
    • Rotate a photo
      POST
  • posts
    • List posts
      GET
    • Submit a post
      POST
    • List all posts
      GET
    • List all post changes
      GET
    • Retrieve client.js
      GET
    • Retrieve multiple posts
      GET
    • Search posts
      GET
    • Retrieve a post
      GET
    • Update a post
      PUT
    • Delete a post bookmark
      DELETE
    • Bookmark a post
      PUT
    • Retrieve post display data
      GET
    • Flag a post
      POST
    • Map a post
      PUT
    • Promise an offer post
      PUT
    • Reply to a post
      POST
    • Satisfy a post
      PUT
    • Share a post
      POST
    • Unpromise an offer post
      PUT
    • Withdraw a post
      PUT
  • stories
    • List stories
    • Submit a story
    • Retrieve a story
    • Like a story
    • Unlike a story
    • Record story viewed
  • users
    • Retrieve current user
    • Update current user
    • List current users' email alerts
    • Create an email alert
    • Delete an email alert
    • Change email address
    • Set users' email address as not bouncing
    • List current users' groups
    • Update location
    • List current users' group notices
    • List current users' post locations
    • Save a post location for the current user
    • List current users' posts
    • Search current users' posts
    • Set a profile image
    • List current users' profile images
    • Resend account verification email
    • Send password reset email
    • Report a user
    • Retrieve a user
    • Retrieve user display info
    • Submit feedback on a user
    • List posts by a user
    • Search posts by a user
    • Retrieve a users' profile image
  1. groups

Search groups

GET
/groups
groups
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://trashnothing.com/api/v1.2/groups'
Response Response Example
200 - Example 1
{
    "end_index": 0,
    "groups": [
        {
            "country": {
                "abbreviation": "CA",
                "name": "Canada"
            },
            "group_id": 46,
            "has_questions": true,
            "homepage": "https://trashnothing.com/OttawaReuse",
            "identifier": "OttawaReuse",
            "latitude": 45.423494,
            "longitude": -75.697933,
            "member_count": 4838,
            "membership": {
                "date": "2015-01-22T17:05:50",
                "questionnaire": {
                    "message": "This group is only for people who live in Ottawa.",
                    "questions": [
                        "Where do you live?"
                    ]
                },
                "status": "pending-questions"
            },
            "name": "Ottawa Reuse",
            "open_archives": false,
            "open_membership": false,
            "region": {
                "abbreviation": "ON",
                "name": "Ontario"
            },
            "timezone": "America/Toronto",
            "utc_offset": -5
        }
    ],
    "num_groups": 0,
    "num_pages": 0,
    "page": 0,
    "per_page": 0,
    "start_index": 0
}

Request

Query Params
name
string 
optional
Find groups that have the given text somewhere in their name (case insensitive).
latitude
number 
optional
Find groups near the given latitude and longitude.
longitude
number 
optional
Find groups near the given latitude and longitude.
distance
number 
optional

When latitude and longitude are passed, distance can optionally be passed to only return groups within a certain distance (in kilometers) from the point specified by the latitude and longitude. The distance must be > 0 and <= 150 and will default to 100.

country
string 
optional
Find groups in the given country where country is a 2 letter country code for the country (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ).
region
string 
optional
For countries with regions (AU, CA, GB, US), search groups in a specific region as specified by the region abbreviation. The supported regions and their abbreviations are listed below.

NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority.

---

AU
- QLD: Queensland
- SA: South Australia
- TAS: Tasmania
- VIC: Victoria
- WA: Western Australia
- NT: Northern Territory
- NSW: New South Wales - ACT

CA
- AB: Alberta
- BC: British Columbia
- MB: Manitoba
- NB: New Brunswick
- NL: Newfoundland and Labrador
- NS: Nova Scotia
- ON: Ontario
- QC: Quebec
- SK: Saskatchewan
- PE: Prince Edward Island

GB
- E: East
- EM: East Midlands
- LDN: London
- NE: North East
- NW: North West
- NI: Northern Ireland
- SC: Scotland
- SE: South East
- SW: South West
- WA: Wales
- WM: West Midlands
- YH: Yorkshire and the Humber

US
All 50 states and the District of Columbia are supported. For the abbreviations, see: https://github.com/jasonong/List-of-US-States/blob/master/states.csv
postal_code
string 
optional
Find groups in the given postal code. Only a few countries support postal code searches (US, CA, AU, GB). The country parameter must be passed when the postal_code parameter is set.

NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority.
page
integer 
optional
The page of groups to return.
per_page
integer 
optional

The number of groups to return per page (must be >= 1 and <= 100).

Responses

🟢200The groups and paging data.
application/json
Body
end_index
integer 
optional
The index of the last group being returned (an integer between start_index and num_groups).
groups
array[object (Group) {15}] 
optional
country
object 
optional
Provides information about the country that is associated with a group. May be null.
Example:
{"abbreviation":"US","name":"United States"}
group_id
string 
optional
has_questions
boolean 
optional
When true, anyone requesting membership to this group will be required to answer a new membership questionnaire.
homepage
string 
optional
A URL to the group homepage.
identifier
string 
optional
A unique identifier for the group that is used in URLs.
latitude
number 
optional
longitude
number 
optional
member_count
integer 
optional
The number of members who belong to the group.
membership
object 
optional
Provides information about the current users' active or pending membership to this group (if any). Will be null if there is no active or pending membership to this group.
name
string 
optional
The name of the group (not guaranteed to be unique).
open_archives
boolean 
optional
When true, the group posts are viewable by anyone. When false, the group posts can only be viewed by members of the group.
open_membership
boolean 
optional
When true, the group allows anyone to join. When false, the group moderators review and approve applicants.
region
object 
optional
Provides information about an area within a country that a group is associated with (eg. a state in the US or a province in Canada). May be null.
Example:
{"abbreviation":"CA","name":"California"}
timezone
string 
optional
The timezone that the group is in (eg. America/New_York).
utc_offset
number 
optional
The group offset (in hours) from UTC time. This does not take into account daylight savings time (DST) in places that observe DST so it may be incorrect during DST.
num_groups
integer 
optional
The total number of groups available.
num_pages
integer 
optional
The total number of pages available.
page
integer 
optional
The page number of the groups being returned.
per_page
integer 
optional
The number of groups being returned per page.
start_index
integer 
optional
The index of the first group being returned (an integer between 1 and num_groups).
🟠400Missing or invalid parameters.
Modified at 2022-09-11 18:59:47
Previous
Send feedback
Next
Retrieve multiple groups
Built with