Subscribe to Our Newsletter

x

Public API v1.2 - Roar/Runner

This in the current version of the API
RebelMouse Public API version 1.2 is available as of August 16th, 2016. The older version of the API (Public API version 1.1) will be deprecated on December 1st, 2016. Please make sure to switch over any and all calls to the new API by that time.

READ REQUESTS :

FRONTPAGE POSTS

Returns frontpage posts.

https://{roar_domain}/api/1.2/posts/frontpage?limit={limit}&offset={offset}

<strong>Argument    Required    Default    Description                  Example</strong>limit       no          10         number of posts to return    1offset      no          0          number of posts to skip      10

POSTS BY SECTION

Returns section's posts.

https://{roar_domain}/api/1.2/posts/section?section_name={section}&limit={limit}&offset={offset}

<strong>Argument        Required    Default    Description                  Example</strong>limit           no          10         number of posts to return    1offset          no          0          number of posts to skip      10section_name    yes         -          section's url                apps

POSTS BY AUTHOR

Returns author's posts.

https://{roar_domain}/api/1.2/posts/author?author_name={author_name}&limit={limit}&offset={offset}

<strong>Argument       Required    Default    Description                  Example</strong>limit          no          10         number of posts to return    1offset         no          0          number of posts to skip      10author_name    yes         -          author's name                luladog

POSTS BY TAG

Returns posts by tag.

https://{roar_domain}/api/1.2/posts/tag?tag={tag}&exclude_tags={exclude_tags}&limit={limit}&offset={offset}

<strong>Argument        Required    Default    Description                               Example</strong>limit           no          10         number of posts to return                 1offset          no          0          number of posts to skip                   10roar_domain     yes         -          roar domain                               positivemousetag             yes         -          tag                                       pythonexclude_tags    no          -          tags to exclude (comma separated list)    mouse

POSTS' DETAILS

Returns posts' details.

https://{roar_domain}/api/1.2/posts?ids={ids}

<strong>Argument    Required    Default    Description     Example</strong>ids         yes         -          ids of posts    1,2,3

SITES' DETAILS

Return sites' details.

https://{roar_domain}/api/1.2/site/details?site_id={site_id}

<strong>Argument    Required    Default    Description    Example</strong>site_id     yes         -          site's id      1

AUTHORS' DETAILS

Return authors' details.

https://{roar_domain}/api/1.2/authors?ids={ids}&access_token={access_token}

<strong>Argument        Required    Default    Description     Example</strong>ids             yes         -          authors' ids    19access_token    yes         -          access token    bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

AUTHORS' DETAILS BY NAME

Return authors' details by name.

https://{roar_domain}/api/1.2/authors/name?author_names={author_names}&access_token={access_token}

<strong>Argument        Required    Default    Description       Example</strong>author_names    yes         -          authors' names    positivemouseaccess_token    yes         -          access token      bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

AUTHORS' DETAILS BY FACEBOOK ID

Return authors' details by facebook ids.

https://{roar_domain}/api/1.2/authors/facebook?fb_ids={fb_ids}&access_token={access_token}

<strong>Argument        Required    Default    Description     Example</strong>fb_ids          yes         -          facebook ids    19323283access_token    yes         -          access token    bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

OVERALL POSTS STATS

GET https://{roar_domain}/api/1.2/insights/posts/ordered?order={order}&period={period}&limit={limit}&offset={offset}&access_token={access_token}

<strong>Argument        Required    Description                               Restrictions                                                                       Example</strong>order           yes         The field for results to be ordered by    Only "total_views" value is valid for now                                          total_viewsperiod          yes         Period which ends now                     Only "1h", "6h", "12h", "24h", "7d", "30d", "lifetime" values are valid for now    7dlimit           yes         Number of records to return               Positive integer, Max value = 30                                                   10offset          yes         Number of records to skip                 Non-negative integer                                                               5access_token    yes         Access token for the roar                 String                                                                             bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

Respons:

{    "status": {        "code": 0,        "messages": []    },    "data": {        "report": {            "records": [{                "post_id": 12312321,                "total_views": 1234            }, {                "post_id": 4859674589,                "total_views": 4321            },            ...            ]        }    }}

INDIVIDUAL POSTS STATS

