Back to top

Documents API

The main purpose of this API is to retrieve documents.

The production url for this API is https://nap.launchmetrics.com/documents/v1

If the documents you want to retrieve comes from the /search/v1/influencers endpoint, you can use the url https://nap.launchmetrics.com/documents/v1 instead. It will be a lot faster as we keep a cache on Amazon for the Influencers’ publications.

Authentication

All apis contain the /v[:version] placeholder. It’s used to do API versioning

  • v0 For testing environments, no authentication is required and it’s disabled on production

  • v1 Production version, authentication required

There are two ways to authenticate the request

  • with just an app_id parameter (if you don’t have an app_id you should request one) (less secure)

  • with an app_id + signature parameters (signature creation explained below) (more secure)

The use of appId or appid is deprecated, use app_id instead

The testing environment is not up 24/7, so some calls to the testing urls may return 404

Create a signature

This method is inspired from https://dev.twitter.com/docs/auth/creating-signature

To sign a request you need:

  • http method in uppercase: GET, POST

  • Request url without parameters

  • The parameter string, a url-encoded and sorted parameters string (see below to know how to generate it)

  • Body bytes content, if you’re not sending form data

  • Current timestamp (in seconds)

  • A nonce, in other words, a random string which have at least 32 characters

  • An app_id provided by R&D

  • A secret (related to the app) provided by R&D

For example, given this parameters as key and values:

{ “query”: “girona”, "period: “last_month”, }

Step 1, add the timestampp, nonce and app_id:

{ “query”: “girona”, “period”: “last_month”, “timestamp”: “1380545928”, “nonce”: “QC3hTWyVby6PtKKeCnxPAEMPXebUP82D”, “app_id”: “3ttp2946sij2hic” }

Step 2, percent encode all keys and values

{ “query”: “girona”, “period”: “last_month”, “timestamp”: “1380545928”, “nonce”: “QC3hTWyVby6PtKKeCnxPAEMPXebUP82D”, “app_id”: “3ttp2946sij2hic” }

Make sure your percent encode library encode spaces as %20 instead of +. Using the + sign will generate an incorrect signature.

Step 3, join the key and value using a = and sort the parameters alphabetically

[ “app_id=3ttp2946sij2hic”, “nonce=QC3hTWyVby6PtKKeCnxPAEMPXebUP82D”, “period=last_month”, “query=girona”, “timestamp=1380545928” ]

Step 4, join all parameters with & to generate the parameter_string

app_id=3ttp2946sij2hic&nonce=QC3hTWyVby6PtKKeCnxPAEMPXebUP82D&period=last_month&query=girona&timestamp=1380545928

Step 5, generate the signature_base string using this schema

signature_base = http_method&url_encoded(request_url)&url_encoded(parameter_string)

Step 6, if you’re sending not form data on body(p.e. a json or plain text), add body bytes after a new line

signature_base = signature_base + “\n” + ‘{“json”: “example”}’

where

  • http_method is the http method used for the request in uppercase: GET

  • request_url is the url without parameters and without the protocol, for example nap.aws.augure.com/v1/search/influencers

  • parameter_string is explained above, for example app_id=3ttp2946sij2hic&nonce=QC3hTWyVby6PtKKeCnxPAEMPXebUP82D&period=last_month&query=girona&timestamp=1380545928

Then the signature_base string will be:

GET&nap.aws.augure.com%2Fv1%2Fsearch%2Finfluencers&app_id%3D3ttp2946sij2hic%26nonce%3DQC3hTWyVby6PtKKeCnxPAEMPXebUP82D%26period%3Dlast_month%26query%3Dgirona%26timestamp%3D1380545928 {“json”: “example”}

don’t forget to url_encode the request_url and the parameter_string

Step 6, generate the signature parameter using the HMAC_SHA1 algorithm. This algorithm needs 2 strings to work, the first one will be the signature_base string, and the second one will be the secret (needed to generate the secure hash).

The output of this algorithm is binary, so you should use base64 encoding to produce the final signature string.

If the secret provided for our app is rpii62atrbqejx27v7uv32qbn8exv7gj then the signature of our request will be

OHQRsFL3dqFIStxxHcv1yY8qcy4=

Step 7, add the signature value to the request parameters and execute the request to the API. In this case will be

{ “query”: “girona”, “period”: “last_month”, “nonce”: “QC3hTWyVby6PtKKeCnxPAEMPXebUP82D”, “timestamp”: “1380545928”, “app_id”: “3ttp2946sij2hic”, “signature”: “OHQRsFL3dqFIStxxHcv1yY8qcy4=” }

Don’t forget, if you’re not using a helper library, you should url encode all keys and values.

For the POST and PUT requests which you’re not sending form data, like a json or plain text, the parameters related to the signature must be added to the url, p.e.: https://nap.launchmetrics.com/v1/analysis?app_id=xxx&nonce=xxx&timestamp=xxx&signature=xxx

Response

All responses return application/json; charset=utf-8.

  • Response ok (application/json)

    The response element will contain the specific API method response.

    {
            "status": "200",
            "time": "0.2",
            "request": {
              "method":"GET",
              "path":"/ping",
              "parameters": {}
          },
          "response": {}
        }
  • Response error (application/json)

    There could be different messages with the correspondent HTTP error code.

    {
            "status": "404",
            "time": "0.2",
            "request": {
              "method":"GET",
              "path":"/ping",
              "parameters": {}
          },
          "error": {
            "code": "WRONG_PARAMETERS",
            "message": "The email parameter is mandatory"
          }
        }

Generic Error codes

  • Http status 400

    • MISSING_PARAMETERS

      Some error with the API parameters

  • Http status 500

    • INTERNAL_ERROR

      Unexpected API error

API Health

There are two default methods available for each API for monitoring purposes.

Ping

Ping
GET/ping

Used to know if the API is up and working

Example URI

GET https://nap.launchmetrics.com/documents/v1/ping
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pong": "ok"
}

