Get outlinks from specific page through API?

Hi!

I have tried to figure out how to retrieve outlinks from a specific page by using the API.
I know that the information is stored in Piwik and can be access on the normal Piwik interface (see attached screenshot).

I have tried looking at Actions.getOutlinks with a segment but that just returns and empty result. I have also tried to use Transitions.getTransitionsForPageUrl but that simply returns a “NoDataForAction” message.

I hope someone out there knows something about this and can help me in the right direction :slight_smile:

Regards,
Mathias

Transitions.getTransitionsForPageUrl should work indeed, as it is the API used to build this report. have you set &pageUrl= to the URL encoded URL ?

Yes and I can not get it to work on the Piwik demo site either:

http://demo.piwik.org/index.php?module=API&method=Transitions.getTransitionsForPageUrl&period=day&date=yesterday&idSite=7
&pageUrl=http%3A%2F%2Fforum.piwik.org%2Findex&format=JSON&token_auth=anonymous

still says NoDataForAction and I can not see what I am missing or doing wrong ? :slight_smile:

Email me about replies to this topic

Hi,

the following request works on the demo:


http://demo.piwik.org/index.php?module=API&method=Transitions.getTransitionsForPageUrl&period=day&date=yesterday&idSite=7&pageUrl=http%3A%2F%2Fforum.piwik.org%2Findex.php&format=JSON&token_auth=anonymous

I simply added “.php” to the url.

Wow thanks, after all I got it to work. Something stupid like that can mess it up :stuck_out_tongue:

Hi,

As follow-up on this topic.
Is it possible to get outlinks from PageURLs who contain a certain value?
Like ‘ienm’? Instead of a whole URL?

Thanks in advance.

Kind regards,
Julia