GET https://{roar_domain}/api/1.2/insights/posts/details?period={period}&ids={ids}&access_token={access_token}

<strong>Argument        Required    Description                  Restrictions                                                                       Example</strong>period          yes         Period which ends now        Only "1h", "6h", "12h", "24h", "7d", "30d", "lifetime" values are valid for now    7dids             yes         List of post IDs             Positive long numbers separated by comma, Max number = 30                          12312321,4859674589access_token    yes         Access token for the roar    String                                                                             bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

Respons:

{    "status": {        "code": 0,        "messages": []    },    "data": {        "report": {            "records": [{                "post_id": 12312321,                "total_views": 1234            }, {                "post_id": 4859674589,                "total_views": 4321            },            ...            ]        }    }}

FACEBOOK WINS

GET https://{roar_domain}/api/1.2/insights/posts/wins/facebook?period={period}&ids={ids}&access_token={access_token}

<strong>Argument        Required    Description                  Restrictions                                                               Example</strong>period          yes         Period which ends now        Only "1h", "6h", "12h", "24h", "7d", "30d", "lifetime" values are valid    7dids             yes         List of post IDs             Positive long numbers separated by comma, Max number = 30                  12312321,4859674589access_token    yes         Access token for the roar    String                                                                     bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

Response:

{    "status": {        "code": 0,        "messages": []    },    "data": {        "report": {            "records": [{                "post_id": 567,                "page_fans": 84872,                "page_name": "HOT 107.9",                "page_logo": "https://scontent.xx.fbcdn.net/hprofile-xpt1/v/t1.0-1/p50x50/1509847_10152819708755859_1441502743297395555_n.png?oh=909b90499656ccd816f5d9202526d5ff&oe=57549D5A",                "page_url": "https://www.facebook.com/56194705858",                "post_created_at": 1456822800,                "post_likes": 5,                "post_shares": 0,                "post_comments": 0,                "post_url": "https://www.facebook.com/Hot107.9/posts/10153962058115859"            },            ...            ]        }    }}

TWITTER WINS

GET https://{roar_domain}/api/1.2/insights/posts/wins/twitter?period={period}&ids={ids}&access_token={access_token}

<strong>Argument        Required    Description                  Restrictions                                                               Example</strong>period          yes         Period which ends now        Only "1h", "6h", "12h", "24h", "7d", "30d", "lifetime" values are valid    7dids             yes         List of post IDs             Positive long numbers separated by comma, Max number = 30                  12312321,4859674589access_token    yes         Access token for the roar    String                                                                     bdQ0XiTDyR2eOsQHkCooS6CeBwgD4vAd81ux4UmTFx2qXfzeEphrCFGZuK8S5Fk6

Response:

