Extend your community

The Meetup API provides simple RESTful HTTP and streaming interfaces for extending your community using the Meetup platform from your own apps.

Community

Composing a request

The API is a set of core methods and a common request format. These are combined to form a URL that returns the information you want. Here's an example of an API call that lists moms groups near Williamsburg, Brooklyn.

http://api.meetup.com1/2/groups2.json3/?zip=11211&topic=moms4&order=members5&key=ABDE12456AB23244456
  1. api.meetup.com -- the API host, in this case for the REST API, for the stream API use stream.meetup.com
  2. /2/groups -- the method you're calling, represented as a path
  3. json -- the format of the response. Each method has a list of supported formats
  4. args -- zip & topic limit the results by geography and area of interest
  5. order -- how to order the results, in this case by # of members. To reverse the sorting order, you include the parameter "desc=desc" or "desc=true".
  6. key -- your unique API key, if using key authentication

In addition, you can specify these parameters for more control:

  1. page -- the page size (maximum number of results in each response) to use on the results
  2. offset -- the starting page for results to return. For example, when page = 10, specifying "offset=0" will bring back records 1-10, "offset=1" will bring records 11-20, etc.
  3. desc -- reverses the sorting order, when you include the parameter "desc=desc" or "desc=true".

Most requests must be authenticated. If no format is specified it defaults to json. Details on the formats, parameters and ordering accepted by each method are listed below.

In addition, requests about a specific group can identify the group with either a group_id, or a topic and groupnum. The group_id can be retrieved from the id field from requests to the "Groups" method (detailed below), and the topic and groupnum can be found in the URL for the meetup group - for example, the group with the URL at http://volunteerism.meetup.com/167/ can be accessed with the parameters topic=volunteerism&groupnum=167.

Cross Origin Resource Sharing

The Meetup API supports the CORS specification which allows browser clients hosted on a domain other than api.meetup.com to communicate directly with the API.

The API uses OAuth consumer redirect uris to validate a request's origin, so you must be using OAuth to benefit from CORS. The suggested OAuth authorization scheme is the OAuth2 Implicit flow, which is tailored for browsers. Once a browser client receives authorization and issues an HTTP request, the Meetup API will validate the request's Origin header with the consumers registered redirect URI in addition to the HTTP method used for the given API endpoint.

You can inspect which HTTP methods an API method supports issuing an OPTIONS request for the given method uri and origin. An example of the response headers is below.

curl -i \
  -X OPTIONS \
  -H 'Origin: http://consumerhost.com' \
  'https://api.meetup.com/2/member/self?access_token=TOKEN'
HTTP/1.1 200 OK
Access-Control-Expose-Headers: X-Meetup-server, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimt-Reset
Access-Control-Allow-Origin: http://consumerhost.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Max-Age: 86400
         

The CORS specification is relatively new, but many browsers have already adopted it. You can find the current browser support here here.

Response Formats

Each API method has multiple ways you can request the data be returned as. All methods support json, and this is the default format used when you don't explicitly supply one. The other formats are supported when it makes sense for the type of data being requested.

  • JSON JavaScript Object Notation. Learn more here.
  • XML A simple XML format with the exact same fields as the JSON response.
  • KML Keyhole markup language. Learn more here.
  • RSS RSS 2.0. Learn more here.
  • ATOM Learn more here.

Character Encodings

The default character encoding for all API methods is UTF-8. To activate alternative encodings like ISO-8859-1, issue your request with the Accept-Charset header set to ISO-8859-1.

curl -H "Accept-Charset: ISO-8859-1" \
  "http://api.meetup.com/2/open_events?topic=dogs&key=ABDE12456AB2324445"

The above command shows how to add the header to a request made with curl. If not Accept-Charset is provided, the default encoding of UTF-8 will be used.

Callbacks

If you request json, and want to play with the API in a web browser -- callbacks are useful. Specifying a callback will allow you to populate sample data using a <script/> tag by returning javascript that calls the function you provide as a query parameter.

