Search

The Search API enables search across Active.com’s directory of assets.

Example API Call

curl -XGET http://a3pi.active.com/v2/search?query=running&category=event&start_date=2013-07-04..

Sample Response

{

    "results": [
        {
            "assetStatus": {
                "assetStatusId": "2",
                "assetStatusName": "VISIBLE",
                "createdDate": "2012-05-22T17:57:06",
                "modifiedDate": "2012-05-22T17:57:06"
            },
            "organization": {
                "organizationGuid": "766d08f9-5347-4907-9f2f-41792f33d2b2",
                "organizationName": " ",
                "organizationDsc": "",
                "organizationUrlAdr": "",
                "addressLine1Txt": "",
                "addressLine2Txt": "",
                "addressCityName": "",
                "addressStateProvinceCode": "",
                "addressLocalityName": "",
                "addressPostalCd": "",
                "addressCountryCd": "",
                "fax": "",
                "primaryContactEmailAdr": "",
                "primaryContactPhone": "",
                "primaryContactName": "",
                "showOrganizationName": "false",
                "hideOrganizationContact": "false"
            },
            "place": {
                "placeGuid": "8ff67277-b8f8-48fe-a66b-ac2998206795",
                "placeName": "Blue Pelican Marina",
                "placeDsc": "",
                "placeUrlAdr": "",
                "addressLine1Txt": "5000 Calienta Street",
                "addressLine2Txt": "",
                "cityName": "Hernando Beach",
                "stateProvinceCode": "FL",
                "localityName": "",
                "postalCode": "34607",
                "countryName": "United States",
                "countryCode": "",
                "timezone": "America/New_York",
                "timezoneOffset": -5,
                "timezoneDST": 1,
                "latitude": "28.50025",
                "longitude": "-82.649687",
                "directionsTxt": "",
                "showPlaceName": "false",
                "geoPoint": {
                    "lat": "28.50025",
                    "lon": "-82.649687"
                },
                "dma": {
                    "dmaId": "539",
                    "dmaName": "Tampa - Saint Petersburg (Sarasota)"
                }
            },
            "evergreenParentAsset": {},
            "sourceSystem": {
                "sourceSystemName": "RegCenter",
                "legacyGuid": "EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65",
                "affiliate": "true"
            },
            "assetRootAsset": {},
            "assetParentAsset": {},
            "market": {},
            "assetGuid": "28eb515d-e13b-415f-bfde-f6c8a3b8307b",
            "assetName": "Blue Pelican Marina Kayak & Canoe Poker Run",
            "assetDsc": "",
            "alternateName": "",
            "timezone": "",
            "timezoneAbb": "",
            "timezoneName": "",
            "currencyCd": "",
            "localeCd": "",
            "salesStartDate": "2013-04-21T12:07:50",
            "salesEndDate": "2013-05-02T23:59:59",
            "urlAdr": "http://www.active.com/outdoors/hernando-beach-fl/blue-pelican-marina-kayak-and-canoe-poker-run-2013",
            "detailPageTemplateId": "",
            "preferredUrlAdr": "",
            "logoUrlAdr": "http://www.active.com/images/events/hotrace.gif",
            "activityStartDate": "2013-05-04T10:00:00",
            "activityEndDate": "2013-05-04T10:00:00",
            "donationUrlAdr": "",
            "teamUrlAdr": "",
            "homePageUrlAdr": "",
            "registrationUrlAdr": "http://www.active.com/register/index.cfm?event_id=2095243",
            "registrantSearchUrlAdr": "",
            "regReqMinAge": "",
            "regReqMaxAge": "",
            "regReqGenderCd": "",
            "resultsUrlAdr": "",
            "isRecurring": "false",
            "contactName": "Gordon Wolf",
            "contactEmailAdr": "gordon@bluepelicanmarina.com",
            "contactPhone": "352-610-9999",
            "contactTxt": "",
            "showContact": "false",
            "sorId": "",
            "sorCreateDtm": null,
            "sorCreateUserId": "",
            "authorName": "",
            "publishDate": null,
            "createdDate": "2013-04-24T16:43:05",
            "modifiedDate": "2013-05-05T10:00:45",
            "activityRecurrences": [],
            "assetQuantity": {},
            "assetLegacyData": {
                "assetTypeId": "EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65",
                "typeName": "",
                "uploadSearchUrlAdr": "",
                "authorName": "",
                "onlineRegistration": "true",
                "onlineDonation": "false",
                "onlineMembership": "false",
                "onlineMembershipCostAmt": "",
                "costAmt": "",
                "avgUserRatingTxt": "",
                "estParticipantNb": "50",
                "maxTeamNb": "",
                "minGuaranteedGameNb": "",
                "multipleStartDate": "false",
                "genderRequirementTxt": "",
                "participationCriteriaTxt": "Adult",
                "userCommentTxt": "",
                "priceExtensionTxt": "",
                "searchWeight": "1",
                "seoUrl": "http://www.active.com/outdoors/hernando-beach-fl/blue-pelican-marina-kayak-and-canoe-poker-run-2013",
                "substitutionUrl": "2095243",
                "trackbackUrl": "http://www.active.com/page/Event_Details.htm?event_id=2095243&assetId=28EB515D-E13B-415F-BFDE-F6C8A3B8307B",
                "eventCategories": "",
                "isSearchable": "false",
                "createdDate": "2013-04-24T16:43:05",
                "modifiedDate": "2013-04-24T19:55:37"
            },
            "assetTags": [{
                "tag": {
                    "tagId": "232524",
                    "tagName": "false",
                    "tagDescription": "usatSanctioned"
                }
            }, {
                "tag": {
                    "tagId": "11995",
                    "tagName": "Outdoors\\Canoeing",
                    "tagDescription": "MISCELLANEOUS"
                }
            }, {
                "tag": {
                    "tagId": "88680",
                    "tagName": "Tampa - Saint Petersburg (Sarasota)",
                    "tagDescription": "market"
                }
            }, {
                "tag": {
                    "tagId": "32308",
                    "tagName": "true",
                    "tagDescription": "activeadvantage"
                }
            }, {
                "tag": {
                    "tagId": "58739",
                    "tagName": "Intermediate",
                    "tagDescription": "Skill level"
                }
            }],
            "assetAttributes": [{
                "attribute": {
                    "tagId": "58739",
                    "attributeValue": "Intermediate",
                    "attributeType": "Skill level"
                }
            }],
            "assetPrices": [],
            "assetDescriptions": [{
                "descriptionType": {
                    "descriptionTypeId": "35",
                    "descriptionTypeName": "eventFees"
                },
                "description": "29.00"
            }, {
                "descriptionType": {
                    "descriptionTypeId": "34",
                    "descriptionTypeName": "eventDonationLinks"
                },
                "description": "<eventDonationLinks/>"
            }, {
                "descriptionType": {
                    "descriptionTypeId": "6",
                    "descriptionTypeName": "Standard"
                },
                "description": "Entry Fee is only $29.00 which covers the T-shirt, prizes and BBQ. Use your own boat or, rental Canoes and Kayaks are available from $19.00 1st Prize is a $100.00 BPM Gift Certificate 2nd Prize (worst poker hand) $75.00 BPM Gift Certificate 3rd Prize $50.00 Gift Certificate Additional prizes and drawings for participants!"
            }, {
                "descriptionType": {
                    "descriptionTypeId": "4",
                    "descriptionTypeName": "summary"
                },
                "description": "Join the fun as we paddle the wetlands of Hernando Beach. Collect playing cards on the way. Best and worst poker hands win prizes. BBQ and prizes afterward at the Blue Pelican Marina. Get some exercise and meet some new friends!"
            }],
            "assetChannels": [{
                "sequence": "1",
                "channel": {
                    "channelId": "1212",
                    "channelName": "Outdoors\\Kayaking",
                    "channelDsc": ""
                }
            }],
            "assetMediaTypes": [{
                "sequence": "1",
                "mediaType": {
                    "mediaTypeId": "2",
                    "mediaTypeName": "Event",
                    "mediaTypeDsc": ""
                }
            }, {
                "sequence": "2",
                "mediaType": {
                    "mediaTypeId": "224",
                    "mediaTypeName": "=difficulty:Intermediate",
                    "mediaTypeDsc": ""
                }
            }],
            "assetImages": [{
                "imageUrlAdr": "http://www.active.com/images/events/hotrace.gif",
                "imageName": "image1",
                "linkUrl": "",
                "linkTarget": "",
                "imageCaptionTxt": ""
            }],
            "assetTopics": [],
            "assetCategories": [{
                "sequence": "1",
                "category": {
                    "categoryId": "2",
                    "categoryTaxonomy": "Event",
                    "categoryName": "Event"
                }
            }],
            "assetMetaInterests": [],
            "assetInterests": [],
            "assetDeals": [],
            "assetComponents": [{
                "assetGuid": "b0731c9d-3185-4751-b41c-2308575f922b",
                "assetName": "Kayaks and Canoes",
                "activityStartDate": "2013-05-04T10:00:00",
                "activityEndDate": "2013-05-04T10:00:00",
                "assetSeoUrls": []
            }],
            "assetServiceHostName": "as-app01.active.tan",
            "componentInUrlAdr": {},
            "assetSeoUrls": [{
                "seoSystemName": "as3",
                "statusCode": "true",
                "urlAdr": "http://www.active.com/hernando-beach-fl/blue-pelican-marina-kayak-and-canoe-poker-run-2013"
            }],
            "overrideSeourlFlag": "false",
            "activenetTopGraphic": {},
            "evergreenAssetFlag": "false",
            "evergreenAssets": []
        }
    ],
    "facets": [
        {
            "name": "topicName",
            "terms": [
                {
                    "term": "Running",
                    "count": 188
                },
                {
                    "term": "Walking",
                    "count": 51
                },
                {
                    "term": "Distance running",
                    "count": 14
                },
                {
                    "term": "Triathlon",
                    "count": 10
                }
            ]
        }
    ],
    "facet_values": [
        {
            "name": "topicName",
            "value": "Running",
            "count": 188
        },
        {
            "name": "topicName",
            "value": "Walking",
            "count": 51
        }
    ],
    "items_per_page": 5,
    "start_index": 0,
    "total_results": 211

}

