jQuery.get() is a GET shorthand for $.ajax() (since 1.0; settings-object form since 1.12). Pass a URL (and optional data / success / dataType). It returns a jqXHR — chain .done(), .fail(), and .always().
Remember
// Positional form
$.get(url [, data] [, success] [, dataType]);
// Settings form (1.12+)
$.get({ url: "/api/items", dataType: "json" });
// Equivalent to:
$.ajax({ url: url, data: data, success: success, dataType: dataType });
// (type is always GET)
Call it with a URL, optionally send query data, then handle the result.
Call $.get(url) or $.get(url, data, success, dataType).
Or pass a settings object: $.get({ url, data, dataType }).
Chain .done() / .fail() / .always() on the jqXHR (preferred over relying only on the success argument).
Use dataType: "json" when you expect JSON.
Always handle errors — $.get() fails silently by default.
Piece
Required?
Role
url
Yes
Endpoint to request
data
No
Query string params (object or string)
success
No*
function(data, textStatus, jqXHR) (*required if you pass dataType positionally — use null as a placeholder)
dataType
No
json, html, text, xml, script — or intelligent guess
Pseudocode
Pseudocode
call $.get(url, data, success, dataType)
→ internally $.ajax({ url, data, success, dataType }) // GET
→ returns jqXHR immediately
send HTTP GET asynchronously
data object → appended as query string
when response arrives:
if success:
parse body using dataType (or Content-Type guess)
run success callback and .done() handlers
else:
fail silently unless .fail() or ajaxError is registered
run .fail() handlers
run .always() handlers
Reference
Cheat Sheet
Keep these patterns handy while loading data with GET.
Topic
Detail
Basic
$.get("/api/items", fn)
With params
$.get("/api", { q: "ada" }, fn)
JSON
$.get(url, null, fn, "json") or $.get({ url, dataType: "json" })
Promise chain
$.get(url).done(fn).fail(fn).always(fn)
Returns
jqXHR (XHR + Deferred)
Since
1.0 · settings object 1.12 / 2.2
Errors
Silent unless .fail() or ajaxError
Same origin
Most Ajax GETs follow the same-origin policy
Try it
Live Preview
Run a real $.get() and watch .done() / .fail() update the log.
Live demo uses a public JSON API. Needs network access.
Result
Ready — pick an action and click Run.
Code
jQuery Examples
Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.
Example 1 — Basic Success Callback
Fetch a resource and update the page when the GET succeeds.
jQuery
$("#load").on("click", function () {
$.get("https://jsonplaceholder.typicode.com/posts/1", function (data) {
$("#result").text("Title: " + data.title);
});
});
#title → album title
cache: false appends a cache-busting param
How It Works
Object. One settings bag — no null placeholders.
GET forced. The type option is always set to GET for $.get().
Options. Most $.ajax() settings work here (except you stay on GET).
Chain. You still get a jqXHR for .done() / .fail().
Edge Cases & Pitfalls
Watch for these when loading data with $.get().
silent
Errors are silent by default
Without .fail() or ajaxError, a 404 looks like nothing happened. Always handle failures in UI code.
origin
Same-origin policy
Most Ajax GETs cannot read another domain unless CORS allows it. Script/JSONP requests are special cases.
args
Positional dataType needs placeholders
To pass "json" as the fourth argument without data, use null for the data (and success if needed) slots — or use the settings object.
removed
No .success() on jqXHR (3.0+)
Use .done() / .fail() / .always(). The old jqXHR callback methods were removed in jQuery 3.0.
Compatibility
Browser Support
jQuery.get() has been part of jQuery since 1.0. The settings-object form arrived in 1.12 / 2.2. jqXHR Deferred methods (.done() / .fail() / .always()) date from 1.5–1.6. Prefer a current jQuery 3.x build.
✓ Stable · jQuery 1.0+
jQuery.get()
Works wherever your loaded jQuery version runs Ajax. Subject to the browser same-origin policy for typical XHR GETs. Native fetch() is separate and does not trigger jQuery global Ajax events.
100%jQuery Ajax shorthand
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.get()Universal
Bottom line: Safe for everyday apps. Prefer .done()/.fail()/.always(), and never assume success-only callbacks are enough.
Analysis
Performance Notes
Approach
Cost
Best for
$.get() (async GET)
Cheap
Reading JSON / HTML snippets
$.getJSON()
Same
JSON-only endpoints
Repeated uncached GETs
Costly
Debounce, cache, or abort obsolete calls
Keep requests small, abort obsolete ones when the user navigates away, and avoid firing a new GET on every keystroke without debounce.
Remember
Key Takeaways
Role: readable GET shorthand — built on $.ajax().
Return:jqXHR — chain .done(), .fail(), .always().
Data: objects become query-string params on GET.
Errors: not silent if you chain .fail() — always do that in UI code.
One line:$.get() is jQuery’s simple async GET — load data, then chain the jqXHR.
Frequently Asked Questions
jQuery.get() is a shorthand for $.ajax() configured as a GET request. Pass a URL, optional data, optional success callback, and optional dataType. Since jQuery 1.12 you can also pass a settings object: $.get({ url, data, dataType }). It returns a jqXHR for .done() / .fail() / .always().
A jqXHR object — a Promise-like wrapper around the request. Chain .done(fn) for success, .fail(fn) for errors, and .always(fn) for either outcome. Call jqXHR.abort() to cancel an in-flight GET.
$.get() is sugar for $.ajax({ url, data, success, dataType }) with type GET. Use $.get() for simple reads. Use $.ajax() when you need full control: custom headers, beforeSend, global: false, or other advanced settings.
function(data, textStatus, jqXHR). data is the parsed body; textStatus is usually "success"; jqXHR is the same object $.get() returned. For JSONP / some cross-domain GETs, jqXHR and textStatus may be undefined.
Yes. On HTTP or network errors the success callback never runs, and nothing alerts you unless you chain .fail(), use .always(), or listen for the global ajaxError event. Always handle failures when the user needs feedback.
Use $.get() to read data (query params in the URL). Use $.post() to send body data — form submits, creates, and other write operations. Both are shorthands over $.ajax().