Documentation

Markdown

Add output=markdown and you get the page as clean Markdown: headings, paragraphs, links, lists, tables and code, ready for a language model. It costs the same as the page itself: 1 credit, or 5 credits with render=true.

A request

A page as Markdown

cURL

curl "https://gimmepage.com/v1/fetch?url=https%3A%2F%2Fexample.com%2F&output=markdown" \
  -H "Authorization: Bearer YOUR_API_KEY"

Python

# pip install gimmepage
from gimmepage import Gimmepage

client = Gimmepage(api_key="YOUR_API_KEY")
page = client.fetch("https://example.com/", output="markdown")
print(page.site_status, page.cost, page.balance)
print(page.text)

JavaScript

// npm install gimmepage
import { Gimmepage } from "gimmepage";

const client = new Gimmepage({ apiKey: "YOUR_API_KEY" });
const page = await client.fetch("https://example.com/", { output: "markdown" });
console.log(page.siteStatus, page.cost, page.balance);
console.log(page.text);

PHP

<?php
$query = http_build_query(['url' => 'https://example.com/', 'output' => 'markdown']);
$ch = curl_init('https://gimmepage.com/v1/fetch?' . $query);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $body;

Go

package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	q := url.Values{}
	q.Set("url", "https://example.com/")
	q.Set("output", "markdown")
	req, _ := http.NewRequest("GET", "https://gimmepage.com/v1/fetch?"+q.Encode(), nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Header.Get("Gimmepage-Cost"), string(body))
}

Ruby

require "net/http"
require "uri"

uri = URI("https://gimmepage.com/v1/fetch")
uri.query = URI.encode_www_form(url: "https://example.com/", output: "markdown")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
puts res["Gimmepage-Cost"], res.body

Java

import java.net.URI;
import java.net.http.*;

var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
    .uri(URI.create("https://gimmepage.com/v1/fetch?url=https%3A%2F%2Fexample.com%2F&output=markdown"))
    .header("Authorization", "Bearer YOUR_API_KEY")
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.headers().firstValue("Gimmepage-Cost").orElse("") + " " + response.body());

C#

using var http = new HttpClient();
http.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await http.GetAsync("https://gimmepage.com/v1/fetch?url=https%3A%2F%2Fexample.com%2F&output=markdown");
Console.WriteLine(response.Headers.GetValues("Gimmepage-Cost").First());
Console.WriteLine(await response.Content.ReadAsStringAsync());

Rust

// reqwest = { version = "0.12", features = ["blocking"] }
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let resp = reqwest::blocking::Client::new()
        .get("https://gimmepage.com/v1/fetch")
        .query(&[("url", "https://example.com/"), ("output", "markdown")])
        .bearer_auth("YOUR_API_KEY")
        .send()?;
    println!("{:?}", resp.headers().get("gimmepage-cost"));
    println!("{}", resp.text()?);
    Ok(())
}

The answer

HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Gimmepage-Output: markdown
Gimmepage-Site-Status: 200
Gimmepage-Final-Url: https://example.com/
Gimmepage-Cost: 1

# Example Domain

This domain is for use in illustrative examples in documents.

[More information...](https://www.iana.org/domains/example)

What you get

  • Only what a reader sees. Scripts, styles, forms, embedded frames and the page's head produce no text.
  • Complete addresses. Every link and image address is made absolute against the address the page came from, so a model can follow them.
  • The right characters. The page is decoded by the character set it declares (in its header or a <meta> tag), so Cyrillic, Japanese and accented text arrive intact.
  • Pages built by scripts. With render=true the page is converted after its scripts ran, as a browser shows it.

Cutting long pages: max_chars

Language models have a context limit. max_chars=20000 cuts the Markdown after 20,000 characters (never inside a character). When it was cut, the header Gimmepage-Truncated gives the full length; with format=json the answer has "truncated": true and "full_length". The price does not change.

What cannot be converted

  • Anything that is not an HTML page (a PDF, an image, JSON) fails with not_convertible, free. Ask for output=raw to get it as it is.
  • HTML larger than 4 MiB fails with too_large, free. As output=raw the limit is 16 MiB.

gimmepage converts the page after fetching it; the content itself is exactly what the site sent. For AI assistants, the MCP server returns Markdown by default.