Parameters

near
Optional string - A string naming a place that can be geocoded. If the near string is not geocodable, returns a failed geocoded error.
lat_lon
Optional string - A location specified as a latitude and longitude separated by a comma.

lat_lon=43.2,-118

bbox
Optional string - A bounding box specified by the lat/lng of the northwest and southeast corners separated by a url encoded semi-colon.

bbox=40.73,-74.1%3B40.717,-73.99

geo_points
Optional string - A list of lat/lng pairs separated by a url encoded semi-colon. This limits the result list to assets that fall within the polygon of points.

geo_points=40,-70%3B30,-80%3B20,-90

radius
Optional integer - The search radius as specified in miles. If present, the results will be constrained to assets geolocated within that radius from the centerpoint specified by either the lat_lon or near parameter.
radius_range
Optional string - The search radius range as specified in miles. If present, the results will be constrained to assets geolocated within the specified range from the centerpoint specified by either the lat_lon or near parameter. The format of the parameter values is the to and from values separated by a two dots.

radius_range=50..100

show_distance
Optional string - If set to true, returns the distance from the asset to the given centerpoint specified by either the lat_lon or near parameter. You must provide either the lat_lon parameter or a valid location in the near parameter. The values will be in the asset.distanceFromCenterpoint in the JSON document.
city
Optional string - Matches assets by city name.
state
Optional string - Matches assets by state or province code.
zip
Optional string - Matches assets by zip or postal code.
country
Optional string - Matches assets by country name.
query
Optional string - Search term
current_page
Optional integer - The current page of results. Defaults to 1.
per_page
Optional integer - The number of results to return. Defaults to 25.
sort
Optional string - The sort order of the results. The possible values are date_asc, date_desc, and distance. If sort is not specified, results are sort by relevance to the query param. Distance can only be used when either the near or lat_lon parameters are specified and sorts the results according to distance from the specified location smallest to largest.
facets
Optional string - A comma delimited string containing the facet counts to return.
facet_values
Optional string - Returns facet counts for the specified field values. The value of the param is the field name followed by a comma delimited list of values. The field name and values are separated by a colon.

