Introduction
Welcome to the JsonLink API documentation. This API provides functionalities for extracting information and taking screenshots of webpages.
Authentication
To access the JsonLink API, you must authenticate your requests using an API key. This key allows you to make requests to the API and track your credits usage.
To get started, sign up for a free account on JsonLink.io. Once you have created an account, you can copy your API key.
To authenticate your API requests, include your API key as a query parameter in the URL:
https://jsonlink.io/api/endpoint?api_key=<YOUR_API_KEY>
For example, a request to the screenshots endpoint would look like this:
https://jsonlink.io/api/screenshot?api_key=<YOUR_API_KEY>&url=https://example.com
Ensure that you keep your API key secure and do not share it publicly. If you believe your API key has been compromised, you can regenerate it from your account dashboard.
Get a Free API KeyCredits
JsonLink uses a credit-based usage model. Each successful API operation consumes credits from your plan balance. Rate limits (requests per minute/hour) still apply separately.
The free plan includes 100 one-time credits that do not renew. Paid plans include a monthly credit allowance that resets with your billing period. For current plan amounts, visit our Pricing page.
Credit costs by operation
| Operation | Credits |
|---|---|
| Fast Extract | 1 |
| Metadata | 1 |
| HTML | 1 |
| Markdown | 1 |
| Screenshot | 2 |
Credits quota exceeded
If you run out of credits, the API responds with HTTP status code 429 and the following error:
{
"success": false,
"error": "Credits quota exceeded"
}
When this happens, upgrade your plan or wait until your billing period resets (paid plans only). Free trial credits do not reset.
Rate Limitation
To ensure fair usage and maintain optimal performance, the JsonLink API enforces rate limits based on your subscription plan. These limits control how many requests you can make per minute and per hour. They are separate from your credits balance.
Each subscription plan has its own rate limits. For detailed information on the limits associated with each plan, please visit our Pricing page.
View Plans & Pricing
Understanding Rate Limit Headers
Every API response includes headers that provide real-time information about your current rate limit status. These headers help you monitor and manage your API usage effectively.
- X-Rate-Limit-Limit: The maximum number of requests allowed in the current time window.
- X-Rate-Limit-Remaining: The number of requests remaining in the current time window.
- X-Rate-Limit-Reset: The UNIX timestamp indicating when the current rate limit window will reset.
If you exceed the allowed number of requests within the defined time frame, the API will respond with an HTTP status code 429 Too Many Requests. The response body will contain a JSON object detailing the error.
Rate Limit Error Response Example:
{
"success": false,
"error": "Too many request"
}
When you receive a 429 error for rate limiting, implement a retry mechanism with exponential backoff.
If the error is Credits quota exceeded instead, you have run out of credits — see the Credits section.
Best Practices
- Monitor the X-Rate-Limit-Remaining header to track your remaining requests in the current window.
- Implement error handling for 429 responses, and distinguish rate limits from credits quota errors.
- Optimize your application to minimize unnecessary API calls.
- Consider upgrading your plan if you consistently hit rate limits or run out of credits.
Responses
Success Responses
Details about successful responses and their structure.
Error Responses
Details about error responses and how to handle them.
GET API Extract
The Extract endpoint allows you to retrieve essential metadata from a given URL, such as the page title, description, images, and more. This is useful for generating previews or summaries of web content. To use this endpoint, simply provide the target URL along with your API key.
Play with this endpoint here: Extract Metadata API Playground.
Endpoint URL
https://jsonlink.io/api/extract?api_key=<API_KEY>&url=<URL>
Required Parameters
- api_key: Your API key obtained from JsonLink. You can create a free account to get your API key.
- url: The full URL of the web page you want to extract metadata from.
Successful Response
If the request is successful, the API will return a JSON object containing various metadata about the URL. Here’s an example response:
{
"title": "Crea Imágenes con Frases online y gratis – Crea Tu Frase",
"description": "Crea imágenes con frases para compartir con nuestro creador de frases online y gratis! Descarga y comparti frases en las redes sociales.",
"images": [
"https://tufrase.com/img/socialshare.jpg"
],
"sitename": "Tu Frase",
"favicon": "https://tufrase.com/favicon-32x32.png",
"duration": 1576,
"domain": "tufrase.com",
"url": "https://tufrase.com"
}
- title: The title of the web page.
- description: A short description of the web page content.
- images: An array of image URLs extracted from the web page.
- sitename: The name of the website.
- favicon: The URL of the site's favicon.
- duration: The duration of any video content, if present, in seconds.
- domain: The domain of the website.
- url: The original URL that was provided.
Error Response
If there is an error with the request, such as a timeout or an invalid URL, the API will return a JSON object with an error message. Here’s an example error response:
{
"error": "REQUEST_TIMEOUT"
}
Best Practices
- Ensure that the URL provided is complete and properly encoded.
- Check the returned JSON structure to verify that all desired metadata is present.
- Handle potential errors gracefully by checking for the error field in the response.
- Monitor your credits balance — a successful extract consumes credits (see Credits).
GET API Screenshot
The Screenshot endpoint allows you to capture a screenshot of a given web page. You can customize various options such as viewport size, format, and quality. This endpoint is particularly useful for generating visual representations of web pages for monitoring or archival purposes.
Play with this endpoint here: Take Screenshots API Playground.
Endpoint URL
curl https://jsonlink.io/api/screenshot?api_key=<API_KEY>&url=<URL>
Required Parameters
- api_key: Your API key obtained from JsonLink. You can create a free account to get your API key.
- url: The full URL of the web page you want to capture.
Optional Parameters
- viewport_width: Set the width of the browser viewport (in pixels). Default is
1920. - viewport_height: Set the height of the browser viewport (in pixels). Default is
1080. - device_scale_factor: Set the device scale factor (useful for high-resolution displays). Accepts values from 1 to 3. Default is
1. - format: The format of the screenshot image. Options are
pngorjpg. Default isjpg. - quality: The quality of the screenshot (only applicable for
jpgformat). Accepts values from 0 to 100. Default is80 - full_page: If set to
true, captures the entire page, not just the visible portion. Default isfalse. - delay: Wait for the given number of seconds before capturing the screenshot. Default is
0.
Successful Response
If the request is successful, the API will return a JSON object with the path and URL of the saved screenshot. Here’s an example response:
{
"path": "screenshots/5afc57bb-0e31-45bf-8e53-d9f016fa9bf9.jpg",
"url": "http://jsonlink.io/screenshots/5afc57bb-0e31-45bf-8e53-d9f016fa9bf9.jpg"
}
Hotlinking screenshots is not allowed
Please note that hotlinking to the screenshot URLs is not permitted. All screenshots are stored temporarily and will be deleted after 7 days. Ensure to download and store the images locally if you need to retain them longer.
- path: The relative path to the screenshot file on the server.
- url: The URL where the screenshot can be accessed. Note: Hotlinking is not allowed, and screenshots are deleted after 7 days.
Best Practices
- Ensure that the URL provided is complete and properly encoded.
- Use the format and quality parameters to optimize the file size and image quality according to your needs.
- Be aware of rate limits and your credits balance to avoid
429errors (Too many requestorCredits quota exceeded). - Remember that screenshots are deleted after 7 days, so save them locally if you need to keep them longer.
GET API Images
The Images endpoint allows you to extract all the available images for given web page. You can extract information like size, format, and resolutions.
Play with this endpoint here: Extract Images API Playground.
Metadata Scraper Extract Links Screenshots API Link Preview Extract ImagesEndpoint URL
curl https://jsonlink.io/api/images?api_key=<API_KEY>&url=<URL>
Required Parameters
- api_key: Your API key obtained from JsonLink. You can create a free account to get your API key.
- url: The full URL of the web page you want to capture.
Successful Response
If the request is successful, the API will return a JSON object with the path and URL of the saved screenshot. Here’s an example response:
{
"images": [
{
"url": "https:\/\/tufrase.com\/img\/isologo-h.svg",
"src": "\/img\/isologo-h.svg",
"format": "svg",
"width": 300,
"height": 109,
"basename": "isologo-h.svg",
"name": "isologo-h",
"size": 3590,
"mime_type": "image\/svg+xml"
}
]
}
GET API Links
The Images endpoint allows you to extract all the available links for given web page. You can extract information like URL, follow and nofollow attributes, title, etc.
Play with this endpoint here: Extract Links API Playground.
Endpoint URL
curl https://jsonlink.io/api/links?api_key=<API_KEY>&url=<URL>
Required Parameters
- api_key: Your API key obtained from JsonLink. You can create a free account to get your API key.
- url: The full URL of the web page you want to capture.
Successful Response
If the request is successful, the API will return a JSON object with the path and URL of the saved screenshot. Here’s an example response:
{
"links": [
{
"url": "https://emailcountdowntimer.com",
"text": "Email Countdown Timer",
"title": "Free timers for emails",
"rel": "follow",
"type": "internal"
}
]
}
POST API Markdown
The Markdown endpoint extracts the main content of a web page and returns it as clean Markdown. Useful for RAG pipelines, content indexing, summarization, and converting articles into structured text.
Endpoint URL
POST https://jsonlink.io/api/markdown
Example Request
curl -X POST https://jsonlink.io/api/markdown \
-H "Content-Type: application/json" \
-d '{"api_key":"<API_KEY>","url":"<URL>"}'
Required Parameters
- api_key: Your API key obtained from JsonLink. You can create a free account to get your API key. Can also be sent as a query parameter.
- url: The full URL of the web page you want to convert to Markdown.
Successful Response
If the request is successful, the API will return a JSON object with the extracted Markdown and related metadata. Here’s an example response:
{
"url": "https://example.com/article",
"title": "Example Article",
"language": "en",
"wordCount": 842,
"markdown": "# Example Article\n\nThis is the extracted content..."
}
- url: The original URL that was provided.
- title: The title of the extracted article.
- language: Detected language of the page, when available.
- wordCount: Approximate word count of the Markdown content.
- markdown: The extracted page content in Markdown format.
Error Response
If the content cannot be extracted, the API will return a JSON object with an error message:
{
"error": "Unable to extract main content"
}
Best Practices
- Send a complete, absolute URL including the protocol (
https://). - Handle potential errors by checking for the error field in the response.
- A successful markdown request costs 1 credit (see Credits).