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
-
API for On Page tool
I'm looking for a tool similar to On Page Grader (Moz) or Focus Keyword (Yoast) with API. We are building out or internal CRM system. Even though none of these tools can replace manual on page analysis, it will be used as a metric and to catch human mistakes.
Moz Pro | | OscarSE0 -
New Mozscape index released! Learn just what's been going on.
Hi everyone, I'm very, very pleased to announce that the latest Mozscape index has been released five days ahead of schedule, and it's back up to the quality you expect from Moz! It's no secret that we've struggled this year with our index. I can't overstate how much we appreciate everyone sticking with us—we know how hard this has been. The good news—well, apart from the early release—is that we've worked out the issue, and we expect to finally be back on track moving forward. Director of Engineering Martin York has shared a post to the Moz blog explaining just what's been going so wrong, and outlining our plan for the future. Thank you, from the bottom of our hearts, for being such an incredible community. As for the folks who are seeing Domain Authority and Page Authority drops since the index release, please see Rand's recent post for more.
Moz Pro | | MattRoney7 -
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 -
Domain_to_domain api call syntax
I am trying to construct an api call that lists the top authority link from each domain. This page_to_page call works http://lsapi.seomoz.com/linkscape/links/www.jbwebanalytics.com?SourceCols=4&TargetCols=4&Scope=page_to_page&Limit=400&AccessID=membexxx&Expires=xxx&Signature=xxx This domain_to_domain does not http://lsapi.seomoz.com/linkscape/links/www.jbwebanalytics.com?&Scope=domain_to_domain&Limit=400&AccessID=member-xxx1&Expires=xxx&Signature=xxx I'm plum out of ideas why? Anyone know? The Idea output is the single highest authority link for all linking domains thanks! Brian
Moz Pro | | VISISEEKINC0 -
Website is not being indexed in Mozscape
Hi, We launched a website Mid-March. Strangely it's not yet being indexed by the Mozscape crawler (therefore I can't use tools like Open Site Explorer). Open Site Explorer keeps telling me: "No Data Availible for this URL". I don't think it's a crawl error of some sort. Google Webmaster tools tells me everything is fine (no crawl errors). Search Engine indexing is also fine. Any thoughts on this? Thanks.
Moz Pro | | Vendic0 -
Why does Linkscap API request hang while extracting data ?
Hi, I am using LinkScape API to get follow and nofollow links . I use cron to get data for each url of sitemap.xml. However while cron is running, the extraction of data hangs on some pages which i later need to delete manually for re starting the execution. Do anyone have any idea why this is happening ? How can i ignore such pages ?
Moz Pro | | Ravi_Pathak0 -
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