facet_values=topicName:running,cycling,swimming

category
Optional string - Matches assets by category name in the category taxonomy. For example, if you search for ‘event’ category, you will get assets that are tagged ‘event’, ‘event/races’, ‘event/camps’, etc.
category_name
Optional string - Matches assets by category name. For example, if you search for ‘event’ category, you will get assets that are only tagged as ‘event’. Assets tagged as ‘event/races’, ‘event/camps’, etc. will not be returned. See category parameter if you need all subcategories returned.
topic
Optional string - Matches assets by topic name in the topic taxonomy. For example, if you search for ‘endurance’ topic, you will get assets that are tagged ‘endurance’, ‘endurance/running’, ‘endurance/cycling’, etc.
topic_name
Optional string - Matches assets by topic name. For example, if you search for ‘endurance’ topic, you will get assets that are only tagged as ‘endurance’. Assets tagged as ‘endurance/running’, ‘endurance/cycling’, etc. will not be returned. See topic parameter if you need all subtopics returned.
meta_interest
Optional string - Matches assets by meta interest in the meta interest taxonomy. For example, if you search for ‘MOB’, you will get assets that are tagged ‘MOB’, ‘MOB/Color Run’, ‘MOB/Mud’, etc.
meta_interest_name
Optional string - Matches asset by meta interest name. For example, if you search for ‘MOB’, you will get assets that are only tagged as ‘MOB’. Assets tagged as ‘MOB/Color Run’, ‘MOB/Mud’, etc. will not be returned. See metaInterest parameter if you need all sub meta interests returned.
attributes
Optional string - Matches assets by attribute type and value. The value of the parameter is the attributeType and attributeValue separated by a colon. You can use NOT, AND, and OR in the value. See those respective sections below.