Stats

Stats
GET/stats

It displays information about the API usage and how it performs

Example URI

GET https://nap.launchmetrics.com/documents/v1/stats
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "last24hours": {
    "GET /emailValidation/v1/setEmailStatus": {
      "hour_interval": [
        {
          "hour": "2016-02-18T16:00:00.000Z",
          "count": 2,
          "variance": 0,
          "status": {
            "EMAIL_NOT_FOUND": {
              "count": 2,
              "variance": 0,
              "std_deviation": 0,
              "avg": 0.168862000107765,
              "min": 0.168862000107765,
              "max": 0.168862000107765,
              "sum_of_squares": 0.0570287501607898,
              "std_deviation_bounds": {
                "upper": 0.168862000107765,
                "lower": 0.168862000107765
              },
              "sum": 0.33772400021553
            },
            "OK": {
              "count": 0,
              "variance": null,
              "std_deviation": null,
              "avg": null,
              "min": null,
              "max": null,
              "sum_of_squares": null,
              "std_deviation_bounds": {
                "upper": null,
                "lower": null
              },
              "sum": null
            }
          },
          "min": 0.168862000107765,
          "avg": 0.168862000107765,
          "std_deviation": 0,
          "max": 0.168862000107765,
          "sum_of_squares": 0.0570287501607898,
          "sum": 0.33772400021553,
          "std_deviation_bounds": {
            "upper": 0.168862000107765,
            "lower": 0.168862000107765
          }
        },
        {
          "hour": "2016-02-18T18:00:00.000Z",
          "count": 2,
          "variance": 0,
          "status": {
            "EMAIL_NOT_FOUND": {
              "count": 2,
              "variance": 0,
              "std_deviation": 0,
              "avg": 0.0233999993652105,
              "min": 0.0233999993652105,
              "max": 0.0233999993652105,
              "sum_of_squares": 0.00109511994058371,
              "std_deviation_bounds": {
                "upper": 0.0233999993652105,
                "lower": 0.0233999993652105
              },
              "sum": 0.0467999987304211
            },
            "OK": {
              "count": 0,
              "variance": null,
              "std_deviation": null,
              "avg": null,
              "min": null,
              "max": null,
              "sum_of_squares": null,
              "std_deviation_bounds": {
                "upper": null,
                "lower": null
              },
              "sum": null
            }
          },
          "min": 0.0233999993652105,
          "avg": 0.0233999993652105,
          "std_deviation": 0,
          "max": 0.0233999993652105,
          "sum_of_squares": 0.00109511994058371,
          "sum": 0.0467999987304211,
          "std_deviation_bounds": {
            "upper": 0.0233999993652105,
            "lower": 0.0233999993652105
          }
        },
        {
          "hour": "2016-02-18T20:00:00.000Z",
          "count": 2,
          "variance": 0,
          "status": {
            "EMAIL_NOT_FOUND": {
              "count": 2,
              "variance": 0,
              "std_deviation": 0,
              "avg": 0.0268389992415905,
              "min": 0.0268389992415905,
              "max": 0.0268389992415905,
              "sum_of_squares": 0.00144066376058019,
              "std_deviation_bounds": {
                "upper": 0.0268389992415905,
                "lower": 0.0268389992415905
              },
              "sum": 0.053677998483181
            },
            "OK": {
              "count": 0,
              "variance": null,
              "std_deviation": null,
              "avg": null,
              "min": null,
              "max": null,
              "sum_of_squares": null,
              "std_deviation_bounds": {
                "upper": null,
                "lower": null
              },
              "sum": null
            }
          },
          "min": 0.0268389992415905,
          "avg": 0.0268389992415905,
          "std_deviation": 0,
          "max": 0.0268389992415905,
          "sum_of_squares": 0.00144066376058019,
          "sum": 0.053677998483181,
          "std_deviation_bounds": {
            "upper": 0.0268389992415905,
            "lower": 0.0268389992415905
          }
        }
      ],
      "count": 2068,
      "variance": 0.952526547318981,
      "min": 18.1012001037598,
      "avg": 19.8605297686284,
      "std_deviation": 0.975974665305909,
      "max": 23.6008319854736,
      "sum_of_squares": 817673.073983961,
      "std_deviation_bounds": {
        "upper": 21.8124790992402,
        "lower": 17.9085804380165
      },
      "sum": 41071.5755615234
    }
  },
  "last15days": {
    "GET /emailValidation/v1/setServerEmailsVerificationPending": {
      "count": 1,
      "variance": 0,
      "min": 28.7900829315186,
      "avg": 28.7900829315186,
      "std_deviation": 0,
      "max": 28.7900829315186,
      "sum_of_squares": 828.868875203716,
      "day_interval": [
        {
          "count": 1,
          "variance": 0,
          "status": {
            "CONNECTION_ERROR": {
              "count": 1,
              "variance": 0,
              "std_deviation": 0,
              "avg": 28.7900829315186,
              "min": 28.7900829315186,
              "max": 28.7900829315186,
              "sum_of_squares": 828.868875203716,
              "std_deviation_bounds": {
                "upper": 28.7900829315186,
                "lower": 28.7900829315186
              },
              "sum": 28.7900829315186
            },
            "OK": {
              "count": 0,
              "variance": null,
              "std_deviation": null,
              "avg": null,
              "min": null,
              "max": null,
              "sum_of_squares": null,
              "std_deviation_bounds": {
                "upper": null,
                "lower": null
              },
              "sum": null
            }
          },
          "min": 28.7900829315186,
          "avg": 28.7900829315186,
          "std_deviation": 0,
          "max": 28.7900829315186,
          "sum_of_squares": 828.868875203716,
          "day": "2016-02-07T00:00:00.000Z",
          "sum": 28.7900829315186,
          "std_deviation_bounds": {
            "upper": 28.7900829315186,
            "lower": 28.7900829315186
          }
        }
      ],
      "std_deviation_bounds": {
        "upper": 28.7900829315186,
        "lower": 28.7900829315186
      },
      "sum": 28.7900829315186
    }
  }
}

