The Displaying Content APIs have data types which include standard primitives, basic types, and custom objects. Some API inputs are optional, while others are required.
The following are the primitive types supported in the APIs:
- Integer - a signed 32-bit integer, represented directly as a number in JSON payloads. In the documentation below, this type is represented as int
- Float - a signed 32-bit integer, represented directly as a number in JSON payloads. In the documentation below, this is represented as float
- String - a double-quote delineated string. In the documentation below, this is represented as string
The following are basic scalar types specific to the Displaying Content APIs:
- id - a string representing unique identifier for either a city/state with trending post data or an agency
- lat - a float representing the latitude coordinate
- lon - a float representing the longitude coordinate
- radius - a float representing the radius. This parameter will be used along with
lat
andlon
to construct a centroid for where to search for posts. - current_page - an integer representing the page number when searching for posts
The following are custom objects returned from the Displaying Content APIs:
Posts - a neighbor or agency post
'author': {
'name': The name of the post Author
'type': The type of the post Author
'neighborhood_name': The name of neighborhood of the post author [Not available for agency post]
'neighborhood_url': The url to the Nextdoor neighborhood overview page [Not available for agency post]
'city_url': The url to the Nextdoor city overview page [Not available for agency post]
'agency_info': NULL if not from Public Agency else see below
}
'body': Post body
*'category'*: Post category (see below for more details)
'comments': [
{
"body": Comment body
"comments": [] - List of nested comments
"creation_date": Comment creation time
"id": Comment id
"like_count": Number of likes on comment
"parent_comment_id": Partent comment id
"author_name": Author name in initial format
"author_type": Type of the comment author
"downvote_count": Number of downvotes on comment
"media": Urls of any media (photos + videos) attached on comment
*"reaction_types"*: Summary of reactions (see below)
"reply_count": Number of replies on comment
"report_count": Number of reports on comment
},
],
'comment_closed': Indicates whether the commenting is closed on post
'comment_count': Number of direct comments attached to post
'creation_date_epoch_seconds': Post creation time
'downvote_count': Number of downvotes on post
'embed_url': Embed URL of post
'has_geo_tag': Indicates whether the post contains a geotag
'id': Post id
'latitude': The latitude of the neighborhood of post (optional)
'like_count': Number of likes on post
'longitude': The longitude of the neighborhood of post (might not exist for all post)
'url': Link to this post
'media': URLs of any media (photos + videos) attaches on post
'media_focal_area': A list of dictionaries measuring the generated focal area of the image(s)
[{
"left": 0.47281,
"top": 0.465,
"right": 0.59157,
"bottom": 0.55417
}],
*'reaction_types'*: Summary of reactions (see below)
'report_count': Number of reports on post
'scope': Text describing post audience. Ex: "Posted on 17 Feb to subscribers of Adjustment Bureau in 5 areas"
'score': Ranking score of post
'title': Title of post
'user_entered_subject': Indicates whether user manually entered a subjet or it was generated
'video_preview_url': Link to a preview for the video in post
'last_interacted_at': Last interaction time (post creation, edit, comment, reaction)
features: see below for details
We automatically classify our posts into different categories. Possible results from category include
classifieds
crime_and_safety
free_items
documents
lost_and_found
recommendations
general
We offer a variety of reactions for users to interact with on posts. Possible reactions in reaction_types include
thank_tulipupset
metoo
concerned
spooky
angry
like2
thank
sad
funny
canada_flag
shock
plusone2
like
plusone
quebec_flag
important
love
agree
agency_info only exists when the post comes from a public agency, it is null otherwise.
'agency_info': {
'address': The address of the Agency
'author_photo': The url to the photo of the Author
'city': The city of the Agency
'external_url': The external url of the Agency
'id': The internal id of the Agency
'name': The name of the Agency
'phone': The phone of the Agency
'photo': The photo url of the Agency
'post_to_areas': [
{
'centroid': [longitude, latitude]
'area_sqft': The area size in sq_ft
}
]
'state': The state of the Agency
*'type'*: The type of the Agency
'url': The url of the Agency page at Nextdoor
}
Possible results from agency_info.type include
Law Enforcement
Fire/EMS
Communications/911
Emergency Management
City/County/State Administration
Transportation
Utilities (Public)
Utilities (Private)
Elected/Political
Education
Other City/County/State Agency
Other (not listed)
Public Health
Energy Utility
Water Utility
Telecommunications Provider
Waste Management Provider
Special District
Nonprofit
Real Estate Developer
FSF Listings - a listing from For Sale & For Free, our local marketplace
{
"id": The id of the classified
"url": The url of the classified
"city": The city of the classified listing
"lat": Latitude
"lon": Longitude
"title": Title of the classified
"description": Description of the classified
"price": Price of the classified (it is in the currency of the "currency" parameter)
"expiration_date": Expiration date of the classified
"currency": Currency of the classified
"available": Indicates whether the clasified is still for sale or not
"photos": List of photos of the classified
}
Events - a event
{
'available': Boolean
'cover_photo': Link to cover photo of the event
'description': Description of the event
'start_time': Start time of the event
'end_time': End time of the event
'id': ID
'lat': Latitude
'lon': Longitude
'title': Title
'url': the url of event
}
Businesses - a business
{
'about_us': Optional String that describes the business
'business_address_full': String that has the address to a business
'claimed': Boolean that indicates if it has been claimed by the owner
'fave_count': Integer that indicates how many times this business has been 'faved' by a neighbor
'has_been_awarded': Boolean that indicates if this business has been awarded before (Neighborhood Faves)
'id': Integer ID
'lat': Float Latitude
'lon': Float Longitude
'location_status': String of either 'OPEN' | 'PERMANENTLY_CLOSED' | 'TEMPORARILY_CLOSED'
'name': String the name of business
'phone_number': String the phone number of business
'url': String the url of business
'recommendation': List of Recommendation
}
Recommendation:
{
"comment": String that the comment recommends the business
"reply_to": Optional String the post body that this comment replies to
"modification_ts_ms": Omteger epoch time
}
Possible results from currency include
- USD
- CAD
- AUD
- EUR
- GBP
- DKK
- NOK
- SEK
Content features
p_violation_tos: float
p_remove: float
time_sensitivity: int
p_topic_pets: float
p_topic_weather: float
p_topic_traffic: float
p_topic_utilities: float
p_intent_crime_safety: float
p_intent_find_service: float
p_intent_lost_found: float
p_intent_events: float
p_intent_exchange: float
p_intent_adopt_pet: float
p_intent_safety_alerts: float
p_intent_report_lost: float
p_intent_report_found: float