attributes=gender:male attributes=gender:male AND age group:junior

tags
Optional string - Matches assets by tag name and description. The value of the parameter is the tagDescription and tagName separated by a colon. You can use NOT, AND, and OR in the value. See those respective sections below.

tags=activeadvantage:true tags=activeadvantage:true OR usatsanctioned:false

start_date
Optional string - Limits results to assets with a start date in the given range. See section on Ranges below for value format.
end_date
Optional string - Limits results to assets with an end date in the given range. See section on Ranges below for value format.
event_date
Optional string - Limits results to assets with start date and end date in the given range. See section on Ranges below for value format.
age
Optional string - Limits results to assets with a minimum and maximum required registration age. The search that’s performed in inclusive of the ages. So if you search for ?age=5..8 it will find events who maximum age is less than or equal to 5 and minimum age is greater than or equal to 8. So an event that allows 6 to 10 year olds would be included in results, but an event for 3 to 4 year olds would not.
day_of_week
Optional string - Limits results to assets that occur on certain days of the week. Days are zero-indexed: 0=Sunday, 1=Monday, etc. Multiple days need to be separated by commas. To find events that occur on the weekends (in the timezone of the event), use ?day_of_week=0,6.
boost
Optional string - Boosts search results that meet certain criteria. Currently supports ‘age’, ‘topic’, ‘event_distance’, ‘publish_date’ and ‘ranking’ boosts. Boosts are seperated by commas. Multiple values for the same boost are separated by pipes. Also takes an optional ‘boost_amount’ which specifies how much to multiply the result’s score by (defaults to 2.0). ‘event_distance’, ‘publish_date’ and ‘ranking’ boosts donnot support boost_amount and event_distance must be with centerpoint option, saying, boost=event_distance:near|New York it boosts the events near New York city. Example: ?boost=age:4,topic:swimming|running,boost_amount:1.5 This will boost search results that have a regReqMinAge >= 4 and regReqMaxAge <= 4 by 1.5x, boost results with a topic of swimming or topic of running by 1.5x, and results that meet both age and topic requirements by 2.25x (1.5 * 1.5).
cb
Optional string - JSONP callback parameter.
exclude_children
Optional boolean - Removes children assets from the results list. Valid values are true or false. If the parameter is not present, all assets will be returned in the results list.
include_evergreen_children
Optional boolean - Includes children of evergreen assets in the results list. Valid values are true or false. If the parameter is not present, evergreen children will be filtered out of search results.
registerable_only
Optional boolean - Filters results to assets that offer Active.com online registration and the registration close date is at least one day in the future. This flag will only apply if the value is true. If the parameter is not present, all assets will be returned in the results list.
exists
Optional string - Filters results to assets that have a value for the specified field(s). The value of the param is a comma-delimited of fields.
not_exists
Optional string - Filters results to assets that do not have a value for the specified field(s). The value of the param is a comma-delimited of fields.
id
Optional string - Searches for an asset by its id. The asset id is found in asset.assetGuid in the JSON returned.
asset_name
Optional string - Searches for an asset by its name. The asset name is found in asset.assetName in the JSON document. This must be an exact match.
org_id
Optional string - Limits results to assets that have the given organization id. The organization id is found in the asset.organization.organizationGuid in the JSON returned.
place_id
Optional string - Limits results to assets that have the given place id. The place id is found in the asset.place.placeGuid in the JSON returned.
source_system_id
Optional string - Limits results to assets that have the given source system id. The source system id is found in the asset.sourceSystem.legacyGuid in the JSON returned.
source_system_name
Optional string - Limits results to assets that have the given source system name. The source system name is found in the asset.sourceSystem.sourceSystemName in the JSON returned.
fields
Optional string - A comma separated list of fields to return instead of the whole asset document.
include_virtual_events
Optional boolean - Include virtual events in the results list. Valid values are true or false. If the parameter is not present or the value set to false, the virtual events will not be returned in the results list.