http://api.meetup.com/topics.json?callback=gotIt&page=1&key=ABDE12456AB2324445
gotIt({"results":[...], "meta": {...}})

Responses

The context of a successful response to a query depends on the format it was requested in, though there are some broad similarities between the JSON and XML formats. Here's two samples:

  • JSON

    curl 'http://api.meetup.com/topics.json/?key=ABDE12456AB2324445&page=1'
    {
      "results":[
        {
          "id":"4422",
            "updated":"Mon Jun 26 15:01:05 GMT 2006",
              "description":"Meet fellow Social Networkers near you! Come to a local Social Networking Meetup to make valuable social connections and cultivate relationships with other elbow-rubbers in your area.",
             "name":"Social Networking",
             "link":"http:\/\/socialnetwork.meetup.com\/",
             "urlkey":"socialnetwork",
             "members":"245701"
          }
       ],
       "meta":{
          "id":"",
          "title":"Meetup Topics",
          "count":1,
          "updated":"",
          "description":"API for accessing meetup topics",
          "next":"",
          "link":"http:\/\/api.meetup.com\/topics\/",
          "method":"Topics",
          "total_count":3063,
          "url":"http:\/\/api.meetup.com\/topics\/\/?order=members&key=1&page=1&format=json&desc=0&offset=0",
          "prev":""
       }
    }
    
  • XML

    curl 'http://api.meetup.com/topics.xml?key=ABDE12456AB2324445&page=1'
    <?xml version='1.0' encoding='UTF-8'?>
    <results>
      <head>
        <url>http://api.meetup.com/topics/?order=members&amp;key=1&amp;page=1&amp;format=xml&amp;desc=0&amp;offset=0</url>
        <link>http://api.meetup.com/topics/</link>
        <total_count>3063</total_count>
        <description>API for accessing meetup topics</description>
        <title>Meetup Topics</title>
        <count>1</count>
        <next/>
        <method>Topics</method>
        <id/>
        <updated/>
      </head>
      <items>
        <item>
          <updated>Mon Jun 26 15:01:05 GMT 2006</updated>
          <members>245701</members>
          <name>Social Networking</name>
          <link>http://socialnetwork.meetup.com/</link>
          <description>Meet fellow Social Networkers near you! Come to a local Social Networking Meetup to make valuable social connections and cultivate relationships with other elbow-rubbers in your area.</description>
          <urlkey>socialnetwork</urlkey>
          <id>4422</id>
        </item>
      </items>
    </results>
    
  • Version 3 JSON

    As newer methods are introduced as part of the v3 API, response bodies will be simplified into what would normally be returned in the results response property of previous API versions. Relevant request metadata, previously embedded in the meta response body field, will now be encoded has HTTP headers with the response. The prev and next meta fields will now be encoded in a Link header. Link types will be annotated with a "rel" attribute.

    $ curl -i 'http://api.meetup.com/dashing-whippets/boards?key=API_KEY'
    HTTP/1.1 200 OK
    Date: Wed, 10 Oct 2012 20:34:40 GMT
    Server: Apache-Coyote/1.1
    X-Meetup-server: servername
    X-RateLimit-Limit: 200
    X-RateLimit-Remaining: 199
    X-RateLimit-Reset: 1349902800610
    X-OAuth-Scopes: basic
    X-Accepted-OAuth-Scopes: basic
    Link: <http://api.meetup.com/dashing-whippets/boards?key=API_KEY&offset=1>; rel="next"
    Content-Type: application/json;charset=utf-8
    Content-Length: 270
    Vary: Accept-Encoding,User-Agent
    Connection: close
    [{...}]
    

  • Version 3 JSONP

    Clients that wish to access the API using JSONP will not be able to access the headers mentioned above. When supplying a JSONP callback, these headers will be encoded with the body of the response in the following format.

    $ curl 'http://api.meetup.com/dashing-whippets/boards/?key=API_KEY&callback=foo'
    foo({
      "meta": {
        "status": 200,
        "X-Meetup-server": "servername",
        "X-RateLimit-Limit":"limitvalue",
        "next_link":"http://api.meetup.com/dashing-whippets/boards?callback=foo&key=API_KEY&offset=1",
        // other headers
      },
      "data": // contents of the normal response
    )
    Note that the links from the Link header will be render with JSON keys in the form "{rel}_link".

Result Fields and Filters

The results entity contains a list of the items that match the query criteria. Result fields are named values in these items, including simple values like strings and numbers, as well as entities that have values nested inside.

Optional Fields

Many API methods support optional result fields, as indicated in their documentation. One or more optional fields may be requested with the fields parameter, with names separated by commas. Since optional fields generally increase the processing time for a request, they should be requested only when needed.

curl 'http://api.meetup.com/2/open_venues?key=yourapikey&zip=10021&fields=taglist'

Filtering Result Fields

Result filters reduce the size of API responses. You can suppress result fields by specifying only and/or omit parameters. With only you will retrieve only those fields specified, and with omit you will retrieve all default fields excluding those specified.

The values of the only and omit parameters must be a comma-delimited list of fully qualified fields. You can specify nested sub-fields using periods. Both filters may be provided in the same request. See the examples below.

Examples

Search topics for "tech", but only include each topic's id and name (try in API Console):

http://api.meetup.com/topics?key=apikey&search=tech&only=id,name

Query for an event's hosting group information, returning only the group's id and topics, but don't return the urlkey nested in each topic:

http://api.meetup.com/2/events?key=apikey&event_id=someid&only=group.id,group.topics&omit=group.topics.urlkey

Note that this feature is only available for json and xml formats.

Self alias

Many of the query methods in the API require a member_id field for filtering. Sometimes you may want that member_id to be the id of the member owning the API key or who authorized an oauth token. To remove the need for an extra query to access that member_id, you may instead use the self alias in place of the member_id you would have to otherwise query for.

The following is an example of querying the /2/events method for your upcoming Meetup events.

curl 'http://api.meetup.com/2/events/?key=yourapikey&member_id=self'
Try it yourself.

Version 2 event identifiers

One notable change in the version 2 API methods is the consistency of event identifiers. In particular, recurring event identifiers. If you post an rsvp for a recurring event using its string identifier in the version 1 API, all future calls relating to that event, will return an the integer version of its identifier. In the version 2 API methods, any reference to a recurring event should retain the string version of its identifier. If you post an rsvp for a recurring event in the version 2 API, you should expect the string identifier to remain intact.

Metadata

This entity, meta in JSON and head in XML, supplies information about the response. For query methods, it can be expanded with Geo IP information by specifying a value of geo_ip in the fields parameter.

  • count is the number of records returned
  • total count is the total number of records that match your criteria
  • updated is the last time one of the items in the request
  • title, description some descriptive information about the request
  • next if the total count is more than the count, this URL will request the next set of records
  • url the URL used to generate this request
  • method the API method called
  • geo_ip approximate location of the requesting client, if geo_ip is specified in the fields parameter
    • lat
    • lon

RSS, ATOM and KML topics don't return the meta information provided by the XML & JSON formats.

Meta Headers

You can optionally supply request headers which give the API more context for the request.

You can supply the HTTP header X-Meta-Visit with a value of a valid Meetup group ID or X-Meta-Visit-Event with a value of a valid Meetup event ID. This will notify the API that your application has a context for a user visiting a group. Some API methods that perform an action that creates data like making and RSVP, posting an event comment and checking in do this implicitly. You can provide this request header to provide the same context when querying for data. Organizers on the site often check their member lists sorted by the last time a member visited their group. Using this header will allow this list to be more accurate.

The X-Meta-Request-Headers header can specify a comma-delimited list of API-specific X-Meetup response header names to include in the response. Currently the only supported header names are unread-notifications and joins-remaining. You request these individually or both as a comma-delimited list.

X-Meta-Request-Headers: unread-notifications,joins-remaining
You should receive a response header named X-Meetup-Unread-Notifications whose value is the authenticated member's unread notification count and X-Meetup-Joins-Remaining whose value is the remaining number of groups the authorized member may join for the current day.

The X-Meta-Photo-Host header can specify a value of secure to have all photo links returned be hosted on a secure domain.

Errors

When everything goes well, we'll send a 200 response code along with your data. If there was a problem, you will receive a response with error details formatted in either XML or JSON, depending on which format was requested. Except for JSON callbacks as noted below, error responses will have one of the following HTTP status codes:

  • 401 Unauthorized when you don't provide a valid key
  • 400 Bad request when there was a problem with the request
  • 500 Internal Server Error if we messed up -- please let us know!

The 400 BadRequest response is something of a catch-all: sent if you have incorrect or missing parameters, if you exceed your API limits or you request an unsupported format. The response body will have more detail.

JSON requests that specify a callback parameter are treated differently: the API always responds with an HTTP status of 200, so that a client browser will load the response and handle the callback. When an error occurs its corresponding status line is served in a "status" field of the error response object rather than in the response header.

Limits and Throttling

The Meetup API aims to provide consistent responsiveness and equal quality of service for all its consumers. In order to do so, we limit the frequency at which the API will produce successful responses to a single client.

Clients that issue many requests in a short period of time will receive a HTTP 429 error and an error message.

In the version 1 and 2 API methods you will receive a message in this form:

{
  "details": "Credentials have been throttled",
  "problem": "Client throttled",
  "code": "throttled"
}
In the version 3 API methods you will receive a message in this form:
{
  "errors":[{
    "code": "throttled",
    "message": "Credentials have been throttled"
  }]
}
These responses indicate that you are making requests too quickly. If you receive one of these errors, you should adjust the frequency of your requests by adding a pause between them.

If you continue to issues requests at a frequency that triggers throttling responses, your credentials will be blocked for the remainder of the hour. You will know that your client is blocked when you receive a response with the error code "blocked".

In the version 1 and 2 API methods you will receive a message in this form:

{
  "details": "Credentials have be throttled more than the allowed times in one hour",
  "problem": "Client throttled",
  "code": "blocked"
}
In the version 3 API methods you will receive a message in this form:
{
  "errors":[{
    "code": "blocked",
    "message": "Credentials have been throttled more than the allowed times in one hour"
  }]
}

Rather than issuing API requests until you are throttled and blocked, you will receive many more successful responses over time by tuning your client's request frequency such that it is not throttled at all.

The type of authentication used determines how requests are tallied. With OAuth-signed requests, it's the user that authorized the access token. For requests signed by or containing an API Key, the count is distinct to the key owner and the requesting IP address. These methods are designed to scale the rate up with an application's distributed userbase.

Meetup Everywhere

Meetup Everywhere is built to be simple to use and to share. That means it's not only easier for people everywhere to have Meetups, but it allows us to provide a complete API that is easy for developers, too.

The foundations of this platform are the same as the rest of the API, including response formats and authentication. You can supply an API key, OAuth, or key-signed request for authentication as described in the auth documentation. Much of the interaction, parameter names, response fields, and so on will be familiar to experienced Meetup platform developers, while other parts of the API are a fresh take. Give it a whirl, and as always, don't be shy about voicing your questions and suggestions on the Meetup Developers forum.

User Defined Fields

To make it easy to develop Meetup Everywhere applications that have little or no local storage, the API supports user defined fields for Containers, Communities, Events, RSVPs and Comments. These field names begin with "udf_" followed by a name you choose, and may be assigned any string value.

User defined fields are assigned and queried just as other fields in the API. Include a parameter beginning with "udf_" in a create or edit POST method to assign it as a field. Field names may be up to 35 characters including the "udf_" prefix. For query methods, specify a UDF parameter with a value to limit the results to those that contain that field with a matching value. The match is case-insensitive and no wildcards are supported.

In result items, these fields are returned only when specified in the fields parameter of the request. Specify "all_udf" to retrieve any fields associated with the entity.

API methods

everywhere seed events