Mozscape API call returning no json
-
Hi - I'm having issues getting started with the Mozscape API. I'm putting the following into my browser:
http://[member-ID]:[secret key]@lsapi.seomoz.com/linkscape/url-metrics/greatbritishchefs.com
According to the blog posts I'm reading I should get loads of json script returned but all I'm getting is {}
Does anybody have any pointers as to what I might be doing wrong?
Thanks
-
Looks like AoV and I posted at the same time. AoV is exactly right. We're both pretty much saying the same thing. Add a Cols parameter and you should be good to go.
Good luck!
-
Hi - I usually use the URL format shown here:
http://www.seomoz.org/api/keys
They have a "sample request" shown here, that you can use to get started. I know they recently stopped supporting the old API format, and it caused a bunch of the scripts I run to stop working. One of the tricky things about the new API format is the 'cols' parameter, where you specify the data that you want returned. They added this to restrict the amount of data that is returned. Before it returned a bunch of data, that maybe users were not really interested in - and so it used more of their server resources and bandwidth.
You can see details about how to use the 'cols' parameter for URL metrics here:
http://apiwiki.seomoz.org/url-metrics
You have to add up the bit values for the fields that you want to have returned. So for instance, if you want only the 'external links' data (32) and the 'mozrank' data (16384), you'd set the cols flag to be 16416 ... (32 + 16384).
Hope that helps ~
-
I just submitted a YOUmoz post on this topic. Hopefully it runs the gauntlet and is approved.
The Mozscape API used to provide everything if you did not provide a Cols parameter to the request. Now you need to send a Cols value with the summed up total of all the bit flags you want the request to return. You can find all of the URL Metrics bit flags and their values here.
Here's an example using your URL and these bit flags: Title (1), URL (4), External Links (32).
http://[member-ID]:[secret key]@lsapi.seomoz.com/linkscape/url-metrics/greatbritishchefs.com?Cols=37
The value 37 represents the bit flags you want to get back added together like so:
Title (1) + URL (4) + External Links (32) = 37
Hope this helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Unsolved Need Moz SEO Wordpress Plugin With API
Re: Moz WordPress Plugin? Hi guys,
Moz Pro | | mrezair
I need some Moz SEO Wordpress Plugins For my website working with Moz API. I've already found Moz DA-PA Checker plugin Moz DA-PA Checker But Need SEO Plugins too. Any Suggestion will be appreciated.0 -
Thoughts on scraping SERPs and APIs
I'm perplexed about a couple of things. Google says that scraping keyword rankings is against their policy from what I've read. Bummer. We comprise a lot of reports and manual finding and entry was a pain. Enter Moz! We still manually check and compare, but it's nice having that tool. I'm confused now though about practices and getting SERPs in an automated way. Here are my questions Is it against policy to get SERPs from an automated method? If that is the case, isn't Moz breaking this policy with it's awesome keyword tracker? If it's not, and we wanted to grab that kind of data, how would we do it? Right now, Moz's API doesn't offer this data. I thought Raven Tools at one point offered this, but they don't now from what I've read. Are there any APIs out there that we can grab this data and do what we want with it? (let's day build our own dashboard)? Thanks for any clarification and input!
Moz Pro | | Boogily1 -
I cant generate my Mozscape API
I have tried to generate my Mozscape API numerous times after waiting at least 20 mins between. Any help would be great.
Moz Pro | | MLMLEADZONE1 -
The report I tried to run on followerwonk is returning no results
http://wonk.ly/giQl this report is returning no results, even though an identical report for a competitor of ours is returning results just fine. Please help.
Moz Pro | | BeatportRDP0 -
Issue Using MozScape wtih SEOGadet's Link Excel Extension
Howdy Everyone! Since i've seen the MozCon presentation by Richard Baxter at SEOGadget, i've been completely amazed by the links extension for Excel. I tried this morning to give it a try. Unfortunately, I cannot get it working, and was hoping that someone here could help me out. I know it's out of the usual "realm" of questions, but I figure it's worth a try 🙂 I successfully installed the addon and entered my Access id (as "member-xxxxxxxxxx" member is in my id) and the secret key. I then downloaded the "OSE" excel spreadsheet" just to make sure I get all the calls right (as I know the doc works) Once I do this, and enter anything in, I get the "an error occured: the remote server returend an error: 401 unauthorized. I then went into the config file (as the setup doc suggests) and disabled run time caching (or at least set "SEOMOZ_API_use_cache_YN":"N") and the SEOMOZ_API_timeout to 100000 from 60000. I have also tried uninstalling and reinstalling the addin, along with regenerating the MozScape API Key Anyway, i'm not an excel wiz, and would appreciate any help that I could get on this. I'm also about to experiment with SEO Tools For Excel if anywone wants to check that out. Thanks in advance Zach Russell
Moz Pro | | Zachary_Russell0 -
API callback parameter
I'm using the free API, and would like to use jQuery to fetch the JSON data outputted by the API. I need to make a JSON-P request, and for this I need to be able to pass some form of callback parameter in the url. I'd like to know if this feature is available, and if so what parameter I need to specify in my request. Of course I could just CURL to the API, but that's really a fallback for if I can't get the data using JS. Thanks
Moz Pro | | jgt19850 -
SEOmoz API? – "Limited access is included ... PRO membership." ?
Can someone expand on what you actually get with your pro membership on the Site Intelligence API. API page. Thanks
Moz Pro | | josey0