Other attributes

Besides the parameters listed above, you can use any of the asset attributes as parameters to filter your results. For the key, pass the complete path to the attribute e.g. asset.place.cityName. For the value, you can pass a term with some boolean logic (see NOT, AND, and OR below) or a range value (see Ranges below).

asset.authorName=John Doe

asset.reqMinAge=10..20

asset.place.cityName=San Diego OR Los Angeles OR Oceanside

asset.assetTopics.topic.topicName=NOT Running

Ranges

For fields that have either integer or date values, you can search for a given range.

Limits the results to the given date range specified in the following format: start_date..end_date To search from a particular date forward, leave off the end date. To search until a particular date, leave off the start date. Date format should be in yyyy-mm-dd format.

start_date=2011-01-15..    # search from January 15, 2011 forward

start_date=..2011-01-15    # search up to January 15, 2011

start_date=2011-01-15..2011-01-20    # search from January 15, 2011 until January 20, 2011

regReqMinAge=10..20        # search for the required minimum age between 10 and 20

regReqMinAge=10..          # search for assets with required minimum age 10 or greater

regReqMinAge=..10          # search for assets with required minimum age up to 10

NOT

To negate the value of the parameter, precede it with NOT (all uppercase).

topicName=NOT running     # return results that do not have the topic name of Running

AND

To return results that have multiple values, put AND (all uppercase) between the terms.

topicName=running AND triathlon AND cycling     # return results that have running, triathlon, and cycling as a topic name

OR

To return results that have any value, put an OR (all uppercase) between the terms.

topicName=running OR triathlon OR cycling       # return results that have either running, triathlon, and cycling as a topic name