• Resolved infogeniuz

    (@infogeniuz)


    i would like to be able to enter a URL in a field, pass the URL to your plugin for API call and then parse the JSON output for SimilarWeb.com API. is that doable? i am a newbie to API coding.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author berkux

    (@berkux)

    You describe the basic idea of this plugin.
    https://developer.similarweb.com/estimated_visits_api shows that you need a apikey (provided by the api).
    with that you can
    [jsoncontentimporter url=https://api.similarweb.com/v1/website/cnn.com/total-traffic-and-engagement/visits?api_key={UserKey}&start_date=2016-01&end_date=2016-03&main_domain_only=false&granularity=monthly]
    {subloop-array:visits:-1}
    {visits.date}
    {/subloop-array:visits}
    [/jsoncontentimporter]

    Bernhard

    Thread Starter infogeniuz

    (@infogeniuz)

    Cool. How could i have a user input the URL, start and end dates?

    Plugin Author berkux

    (@berkux)

    This is a PRO-feature ??
    There is a shortcode-parameter urlparam to manage that.

    Thread Starter infogeniuz

    (@infogeniuz)

    i will buy pro, if i know how to implement the variable insertion.

    Plugin Author berkux

    (@berkux)

    This done this way:
    [jsoncontentimporterpro url=https://api.similarweb.com/v1/website/cnn.com/total-traffic-and-engagement/visits?api_key={UserKey}&start_date=2016-01&end_date=2016-03&main_domain_only=false&granularity=monthly urlparam=start_date#end_date]
    {subloop-array:visits:-1}
    {visits.date}
    {/subloop-array:visits}
    [/jsoncontentimporterpro]

    Then you can do “wp-page-url?end_date=2016-02” which will add the value of end_date to the url.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SimilarWeb API’ is closed to new replies.