Custom error codes

Http status 400

  • DOCUMENT_INVALID_IDS

    Ids passed to api are not corrects.

  • DOCUMENT_INVALID_RESPONSE_TYPE

    Response_type parameter not in accepted ones.

Http status 500

  • DOCUMENT_LOAD_ERROR

    The load process has failed.

  • DOCUMENT_PARSE_ERROR

    The parse process has failed for some documents.

Documents Collection

Document retrieval

Documents
GET/documents/{ids}{?response_type}{?highlight}

Method used to get documents data.

If you want to retrieve a lot of documents, please use the next method instead

Example URI

GET https://nap.launchmetrics.com/documents/v1/documents/135271927088218112?response_type=lemonSources?highlight=word
URI Parameters
HideShow
ids
number (required) Example: 135271927088218112

The documents ids you want to retrieve. It can be one or more separated by comas.

If one or more of these documents aren’t in our database, it won’t be returned

response_type
string (optional) Default: default Example: lemonSources

String specifying the format response desired.

Choices: raw default lemonSources analytics insights

highlight
string (optional) Example: word

String specifying what word or query you want highlighted.

Accepts lucene syntax for highlight fex: “google it” AND “perl”.

The content and the title will be shrinked to 250 chars.

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "location": {
      "country": {
        "name": "USA",
        "id": "0400",
        "iso": "US"
      },
      "region": {
        "name": "National",
        "id": "040022"
      },
      "continent": {
        "name": "North America",
        "id": "04"
      }
    },
    "source": {
      "url": "http://www.csmonitor.com",
      "id": "989437611",
      "title": "The Christian Science Monitor"
    },
    "date": "2016-02-27T23:00:13Z",
    "provider": "News",
    "content": "While major demonstrations have led to a $15 minimum wage in San Francisco, Seattle, New York Los Angeles, and 10 other cities in the past year, Birminghams plans to boost local wages have been thwarted by state legislation.\nThe city council of Birmingham, Ala., voted 7 to 0 (with one abstention) to become the first city in the deep South to enact a minimum wage above the current federal level of $7.25. The ordinance planned an increase to $8.50 per hour by July 2016, with a second increase to $10.10 set for July 2017.\nBut the Alabama legislature this past week fired back, passing a bill that prevents cities and counties from mandating their own benefits, including minimum wage, vacation time, or set work schedules. The bill passed easily in both houses and Gov. Robert Bentley signed it into law on Thursday.\nRecommended:\nMinimum wage: States ranked from lowest to highest\nSupporters argued that a \"patchwork\" of varying wages would devastate businesses, cost jobs, and send the regional economy into a slump.\nTake our quiz\nWhat is your social class? Take our quiz to find out!\nIn Pictures\nBattling Minimum Wage\nPhotos of the Day\nPhotos of the weekend\n\"We want businesses to expand and create more jobs not cut entry-level jobs because a patchwork of local minimum wages causes operating costs to rise,\" said State Sen. Jabo Waggoner (R) after the bills passage.\nCritics of the new law countered that higher wages lift families out of poverty and inject new spending into the regional economy.\n\"Were talking about the bare survival of people, said Sen. Rodger Smitherman (D), reported the Montgomery Advertiser. And were talking about a legislature ... that says we dont care about y'all.\"\n\"When you lift a person on the bottom, everybody above them is lifted up,\" he added.\nRecommended:\n10 companies that pay higher than minimum wage\nBirmingham legislators noted that low minimum wages keep people dependent on social services.\n\"The very people who have refused to expand Medicaid in the state to help the most vulnerable amongst us receive critical medical care, are once again keeping their boots on the necks of people in desperate need of financial relief,\" said Birmingham city council president Johnathan Austin in a statement.\n\"People can not pull themselves up by the bootstraps if they cant afford to buy boots.\"\nAlabama is not the first city to block local wage ordinances. Other states that have passed or considered such measures include New Mexico, Washington State, and Idaho.\nIn September, the Missouri senate voted 23 to 9 to override Gov. Jay Nixons veto of a bill that would forbid Kansas City, St. Louis, and other Missouri cities from increasing their minimum wage above $7.65, the current statewide rate. \nAlabama is one of only five states without a statewide minimum wage law. The others are Tennessee, Louisiana, Mississippi, and South Carolina.\nAlabama is also one of 21 states where the minimum wage has stayed $7.25 per hour since 2009.",
    "genres": [
      {
        "id": "0709",
        "name": "Politics"
      }
    ],
    "rank": {
      "source_rank": "91020",
      "audience_mode": "ALEXA_REACH",
      "alexa_rank": "4139",
      "google_inlinks": "1800",
      "audience": "1137086",
      "alexa_page_view": "2.0900",
      "advertising_value": "57036",
      "alexa_reach": "372.6590",
      "miv": {
        "discover_value": 355.46563228881,
        "value": 14584.1663258486
      },
      "similarweb_capture_time": "2018-05-13 00:00:00",
      "similarweb_monthly_visits": 15592659,
      "similarweb_factor" : 1
    },
    "exensa": [
      [
        "0709",
        350.182,
        0.298
      ],
      [
        "0304",
        300.701,
        0.256
      ],
      [
        "030C",
        223.676,
        0.19
      ],
      [
        "0701",
        85.505,
        0.073
      ],
      [
        "0606",
        69.306,
        0.059
      ],
      [
        "1209",
        31.556,
        0.027
      ],
      [
        "0B01",
        30.323,
        0.026
      ],
      [
        "0603",
        30.214,
        0.026
      ],
      [
        "0301",
        29.162,
        0.025
      ],
      [
        "1203",
        25.547,
        0.022
      ]
    ],
    "id": "14566140131420036855",
    "updates": {
      "last_update_at": "2016-03-03T00:01:15Z",
      "cluster": "14566115131420034667"
    },
    "social": {
      "shares": 62
    },
    "keywords": [
      "\"minimum wage\"",
      "state",
      "Alabama",
      "city",
      "people",
      "cities",
      "New",
      "Birminghams",
      "bill",
      "law"
    ],
    "section": {
      "title": "The Vote",
      "id": "1420036855",
      "url": "http://www.csmonitor.com/USA/Politics/The-Vote"
    },
    "type": {
      "name": "Online Media",
      "id": 0
    },
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "title": "Alabama lawmakers to cities: No, you can't raise the minimum wage",
    "availability": {
      "id": "0",
      "name": "Free of Charge"
    },
    "language": {
      "id": "2",
      "name": "English",
      "code": "en"
    },
    "urls": {
      "canonical": "http://www.csmonitor.com/USA/USA-Update/2016/0227/Alabama-lawmakers-to-cities-No-you-can-t-raise-the-minimum-wage",
      "image": "",
      "cache": "http://www.csmonitor.com/USA/USA-Update/2016/0227/Alabama-lawmakers-to-cities-No-you-can-t-raise-the-minimum-wage",
      "item": "http://www.csmonitor.com/USA/USA-Update/2016/0227/Alabama-lawmakers-to-cities-No-you-can-t-raise-the-minimum-wage"
    },
    "summary": "While major demonstrations have led to a $15 minimum wage in San Francisco, Seattle, New York Los Angeles, and 10 other cities in the past year, Birminghams plans to boost local wages have been thwarted by state legislation....",
    "media" ; {
      "image" : ["http://images.csmonitor.com/csm/2016/02/967098_1_0014-Alabama_standard?alias=standard_600x400"]
    }
  }
]
Request  Documents with response_type=analytics
HideShow
Body
documents/14973462950408689474,14973048010305143672,14973079370504478173,14973404680513750508?response_type=analytics
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "provider": "YouTube",
    "date": "2017-06-13T09:31:47Z",
    "content": "El secretario del Departamento de Salud (DS), Rafael Rodríguez Mercado informó el lunes, que para el año 2018 será obligatoria la vacuna",
    "author": {
      "contact_count": 0,
      "name": "Noticias247WIPR",
      "subscriber_count": 3023,
      "age": null,
      "subscription_count": 0,
      "url": "https://www.youtube.com/channel/UCeSLoSkSbmq3FBeSLckPQ2A",
      "id": "UCeSLoSkSbmq3FBeSLckPQ2A",
      "video_watch_count": 1438534,
      "favourites_count": 0,
      "video_upload_count": 4081,
      "gender": null
    },
    "summary": "",
    "media": {
      "url_embeded_mobile": null,
      "duration": 103,
      "type": "video",
      "url_embeded": "https://www.youtube.com/embed/jns8BLdP0Is",
      "url_mobile": null
    },
    "date_from_provider": "2017-06-13T03:32:03Z",
    "id": "14973462950408689474",
    "link": "https://www.youtube.com/video/jns8BLdP0Is",
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "language": {
      "code": "es"
    },
    "location": {
      "coords": null
    },
    "id_from_provider": "jns8BLdP0Is",
    "stats": {
      "min_rating": null,
      "favourite_count": 0,
      "num_comments": 0,
      "max_rating": null,
      "average_rating": null,
      "num_raters": 0
    },
    "exensa": [
      [
        "A203",
        45.119,
        0.061
      ],
      [
        "A208",
        135.377,
        0.184
      ],
      [
        "A905",
        64.246,
        0.087
      ],
      [
        "A609",
        42.857,
        0.058
      ],
      [
        "A508",
        32.248,
        0.044
      ],
      [
        "A206",
        34.767,
        0.047
      ],
      [
        "A209",
        77.023,
        0.105
      ],
      [
        "A707",
        171.702,
        0.234
      ]
    ],
    "social": {
      "views": 8,
      "likes": 0,
      "replies": 0
    },
    "updates": {
      "cluster": "0"
    },
    "image": "https://i.ytimg.com/vi/jns8BLdP0Is/default.jpg",
    "influencer_ids": [],
    "title": "Departamento de Salud hará obligatoria a estudiantes vacuna VPH",
    "type": {
      "name": "Videos (Youtube)",
      "id": 40
    },
    "original_image": "https://i.ytimg.com/vi/jns8BLdP0Is/hqdefault.jpg"
  },
  {
    "source": {
      "url": "http://twitter.com/download/android",
      "name": "Twitter for Android"
    },
    "provider": "Twitter",
    "date": "2017-06-12T22:00:12Z",
    "place": {
      "country_code": null,
      "name": null,
      "type": null
    },
    "content": "RT @DrTimothyMcNiff: Thank you @KPMG_US for donating 3,000 books for @ArchNY_Schools incoming kindergarten students! https://t.co/0aulDZbeYZ",
    "author": {
      "location": "",
      "followers_count": 13,
      "name": "Bignev2003",
      "image": "http://pbs.twimg.com/profile_images/829016407010635776/RzTHAiRU_normal.jpg",
      "url": "http://twitter.com/Bignev2003",
      "id": "778691524947128320",
      "favourites_count": 2678,
      "tweets_count": 518,
      "following_count": 42
    },
    "summary": "",
    "media": [
      {
        "width": "1200",
        "original_width": "2048",
        "height": "1000",
        "photo_url": "http://pbs.twimg.com/media/DCJHV0kVoAAj2qX.jpg",
        "video_url": null,
        "expanded_url": "https://twitter.com/DrTimothyMcNiff/status/874339729482940416/photo/1",
        "type": "photo",
        "original_image": "http://pbs.twimg.com/media/DCJHV0kVoAAj2qX.jpg:large",
        "original_height": "1706"
      }
    ],
    "date_from_provider": "2017-06-12T21:01:01Z",
    "id": "14973048010305143672",
    "link": "http://twitter.com/Bignev2003/status/874370982076715009",
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "language": {
      "name": "English",
      "code": "en"
    },
    "location": {
      "coords": null
    },
    "id_from_provider": "874370982076715009",
    "exensa": [
      [
        "B201",
        26.605,
        0.038
      ],
      [
        "A5",
        79.899,
        0.114
      ],
      [
        "A805",
        31.204,
        0.044
      ],
      [
        "A3",
        28.471,
        0.04
      ],
      [
        "A508",
        268.244,
        0.381
      ],
      [
        "A7",
        36.727,
        0.052
      ],
      [
        "A504",
        44.001,
        0.063
      ]
    ],
    "social": {
      "shares": 0,
      "user_mentions": [
        "DrTimothyMcNiff",
        "KPMG_US",
        "ArchNY_Schools"
      ],
      "reply_to": 0,
      "retweet_to_user": "DrTimothyMcNiff",
      "reply_to_user_name": "",
      "likes": 0
    },
    "updates": {
      "cluster": "0"
    },
    "behavior": {
      "is_question": null,
      "possibly_sensitive": 0,
      "attitude": null
    },
    "influencer_ids": [],
    "type": {
      "name": "Microblogging (Twitter)",
      "id": 30
    }
  },
  {
    "provider": "Instagram",
    "type_publication": {
      "name": "image"
    },
    "date": "2017-06-13T07:54:38Z",
    "place": {
      "street_address": "",
      "country_code": null,
      "name": ""
    },
    "content": "😎",
    "author": {
      "url": "https://instagram.com/hq.katyperry",
      "name": "hq.katyperry",
      "id": "1487447693",
      "full_name": "katyperry",
      "followers": 0,
      "image": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/15624175_226181574497659_3995041414663634944_a.jpg"
    },
    "keywords": [
      "perry",
      "katycat",
      "katyperry",
      "katherynelizabethhudson",
      "katyhudson",
      "katy"
    ],
    "summary": "",
    "date_from_provider": "2017-06-08T20:56:43Z",
    "id": "14973404680513750508",
    "link": "https://www.instagram.com/p/BVF8FGWnUWA/",
    "location": {
      "longitude": "",
      "latitude": ""
    },
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "id_from_provider": "1532895481399428480_1487447693",
    "exensa": [
      [
        "A503",
        87.196,
        0.069
      ],
      [
        "A104",
        124.332,
        0.098
      ],
      [
        "A4",
        99.727,
        0.079
      ],
      [
        "A105",
        117.955,
        0.093
      ],
      [
        "A107",
        253.086,
        0.2
      ]
    ],
    "social": {
      "likes": 171,
      "replies": 1
    },
    "updates": {
      "cluster": "0"
    },
    "video_url": "",
    "image_url": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.135.1080.1080/18948278_116600168932611_8244187890720964608_n.jpg",
    "influencer_ids": [
      "149734039001490519"
    ],
    "type": {
      "name": "Images (Instagram)",
      "id": 51
    },
    "original_image": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.135.1080.1080/18948278_116600168932611_8244187890720964608_n.jpg"
  }
]

