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
-
Rank tracking in Excel via MOZ API?
Hi there, i hope someone knows the solution to this problem. I created/ copied the "advanced Excel Keyword Analysis Report" that Dan Peskin was kind enough to share, you can find it here: http://moz.com/blog/how-to-build-an-advanced-keyword-analysis-report-in-excel. Now i m looking for a solution to rank my Keywords by using an API, preferably the MOZ API. My keywords are alligned in a column "Keword List", which will be regularly updated. Next to this column i would like to have a column with the corresponding rank. Is there a automatic solution, or do i have to do it manually?
Moz Pro | | Juri.Rabiner0 -
Linkscape API Sort calls
I'm using Linkscape API plugin from SEO Gadget. It's all fine but I can't find any documentation on other 'sort' calls. The only request that I knows that works is "domains_linking_page". Any idea where this information is? I was hoping for a list of all the available requests I can and more particularly I want to sort it by Internal Linking Domains.
Moz Pro | | iProspect-397560 -
How to find page with the link that returns a 404 error indicated in my crawl diagnostics?
Hi Newbie here - I am trying to understand what to do, step by step, after getting my initial reports back from seomoz. The first is regarding the 404 errors shown as high priority to fix, in crawl diagnostics. I reviewed the support info help on the crawl diagnostics page referring to 404 errors, but still did not understand exactly what I am supposed to do...same with the Q&A section when I searched how to fix 404 errors. I just could not understand exactly what anyone was talking about in relation to my 404 issues. It seems I would want to find the page that had the bad link that sent a visitor to a page not found, and then correct the problem by removing the link, or correcting and re-uploading the page being linked to. I saw some suggestions that seemed to indicate that seomoz itself will not let me find the page where the bad link is and that I would need to use some external program to do this. I would think that if seomoz found the bad page, it would also tell me what page the link(s) to the bad page exists on. A number of suggestions were to use a 301 redirect somehow as the solution, but was not clear when to do this versus, just removing the bad link, or repairing the page the link was pointing to. I think therefore my question is how do I find the links that lead to 404 page not founds, and fix the problem. Thanks Galen
Moz Pro | | Tetruss0 -
Paid API Access
We've been using your API on regular basis over the past few months, when lately we started having problems accessing the data it provides.I received an empty object when tried fetching info using the following URL:string sUrlToScan = "http://lsapi.seomoz.com/linkscape/url-metrics/"+sHost+"?AccessID=member-d73bd20330&Expires=1355756373&Signature=....";* Please note - I removed the Signature field for security reasonsI would really appreciate it if you could let me know why the service has stopped working.Is it because the 'Expires' is no longer valid?Could you please provide me with the up-to-date AccessID + Expires + Signature values so I could continue using your API?Thanks!
Moz Pro | | Sorezki0 -
API Request Rate Problem
Hi there A Java app of mine worked perfectly until recently, when it gets "rate exceeds your current plan" errors from the API, although it does only 1 request in 10 seconds. Any idea what's wrong? Cheers, Chris
Moz Pro | | Diderino0 -
Linkscape API having bugs
Hi, We are using the SEOMOZ Linkscape API (url-metrics and links) but the the API is not working well. We are sometimes (without any proveable reason) getting an http error with code 401. Like I said earlier it happens sometimes really often and sometimes just once. What could be the reason for this? We have an account with the following login seo@traffic-builders.com. Thanks in advance!
Moz Pro | | W_TrafficBuildersNL0 -
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 -
Help with SEOmoz API
Hi guys, I'm trying to make API requests from my webserver via PHP. I'd like to retrieve data from the SEOmoz URL Metrics API. Unfortunately I always get the error response "unauthorized" even when I copy and paste the Sample Valid API Signature generated by your system into the browser. Is Signed Authentication not longer supported? I even tried the sample PHP Code SignedAuth.php but there's the same problem, too. If signed authentication is not longer available, do you have a code example for the basic http authorization? Thanks, Brandon
Moz Pro | | thegreatpursuit1