{    "status": {        "code": 0,        "messages": []    },    "data": {        "report": {            "records": [{                "post_id": 234,                "account_fans": 63500,                "account_logo": "https://pbs.twimg.com/profile_images/706968590717681664/MfcERn0d_normal.jpg",                "account_name": "The Dodo",                "account_url: "https://www.twitter.com/statuses/708080524666007552",                "tweet_created_at" :1457654527,                "tweet_likes": 328,                "tweet_retweets": 328,                "tweet_url": "https://twitter.com/dodo/status/708080524666007552"            },            ...            ]        }    }}

Authorization

Our REST API service uses a key based authorization that could be managed in your Account page. You can find your own API key in form of a 64 character string, and note that we will be able to identifies you with it, so please do not share it.

All client requests are authorized using valid API keys via an specific HTTP header or query string. Query string takes priority over HTTP header, so query string will be considered if you send both at the same time.

Sending API key via query string

In order to authorize requests using "api_key" query string, you need to send it as follows:

<HTTP-METHOD> <domain>/api/<version>/<path>?api_key=<api_key> 

Sending API key via HTTP header

In order to authorize requests using HTTP header named "X-RMAuth", you need to perform as follows:

<HTTP-METHOD> <domain>/api/<version>/<path> X-RMAuth: <api_key> 

Unauthorized requests

If you send invalid API keys, you are going to get a response with HTTP 403 Forbidden status and the following payload:

{ "status": { "code": null, "messages": ["API key is not valid"] }, "data": null }
Rawauthors.rst

Author API

The author API supports creating users that could be used to create drafts.

Creating authors

Creates an author and sets its role as guest editor.

POST /api/1.1/authors 

Parameters

NameTypeDescription
first_nameStringFirst name - Required
last_nameStringLast name - Required
emailStringUser email - Required
passwordStringUser password - Required
about_htmlStringUser biography - Optional
image_idIntegerID of the uploaded image - Optional

Note

  • image_id can be found as id in Image API response when uploading or editing images.

Response

{ "id": <id>, "name": "paulberry", "displayname": "Paul Berry", "about_html": "This is me", "bio": "", "photo": "https://<domain>/res/avatars/default", "fb_id": null, "profile_url": "https://<domain>/community/paulberry/" }
Rawdrafts.rst

Drafts API

The draft API supports creating drafts that could be used to publish content on site.

Creating drafts

Creates a draft and sets current user as author by default.

POST /api/1.1/posts 

Parameters

NameTypeDescription
headlineStringHeadline - Required
bodyStringBody - Optional
subheadlineStringSubheadline - Optional
tagsArray of stringsTags - Optional
primary_tagStringPrimary tag - Optional
sectionsArray of stringsSections - Optional
primary_sectionStringPrimary section - Optional
og_titleStringSocial headline - Optional
og_descriptionStringSocial description - Optional
image_idIntegerID of the uploaded image - Optional
manual_image_cropsObjectCrops calculated when uploading image - Optional

Note

  • primary_section and sections fields are eligible by title using insensitive case mode. "Home" can be passed if you want to set draft in homepage.
  • image_id can be found as id in Image API response when uploading or editing images.
  • manual_image_crops can be also found as manual_image_crops in Image API response when editing images.

Response

The response can contain several fields, but would like to highlight some of them that were specially requested:

NameTypeDescription
post_urlStringURL for the draft when is published.
draft_urlStringComposited by post_url + "?draft=1", which enables users to see draft page.
slugStringURL path from post_url.
Rawimages.rst

Image API

The Image API supports uploading and editing images that could be used as splash post image, teaser, social teaser and even other features than posts such as authors creation.

Ratios

Every site in RebelMouse platform has its own image crops configured, these settings are useful when a image is going to be rezised or cropped. So they are considered in every process related to images, and each resized or cropped image has usually a different purpose depending on page type.

For Axios, we have the following ratios configured:

TitleCodeSizes
FHD16x9
  • 960x540
  • 480x270
Wide2x1
  • 1200x600
  • 600x300
Medium2x1
  • 1200x600
  • 600x300
Tall1x1
  • 600x600
Instant9x16
  • 700x1245

Uploading images

Upload a image sending its content as a part of HTTP request body or sending a URL as part of a JSON document.

POST /api/1.3/images

Parameters

NameTypeDescription
image_urlStringA image URL location - Optional

Note

Multiple files can be also sent as part of HTTP request. They are used only if image_url is not used in HTTP request.

Response

For a single image uploaded:

{ "is_animated_gif": false, "task_id": "c3e2a367-24cb-426f-9179-457a0e0ea9ec", "height": 511, "shortcode_id": "7229TA1498262817", "iptc": { "by-line": "", "caption/abstract": "" }, "id": <id>, "shortcode_params": { "is_animated_gif": false, "crop_info": "%22%7B%22image%22%3A%20%22https%3A%2F%2Fs3.amazonaws.com%2Fdev-assets.rbl.ms%2F

For multiple images uploaded:

It takes the same schema for each image uploaded but in form of an array.

Editing images

Editing an image for creating some others with certain dimensions.

PUT /api/1.3/images/<id>

Parameters

NameTypeDescription
image_urlStringA image URL location - Required
manual_image_cropsObjectCrop setting for resizing image - Optional

Manual Image Crops

It depends on ratios configured per site. It must be a objects, whose keys must be the ratio codes and the values should contain the following information:

NameTypeDescription
topIntegerAbsolute top coordinate
leftIntegerAbsolute left coordinate
heightIntegerAbsolute height coordinate
widthIntegerAbsolute width coordinate
imgHeightIntegerWidth of the original image
imgWidthIntegerHeight of the original image

Example

{ "16x9": { "top": 222, "left": 0, "height": 289, "width": 512, "imgWidth": 512, "imgHeight": 511 }, "2x1": { "top": 255, "left": 0, "height": 256, "width": 512, "imgWidth": 512, "imgHeight": 511 }, "3x2": { "top": 169, "left": 0, "height": 342, "width": 512, "imgWidth": 512, "imgHeight": 511 }, "1x1": { "top": 402, "left": 0, "height": 109, "width": 109, "imgWidth": 512, "imgHeight": 511 }, "9x16": { "top": 303, "left": 0, "height": 208, "width": 117, "imgWidth": 512, "imgHeight": 511 } } 

Response

It takes the same schema than uploading images. Only one image is permitted to edit per request.

Rawwebhooks.rst

Webhooks

Webhooks allows you to receive a notification to certain events from RebelMouse platform. HTTP POST requests are performed for the configured URL you provide us, these requests are formed with the following headers:

NameValue
User-AgentRebelMouse/0.1 Mozilla/5.0 (compatible; http://rebelmouse.com) Gecko/20100101 Firefox/7.0.1
Content-Typeapplication/json

Published post

You can receive a notification when a post is published, you are going to receive the following information:

NameTypeDescription
post_idIntegerID of the post
post_urlStringURL for the published post

Page Speed Is Crucial to Your Marketing Efforts

Most marketers don't prioritize page speed because they don't think it impacts their bottom line. However, page load has a direct impact on conversions and revenue.

Here's a very simple scenario, supported by industry data, to underscore why the way pages are built and powered is crucial for paid media initiatives and your overall business:

Let's say a paid media campaign drives 100,000 new visitors to a landing page that takes five seconds to load. Google says that 53% of mobile site visitors will leave a page that takes longer than three seconds to load. So of the 100K mobile site visitors you paid to bring to the page, ~50K are leaving immediately due to poor page performance alone.

Some studies even show that bounce rate increases approximately 100% for every two-second delay. So, if site load jumps to seven seconds, you'll pretty much lose all of the visitors your paid strategies brought in.

A Poor Site Experience Costs More Than You Realize

Page load plays a huge part in customer dissatisfaction, too. Continuing on with our previous example, let's classify the ~50K that didn't abandon the page as dissatisfied due to poor page performance. As HubSpot points out, 79% of them are less likely to buy again from the same website. That's ~40K visitors never coming back to the site due to poor page speed. The loss is even greater when you consider how valuable returning visitors are: They represent up to 48% of all transactions and spend almost 2x more than new visitors, according to Business Insider.

Plus, people love to spread the word about a bad experience, probably more than a good one. 40% of visitors who had a bad experience with a website's performance would tell a friend or a family member. So of your 50K dissatisfied visitors, 20K are talking negatively about your brand. If they tell only one person each, that's an opportunity cost of another 20K potential site visitors and customers.

The main takeaway? Your paid media has to work much, much harder when you neglect to optimize your site for performance.

Owned and Paid Media Should Work Together for Better Efficiency

And speaking of site improvements to help the bottom line, marketers can't overlook the value of owned content (e.g., articles, reviews, social feeds, etc.) and its impact on overall traffic and lead generation strategies. Sites tend to see significant lift in audience reach and conversion when content is paired with commerce: For e-commerce companies, content can account for up to 69% of total organic traffic. And, even more compelling, conversion rates have been 6x higher for companies that adopt content marketing.

RebelMouse's CMS makes it easy for brands to systematically optimize page speed performance and organic reach, which allows paid media to be more efficient.

RebelMouse allows clients to easily manage website layouts and components at any time, ensuring sites remain fast and are rewarded by Google and Facebook. Our platform features proprietary SEO tools designed to help clients optimize organic search with every post and better align paid and organic search strategies for increased efficiency. Similarly, our platform also includes proprietary social tools to organically build community and growth, and our data helps clients spot winning organic trends that can inform paid social media.

RebelMouse Is a Partner That Can Guide You

When it comes to content marketing, it's important to be mindful of the relationship between owned, earned, and paid media — it will only help your teams engage and convert more audiences into customers and brand loyalists. At RebelMouse, we're proud of how we work with brands and our ability to provide the expertise, best practices, and modern technology that help teams become better content marketers. If you're a brand marketer, feel free to reach out to us to learn how RebelMouse can help you be more strategic and effective in your content marketing efforts.

Related Articles

Target High-Value Users With Affinity Categories

Unlock valuable audience data and shape a new strategy

In today's landscape, quality content isn't enough — it's half the battle. Publishers need to produce shareable content backed by data to experience sustainable growth. At RebelMouse, we have a unique pageview methodology that provides an innovative user experience for every reader without sacrificing revenue and growth opportunities for publishers.

To do this, we track massive amounts of data across our platform through the use of custom-built Google Data Studio dashboards.

Click here to see the kind of growth our clients experience every day.

One of the best ways to discover more about your audience is by taking advantage of Affinity Categories. This feature breaks down audience demographics, including age, location, interests, and more. Affinity Categories are usually used to target audiences for ads, but we also use them to gain insights on what topics a site's visitors are interested in overall.

Normally, each category is listed out separately in Google Analytics. In the example shown above, our data experts split categories into separate levels to reveal different levels of audience depth. For instance, by splitting up the category News & Politics, we can better explore the detailed distribution of users interested in specific types of news:

  • News & Politics/Avid News Readers/Avid Political News Readers
  • News & Politics/Avid News Readers/Entertainment News Enthusiasts

From an editorial standpoint, this is useful because it allows publishers to determine and target varying levels of high-value users, improving the efficacy of a new content strategy or ad campaign.

If your site is already powered by RebelMouse, email support@rebelmouse.com to get a breakdown of your audience's Affinity Categories. If you aren't powered by RebelMouse yet, request a proposal today and start receiving the data you need to grow loyal followers at scale.

Related Articles

Infinite Scroll: An Innovative + Intuitive UX

There is a common misconception that publishers have to sacrifice monetization and professional design to deliver a high-performing, quality user experience to its readers. But in today's modern publishing environment, websites can deliver an unobtrusive site experience that's intuitive, elegant, and prosperous.

To do this consistently, RebelMouse supports infinite scroll as part of our bigger design strategy called Social UX for Media. Much like the news feeds of Facebook, Twitter, and Instagram, infinite scroll provides an endless stream of articles to its readers so they never reach the "end" of your content.

Infinite scroll is an innovative approach, but it is also a widely adopted standard that has been endorsed and is supported officially by Google, Comscore, Nielsen, and many other industry giants. It's part of a new media strategy deployed by companies with massive valuations and the highest level of visibility in the U.S. market, including Axios, Vice, and The Verge.

In fact, RebelMouse built and launched news powerhouse Axios, now one of the biggest new media companies to date, with our Social UX for Media design featuring infinite scroll. It's still a core part of Axios' successful publishing strategy today. The feature has also been key to the growth of many other RebelMouse-powered properties, including La Verità, Dance Magazine, and United Airlines.

RebelMouse's Social UX for Media design, featuring infinite scroll on hub.united.com.

The primary reason infinite scroll is so successful is because it mimics user behavior in an innovative, yet familiar way, thanks to its similarity to social feeds. On mobile, expandable posts make it easy for users to read "before the jump" and quickly expand to the rest of the article with one click, rather than being taken to another article page. This is similar to when a user expands a caption on Instagram. It's these simple design details that bring massive growth to key stats like return visits and time on site.

Our page view methodology not only keeps the user experience intact, it also includes robust ad serving technology. We use industry standard rules for page views that require at least 50% of the screen space to change before it counts as a new page view. So whether you use Comscore or Nielsen to verify your site traffic, infinite scroll will not have a negative impact on your insights.

If you're interested in launching a site with our game-changing Social UX for Media design, request a proposal today and let's start working together. If your site is already powered by RebelMouse, and you have questions about infinite scroll, email support@rebelmouse.com.

Related Articles

Particle Assembler: Ads in Slideshows Now Supported

You can now insert ads between slides in a slideshow!

Monetizing users' engagement and page views is pivotal to most digital businesses, and our Particle Assembler has been an invaluable tool in helping RebelMouse clients to insert native ads seamlessly into their content. Now we've taken this functionality one step further by introducing support for ads between slides in Assembler's slideshow layout.

Keep reading... Show less
Subscribe to Our Newsletter