Documents
POST/documents/

Same as the previous call, but the ids are sent with the request message body.

Example URI

POST https://nap.launchmetrics.com/documents/v1/documents/
Request
HideShow
Headers
Content-Type: text/plain
Body
14576508001296729997,14581692090307899604,14577372000604650417
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "urls": {
      "canonical": "http://www.thehindubusinessline.com/todays-paper/tp-news/lending-a-help-ing-hand-new-policy-a-welcome-change/article8338333.ece",
      "item": "http://www.thehindubusinessline.com/todays-paper/tp-news/lending-a-help-ing-hand-new-policy-a-welcome-change/article8338333.ece",
      "cache": "http://www.thehindubusinessline.com/todays-paper/tp-news/lending-a-help-ing-hand-new-policy-a-welcome-change/article8338333.ece",
      "image": ""
    },
    "availability": {
      "id": "0",
      "name": "Free of Charge"
    },
    "language": {
      "id": "2",
      "name": "English",
      "code": "en"
    },
    "type": {
      "name": "Online Media",
      "id": 0
    },
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "title": "Lending a HELP ing hand: new policy a welcome change",
    "summary": "Long awaited move to improve domestic oil and gas output finally gets going BL Research Bureau:  For a country that imports three-fourth of its crude oil needs and about a third of its gas requirements, the HELP (Hydrocarbon...",
    "genres": [
      {
        "name": "Companies / Businesses",
        "id": "0304"
      }
    ],
    "author": {
      "name": "Anand Kalyanaraman",
      "id": "2710257"
    },
    "rank": {
      "alexa_reach": "203.4656",
      "advertising_value": "21903",
      "audience": "620830",
      "alexa_page_view": "1.4700",
      "audience_mode": "ALEXA_REACH",
      "google_inlinks": "382",
      "alexa_rank": "7406",
      "source_rank": "82745",
      "miv": {
        "discover_value": 4584.56863258886,
        "value": 4584.56863258886
      },
      "similarweb_capture_time": "2019-01-10 00:00:00",
      "similarweb_monthly_visits": 25590622,
      "similarweb_factor" : 0.1
    },
    "content": "Long awaited move to improve domestic oil and gas output finally gets going\nBL Research Bureau: \nFor a country that imports three-fourth of its crude oil needs and about a third of its gas requirements, the HELP (Hydrocarbon Exploration Licensing Policy) regime that will replace the NELP (New Exploration Licensing Policy) comes not a day too soon.\nDespite nine rounds of NELP auctions so far since 1999, India remains largely unexplored - about 75 per cent of the sedimentary basin is not fully explored yet. Over the past few years, domestic oil and gas output has been declining while imports have been rising to meet the demand.\nThe HELP - a follow through to the consultation paper put up by the Ministry of Petroleum and Natural Gas in November last year - seeks to address key pain points in the NELP that inhibited domestic hydrocarbon output growth.\nIt is also an extension of the liberal rules introduced last September for auction of the marginal blocks surrendered by ONGC and Oil India.\nKey changes\nContracts under the HELP will be based on 'revenue sharing' instead of the 'profit sharing' under the NELP.\nMore transparent and easy-to-implement, 'revenue sharing' will do away with the dispute-prone cost-recovery calculations necessary under 'profit sharing'.\nThat said, since contractors will bear higher risk, it remains to be seen whether they would be game for the revenue sharing mechanism, especially for deep water blocks where costs and risks are very high.\nThe unified licensing policy under HELP will allow exploration and production of all hydrocarbons such as oil, gas, coal bed methane and shale oil and gas in a block, a significant improvement over the NELP, which required separate licensing for different types of hydrocarbons.\nContractors will now also have the flexibility to request bidding for any block on-tap under Open Acreage Licensing. Earlier, they had to wait for the government to auction blocks, and could only bid for blocks that were put up for auction.\nImportantly, the Centre has taken steps towards pricing and marketing freedom for domestic gas. But it has hedged on this key reform.\nOne, the freedom to price and market is restricted to new gas production from difficult terrains - deepwater, ultra deepwater, and high pressure high temperature areas.\nNext, the price will be subject to a ceiling-based on a formula, involving the import price of alternative fuels such as fuel oil, coal, naphtha and liquefied natural gas (LNG).\nGas fields that are currently under production will not have this pricing and marketing freedom, and will be continue to get the price as per the formula currently applicable to them. So, while ONGC's yet-to-be-developed offshore KG-DWN-98/2 block may see some benefit from the new pricing regime, RIL's producing KG-D6 block may not. The Centre has smartly ring-fenced its share of the profit by basing the calculation on the prevailing international price or the actual price, whichever is higher.\nContract extensions\nFinally, the grant of extension of production sharing contracts for 28 small, medium sized discovered fields is welcome. The extension will be for 10 years, both for oil and gas fields or economic life of the field, whichever is earlier.\nThis will remove uncertainty and help contractors plan their investments in these blocks.\nCairn India's Rajasthan block contract though, has been kept out of the largesse. Also, the Centre has sweetened the deal for itself by increasing royalty and cess to prevailing rates from concessional rates, and by increasing its share of profit by 10 percentage points during the extended period.\nMore transparent and easy-to-implement, 'revenue sharing' will do away with the dispute-prone cost-recovery calculations necessary under 'profit sharing'",
    "date": "2016-03-10T23:00:00Z",
    "provider": "News",
    "source": {
      "title": "Hindu Business Line",
      "id": "1217311528",
      "url": "http://www.thehindubusinessline.com"
    },
    "location": {
      "continent": {
        "name": "Asia",
        "id": "05"
      },
      "country": {
        "name": "India",
        "id": "0515",
        "iso": "IN"
      }
    },
    "social": {
      "shares": 1
    },
    "updates": {
      "last_update_at": "2016-03-15T00:01:53Z",
      "cluster": "14576328001225973304"
    },
    "keywords": [
      "blocks",
      "HELP",
      "sharing'",
      "price",
      "Licensing",
      "NELP",
      "profit",
      "new",
      "policy",
      "domestic"
    ],
    "section": {
      "url": "http://www.thehindubusinessline.com/todays-paper/",
      "id": "1296729997",
      "title": "Today's Paper"
    },
    "id": "14576508001296729997",
    "exensa": [
      [
        "0304",
        408.999,
        0.362
      ],
      [
        "1307",
        298.539,
        0.264
      ],
      [
        "030C",
        184.212,
        0.163
      ],
      [
        "0301",
        49.93,
        0.044
      ],
      [
        "0307",
        36.371,
        0.032
      ],
      [
        "110F",
        33.435,
        0.03
      ],
      [
        "0709",
        30.649,
        0.027
      ],
      [
        "0406",
        30.635,
        0.027
      ],
      [
        "0309",
        28.609,
        0.025
      ],
      [
        "1319",
        28.522,
        0.025
      ]
    ]
  },
  {
    "language": {
      "name": "Hindi",
      "code": "hi"
    },
    "type": {
      "id": 30,
      "name": "Microblogging (Twitter)"
    },
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "date_from_provider": "2016-03-16T22:57:16Z",
    "link": "http://twitter.com/gareebiii/status/710238532774793216",
    "id_from_provider": "710238532774793216",
    "content": "RT @Ziddi_Says: Sochta hoon k wo kitne masoom thay   Kia Se Kia hogaye dekhte dekhte   #NFAK",
    "author": {
      "image": "http://pbs.twimg.com/profile_images/708345014863187968/GXNVR-WG_normal.jpg",
      "id": "3319398607",
      "favourites_count": "6777",
      "url": "http://twitter.com/gareebiii",
      "following_count": "276",
      "tweets_count": "5201",
      "followers_count": "677",
      "location": "",
      "name": "gareebiii"
    },
    "location": {
      "coords": ""
    },
    "place": {
      "name": "",
      "country_code": "",
      "type": ""
    },
    "source": {
      "url": "http://twitter.com/download/iphone",
      "name": "Twitter for iPhone"
    },
    "provider": "Twitter",
    "date": "2016-03-16T23:00:10Z",
    "social": {
      "retweet_to_user": "Ziddi_Says",
      "reply_to_user_name": "",
      "reply_to": "0",
      "user_mentions": [
        "Ziddi_Says"
      ]
    },
    "keywords": [
      "nfak"
    ],
    "updates": {
      "cluster": "0"
    },
    "exensa": [
      [
        "0B0C",
        511.082,
        0.528
      ],
      [
        "0104",
        117.576,
        0.121
      ],
      [
        "0C12",
        73.83,
        0.076
      ],
      [
        "0915",
        70.4,
        0.073
      ],
      [
        "0C07",
        62.859,
        0.065
      ],
      [
        "030C",
        37.239,
        0.038
      ],
      [
        "1110",
        30.023,
        0.031
      ],
      [
        "0301",
        22.63,
        0.023
      ],
      [
        "0C08",
        22.072,
        0.023
      ],
      [
        "0304",
        20.07,
        0.021
      ]
    ],
    "behavior": {
      "possibly_sensitive": "0",
      "attitude": "0",
      "is_question": "0"
    },
    "id": "14581692090307899604"
  },
  {
    "type_publication": {
      "name": "Photo"
    },
    "date": "2016-03-11T23:00:03Z",
    "provider": "Facebook",
    "content": "Update terus dengan layanan terluas & tercepat Telkomsel. Follow akun Instagram Telkomsel di instagram.com/telkomsel ya! ",
    "author": {
      "url": "http://www.facebook.com/profile.php?id=157697287618387",
      "id": "157697287618387",
      "type": "Page",
      "name": "Telkomsel"
    },
    "exensa": [
      [
        "130D",
        649.971,
        0.471
      ],
      [
        "1C08",
        207.779,
        0.151
      ],
      [
        "1D08",
        172.544,
        0.125
      ],
      [
        "0304",
        92.662,
        0.067
      ],
      [
        "1C0B",
        81.702,
        0.059
      ],
      [
        "1206",
        52.165,
        0.038
      ],
      [
        "030C",
        34.5,
        0.025
      ],
      [
        "1C06",
        32.38,
        0.023
      ],
      [
        "1110",
        31.43,
        0.023
      ],
      [
        "1D05",
        25.23,
        0.018
      ]
    ],
    "id": "14577372000604650417",
    "social": {
      "links": [
        "https://www.facebook.com/telkomsel/photos/a.207315509323231.52890.157697287618387/998879186833522/?type=3"
      ],
      "likes": 303,
      "replies": 22,
      "shares": 7
    },
    "updates": {
      "cluster": "0",
      "last_update_at": "2016-03-16T00:00:09Z",
    },
    "feeling": {
      "name": "Undefined",
      "id": 0
    },
    "title": "Timeline Photos",
    "type": {
      "name": "Social Networks (Facebook)",
      "id": 60
    },
    "language": {
      "name": "Undefined",
      "code": "und"
    },
    "image": "https://scontent.xx.fbcdn.net/hphotos-xal1/v/t1.0-0/s130x130/12512378_998879186833522_3426232963515197548_n.jpg?oh=64482bca9baa4d3c08437f468eb641cd&oe=5755D299",
    "date_from_provider": "2016-03-11T13:00:01Z",
    "id_from_provider": "157697287618387_998879186833522",
    "link": "http://www.facebook.com/permalink.php?story_fbid=998879186833522&id=157697287618387"
  }
]

Image

Get Image from Document

Get
GET/image/{documentId}

Request the image of a document, if we don’t have it crawl the image and store to s3 then redirect to the s3 image, if we do just redirect to the s3 image.

Example URI

GET https://nap.launchmetrics.com/documents/v1/image/15022736600609936999
URI Parameters
HideShow
documentId
string (required) Example: 15022736600609936999

id from the documents to be inserted (only FB support Right now)

Response  302

Generated by aglio on 24 Aug 2026