Page Crawl API
The Page Crawl API method provides an analysis of an individual page, including:
- URL
- Content Word Count
- Code to Text Ratio
- Page Title
- Page Title Length (character count)
- Page Description
- Page Description Length (character count)
- Page H1
- Internal Links Count
- External Links Count
This API method also includes options to request analysis of each individual internal link and external link that is found on the source page, providing the same data listed above for each link. The Page Crawl Results method also includes option to request the keyword analysis, providing the word count, the breakdown of the results for rank, SEO, SERP and more. The results include the keyword frequency, density, TF-IDF and more.
The monthly usage limit for this API is based on package capacity that is shared with the
Site Audit tool in the user interface.
Refer to
Rank
Ranger API Overview page for information on how to obtain API access,
obtain an API Key, error codes and a full list of API methods.
key |
string |
The unique API key assigned to your account
|
url |
string |
The full page URL including http or https |
package_id |
int |
The Rank Ranger Package ID can be obtained by running the Get Packages Info API
Packages have a capacity for Site Explorer requests, and this API utilizes that capacity. |
analyze_il |
boolean |
Optional: Analyze internal links. If you want internal links included, then add &analyze_il=true to the request |
analyze_el
|
boolean |
Optional: Analyze external links. If you want links that are external to the domain to be included, then add &analyze_el=true to the request |
keyword_analysis
|
boolean |
Optional: Analyze keywords. If you want the analysis of the keywords to be included in the report, then add &keyword_analysis=true to the request (available only for the Page Crawl Results Method) |
output |
string |
Output format options:
- &output=xml (this is the default format)
- &output=json
Either of these parameters can be added to the json output parameter:
- &output=json&json_strict=true
(forces the results to come back as array instead of objects)
- &output=json&json_arr=true
(causes the entire json to be wrapped as array)
|
Example Page Crawl Request
Construct & test Keyword Research API requests in the API Console or follow one of these examples:
|
https://www.rankranger.com/api/v2/?page_crawl&key=Your-API-Key&url=https://example.com/page/&package_id=XXXXXX&analyze_il=true&analyze_el=true |
Example Page Crawl Results Request
Insert the Query ID found in the response into this API request:
https://www.rankranger.com/api/v2/?page_crawl_results&key=Your-API-Key&url=https://example.com/page/&query_id=XXXX |
Page Crawl Results Example
Results can be ready in seconds or might take several minutes depending upon the number of links on the page and if you requested that external links be analyzed. If you request the results while the page crawl and link analysis are still in process, you will receive this type of response:
You can repeat the request for results. This is an example of page crawl results.
API Console: Construct & Test API Requests
To make construction of API requests easy, we offer this API testing tool. Most parameters are included in the options of the console, however, you may need to add custom option parameters to your API requests based on the specific API you're using. Referencing the parameters information that is listed in the specific API method documentation, you can construct and test API requests in Rank Ranger's
API Console by navigating to:
1.
Campaigns
2.
API Resources > API Console
3. Select the Method and complete the applicable fields
4. Click the
Generate button
5. Test your API method by clicking the launch URL icon and view your results. Once your results are as you want them, copy that URL into your own application and modify as needed for each request.
Getting Started: Samples of APIs used for Creating Campaigns
We recommend reviewing our
Best Practices Guide prior to structuring campaigns.
Get Packages Info: Required when there is more than 1 package in an account
https://www.rankranger.com/api/v2/?packages&key=YOURAPIKEY
Add a Profile: An option for adding an identifier to your campaigns for categorization (e.g., by language, country, etc)
https://www.rankranger.com/api/v2/?add_profile&key=YOURAPIKEY&profile_name=Profile Name&profile_ref_id=YourInternalReferenceID
Get Profile ID list: Optional Data needed for Add a Campaign
https://www.rankranger.com/api/v2/?get_all_profiles&key=YOURAPIKEY
Obtain the
Search Engine List: Data needed for Add a Campaign
https://www.rankranger.com/api/v2/?se_list&key=YOURAPIKEY
Add a Campaign: Create a new campaign, response will include the Campaign ID number that is needed for adding a search engine and keywords
https://www.rankranger.com/api/v2/?add_campaign&key=YOURAPIKEY&campaign_name=yourcampaignname&campaign_domain=example.com&campaign_ranking_system
=default&profile_id=ProfileIDnumber
*Note that Profile ID is an optional field that you may use, if you choose not to use it, then please remove "&profile_id=ProfileIDnumber” from the end of this call
Add a Search Engine: Add search engine to a campaign
https://www.rankranger.com/api/v2/?add_search_engine&key=YOURAPIKEY&campaign_id=123456&se_id=se_id
Add a Keyword: An optional field is available for keyword_identifier field, allowing you to add your own unique identifier to each keyword
https://www.rankranger.com/api/v2/?add_keyword&key=YOURAPIKEY&campaign_id=123456
&keyword=yourkeyword&keyword_identifier=your-keyword-identifier
Bulk Add Keywords: You may download and use the spreadsheet found on the Campaign Settings > Keywords screen to organize and import your keywords, or use this API
https://www.rankranger.com/api/v2/?add_bulk_keywords&key=YOURAPIKEY&campaign_id=123456&keywords=keyword1,keyword2,keyword3
You'll find additional API methods in the
Account Management and Data documentation